From b1c3a1467a6ae1a509c88755920962bbdeca7fbc Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sat, 22 Aug 2020 22:26:50 -0400 Subject: [PATCH] clean up handling of no-op nick changes --- irc/client_lookup_set.go | 3 --- irc/nickname.go | 3 --- 2 files changed, 6 deletions(-) diff --git a/irc/client_lookup_set.go b/irc/client_lookup_set.go index 1f4fbe82..fb0a72b2 100644 --- a/irc/client_lookup_set.go +++ b/irc/client_lookup_set.go @@ -232,9 +232,6 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick // successful reattach! return newNick, nil, back } else if currentClient == client && currentClient.Nick() == newNick { - // see #1019: normally no-op nick changes are caught earlier, by performNickChange, - // but they are not detected there when force-guest-format is enabled (because - // the proposed nickname is e.g. alice and the current nickname is Guest-alice) return "", errNoop, false } // analogous checks for skeletons diff --git a/irc/nickname.go b/irc/nickname.go index c44d7635..e7e96af5 100644 --- a/irc/nickname.go +++ b/irc/nickname.go @@ -30,9 +30,6 @@ var ( func performNickChange(server *Server, client *Client, target *Client, session *Session, nickname string, rb *ResponseBuffer) error { currentNick := client.Nick() details := target.Details() - if details.nick == nickname { - return nil - } hadNick := details.nick != "*" origNickMask := details.nickMask