mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
Merge pull request #1242 from slingamn/noop_nick_changes
clean up handling of no-op nick changes
This commit is contained in:
commit
e44a8550df
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user