Send "already existing nickname" error to unregistered client, instead of already existing one

This commit is contained in:
Sergey Matveev 2014-07-03 11:08:42 +04:00
parent 60bd9cec0b
commit 87ba38e7f7

View File

@ -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
}