3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 03:49:27 +01:00

partial fix for #1933

If the nickname must equal the account name (because always-on or
force-nick-equals-account), the correct error response to an empty
or otherwise invalid nickname is the usual "You must use your account
name as your nickname".
This commit is contained in:
Shivaram Lingamneni 2022-04-24 00:31:20 -04:00
parent 504cc44bf7
commit 7201f14b8b

View File

@ -117,7 +117,7 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
} }
if useAccountName { if useAccountName {
if registered && newNick != accountName && newNick != "" { if registered && newNick != accountName {
return "", errNickAccountMismatch, false return "", errNickAccountMismatch, false
} }
newNick = accountName newNick = accountName