3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-26 05:49:25 +01:00

Merge pull request #1242 from slingamn/noop_nick_changes

clean up handling of no-op nick changes
This commit is contained in:
Shivaram Lingamneni 2020-08-22 19:48:33 -07:00 committed by GitHub
commit e44a8550df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 6 deletions

View File

@ -232,9 +232,6 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
// successful reattach! // successful reattach!
return newNick, nil, back return newNick, nil, back
} else if currentClient == client && currentClient.Nick() == newNick { } 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 return "", errNoop, false
} }
// analogous checks for skeletons // analogous checks for skeletons

View File

@ -30,9 +30,6 @@ var (
func performNickChange(server *Server, client *Client, target *Client, session *Session, nickname string, rb *ResponseBuffer) error { func performNickChange(server *Server, client *Client, target *Client, session *Session, nickname string, rb *ResponseBuffer) error {
currentNick := client.Nick() currentNick := client.Nick()
details := target.Details() details := target.Details()
if details.nick == nickname {
return nil
}
hadNick := details.nick != "*" hadNick := details.nick != "*"
origNickMask := details.nickMask origNickMask := details.nickMask