From fe6a520fa4545ce6b37ba30bf44b86dc623d8d53 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 14 Apr 2019 22:05:53 -0400 Subject: [PATCH] temporarily assign the client a nick during reattach (So that the registration burst displays correctly) --- irc/client_lookup_set.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/irc/client_lookup_set.go b/irc/client_lookup_set.go index 8af72df7..8a585ffd 100644 --- a/irc/client_lookup_set.go +++ b/irc/client_lookup_set.go @@ -160,7 +160,9 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick if !currentClient.AddSession(session) { return errNicknameInUse } - // successful reattach: + // successful reattach. temporarily assign them the nick they'll have going forward + // (the current `client` will be discarded at the end of command execution) + client.updateNick(currentClient.Nick(), newcfnick, newSkeleton) return nil } // analogous checks for skeletons