3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

NICK: Fix setting nicks after registration

This commit is contained in:
Daniel Oaks 2016-08-13 20:54:15 +10:00
parent 842f0d05ab
commit e04ef1ca11

View File

@ -36,7 +36,11 @@ func nickHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
return false
}
client.SetNickname(nickname)
if client.registered {
client.ChangeNickname(nickname)
} else {
client.SetNickname(nickname)
}
server.tryRegister(client)
return false
}
@ -77,6 +81,6 @@ func sanickHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
return false
}
target.SetNickname(nickname)
target.ChangeNickname(nickname)
return false
}