|
@@ -989,20 +989,6 @@ func (client *Client) IdleSeconds() uint64 {
|
989
|
989
|
return uint64(client.IdleTime().Seconds())
|
990
|
990
|
}
|
991
|
991
|
|
992
|
|
-// HasNick returns true if the client's nickname is set (used in registration).
|
993
|
|
-func (client *Client) HasNick() bool {
|
994
|
|
- client.stateMutex.RLock()
|
995
|
|
- defer client.stateMutex.RUnlock()
|
996
|
|
- return client.nick != "" && client.nick != "*"
|
997
|
|
-}
|
998
|
|
-
|
999
|
|
-// HasUsername returns true if the client's username is set (used in registration).
|
1000
|
|
-func (client *Client) HasUsername() bool {
|
1001
|
|
- client.stateMutex.RLock()
|
1002
|
|
- defer client.stateMutex.RUnlock()
|
1003
|
|
- return client.username != "" && client.username != "*"
|
1004
|
|
-}
|
1005
|
|
-
|
1006
|
992
|
// SetNames sets the client's ident and realname.
|
1007
|
993
|
func (client *Client) SetNames(username, realname string, fromIdent bool) error {
|
1008
|
994
|
limit := client.server.Config().Limits.IdentLen
|