mirror of
https://github.com/ergochat/ergo.git
synced 2026-01-26 21:39:21 -08:00
NICK: Fix setting nicks after registration
This commit is contained in:
parent
842f0d05ab
commit
e04ef1ca11
1 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue