mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 21:39:25 +01:00
clean up handling of no-op nick changes
This commit is contained in:
parent
c8e2dcb1e9
commit
b1c3a1467a
@ -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