hasValidValues() -> has ConnectionValues()
This commit is contained in:
10
irc.go
10
irc.go
@@ -389,9 +389,9 @@ func IRC(nick, user string) *Connection {
|
||||
return irc
|
||||
}
|
||||
|
||||
// Returns true if all values in struct make
|
||||
// somewhat sense.
|
||||
func (irc *Connection) hasValidValues() bool {
|
||||
// Returns true if all values in struct allow for
|
||||
// establishing a connection.
|
||||
func (irc *Connection) hasConnectionValues() bool {
|
||||
if 0 == len(irc.nick) {
|
||||
return false
|
||||
}
|
||||
@@ -404,6 +404,10 @@ func (irc *Connection) hasValidValues() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if 0 == len(irc.server) {
|
||||
return false
|
||||
}
|
||||
|
||||
if nil == irc.Log {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user