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
|
return
|
||||||
}
|
}
|
||||||
nickname := cols[1]
|
nickname := cols[1]
|
||||||
for client := range daemon.clients {
|
for existing_client := range daemon.clients {
|
||||||
if client.nickname == nickname {
|
if existing_client.nickname == nickname {
|
||||||
client.ReplyParts("433", "*", nickname, "Nickname is already in use")
|
client.ReplyParts("433", "*", nickname, "Nickname is already in use")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user