mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-26 05:49:25 +01:00
review fixes
1. Use FAIL instead of WARN 2. Use NICKNAME_RESERVED instead of ACCOUNT_REQUIRED 3. Don't send 433 at all for registered clients, just send the FAIL
This commit is contained in:
parent
67ee36f1ed
commit
46c32094d7
@ -43,8 +43,10 @@ func performNickChange(server *Server, client *Client, target *Client, session *
|
|||||||
}
|
}
|
||||||
} else if err == errNicknameReserved {
|
} else if err == errNicknameReserved {
|
||||||
if !isSanick {
|
if !isSanick {
|
||||||
|
if !client.registered {
|
||||||
rb.Add(nil, server.name, ERR_NICKNAMEINUSE, details.nick, utils.SafeErrorParam(nickname), client.t("Nickname is reserved by a different account"))
|
rb.Add(nil, server.name, ERR_NICKNAMEINUSE, details.nick, utils.SafeErrorParam(nickname), client.t("Nickname is reserved by a different account"))
|
||||||
rb.Add(nil, server.name, "WARN", "NICK", "ACCOUNT_REQUIRED", utils.SafeErrorParam(nickname), client.t("Nickname is reserved by a different account"))
|
}
|
||||||
|
rb.Add(nil, server.name, "FAIL", "NICK", "NICKNAME_RESERVED", utils.SafeErrorParam(nickname), client.t("Nickname is reserved by a different account"))
|
||||||
} else {
|
} else {
|
||||||
rb.Add(nil, server.name, "FAIL", "SANICK", "NICKNAME_RESERVED", utils.SafeErrorParam(nickname), client.t("Nickname is reserved by a different account"))
|
rb.Add(nil, server.name, "FAIL", "SANICK", "NICKNAME_RESERVED", utils.SafeErrorParam(nickname), client.t("Nickname is reserved by a different account"))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user