Merge pull request #1230 from slingamn/hasnick

remove some dead code
This commit is contained in:
Shivaram Lingamneni 2020-08-06 21:17:56 -07:00 committed by GitHub
commit 12bcba01cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 14 deletions

View File

@ -989,20 +989,6 @@ func (client *Client) IdleSeconds() uint64 {
return uint64(client.IdleTime().Seconds()) return uint64(client.IdleTime().Seconds())
} }
// HasNick returns true if the client's nickname is set (used in registration).
func (client *Client) HasNick() bool {
client.stateMutex.RLock()
defer client.stateMutex.RUnlock()
return client.nick != "" && client.nick != "*"
}
// HasUsername returns true if the client's username is set (used in registration).
func (client *Client) HasUsername() bool {
client.stateMutex.RLock()
defer client.stateMutex.RUnlock()
return client.username != "" && client.username != "*"
}
// SetNames sets the client's ident and realname. // SetNames sets the client's ident and realname.
func (client *Client) SetNames(username, realname string, fromIdent bool) error { func (client *Client) SetNames(username, realname string, fromIdent bool) error {
limit := client.server.Config().Limits.IdentLen limit := client.server.Config().Limits.IdentLen