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:
parent
842f0d05ab
commit
e04ef1ca11
@ -36,7 +36,11 @@ func nickHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
client.SetNickname(nickname)
|
if client.registered {
|
||||||
|
client.ChangeNickname(nickname)
|
||||||
|
} else {
|
||||||
|
client.SetNickname(nickname)
|
||||||
|
}
|
||||||
server.tryRegister(client)
|
server.tryRegister(client)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -77,6 +81,6 @@ func sanickHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
target.SetNickname(nickname)
|
target.ChangeNickname(nickname)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user