Send "already existing nickname" error to unregistered client, instead of already existing one
This commit is contained in:
parent
60bd9cec0b
commit
87ba38e7f7
@ -158,8 +158,8 @@ func (daemon *Daemon) ClientRegister(client *Client, command string, cols []stri
|
||||
return
|
||||
}
|
||||
nickname := cols[1]
|
||||
for client := range daemon.clients {
|
||||
if client.nickname == nickname {
|
||||
for existing_client := range daemon.clients {
|
||||
if existing_client.nickname == nickname {
|
||||
client.ReplyParts("433", "*", nickname, "Nickname is already in use")
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user