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:
commit
e44a8550df
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user