This commit is contained in:
Shivaram Lingamneni 2020-05-17 13:39:37 -04:00
parent 1ab06949bf
commit a397756882
2 changed files with 7 additions and 0 deletions

View file

@ -233,6 +233,11 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
currentClient.SetNames("user", realname, true)
// successful reattach!
return newNick, nil
} 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
}
// analogous checks for skeletons
skeletonHolder := clients.bySkeleton[newSkeleton]