SANICK: Fix check for new user

This commit is contained in:
Daniel Oaks 2017-06-18 08:23:51 -06:00
parent 194a301d23
commit e5980beb7d
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ func sanickHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
} }
//TODO(dan): There's probably some races here, we should be changing this in the primary server thread //TODO(dan): There's probably some races here, we should be changing this in the primary server thread
if server.clients.Get(nickname) != nil || server.clients.Get(nickname) != target { if server.clients.Get(nickname) != nil && server.clients.Get(nickname) != target {
client.Send(nil, server.name, ERR_NICKNAMEINUSE, client.nick, msg.Params[0], "Nickname is already in use") client.Send(nil, server.name, ERR_NICKNAMEINUSE, client.nick, msg.Params[0], "Nickname is already in use")
return false return false
} }