From e04ef1ca11fb049ef98ca723b2eba930820baca8 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Sat, 13 Aug 2016 20:54:15 +1000 Subject: [PATCH] NICK: Fix setting nicks after registration --- irc/nickname.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/irc/nickname.go b/irc/nickname.go index 26dd5645..549db71e 100644 --- a/irc/nickname.go +++ b/irc/nickname.go @@ -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 }