hasValidValues() -> has ConnectionValues()

This commit is contained in:
tpltnt
2014-02-16 01:10:08 +01:00
parent 4ba3d1c0d2
commit 4dcf7d03c5
2 changed files with 34 additions and 14 deletions

10
irc.go
View File

@@ -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
}