mirror of
https://github.com/ergochat/ergo.git
synced 2025-02-19 23:20:40 +01:00
Review fixes
This commit is contained in:
parent
8ecf96d447
commit
457b7eaf11
@ -2469,9 +2469,9 @@ func userHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
|||||||
|
|
||||||
err := client.SetNames(msg.Params[0], msg.Params[3], false)
|
err := client.SetNames(msg.Params[0], msg.Params[3], false)
|
||||||
if err == errInvalidUsername {
|
if err == errInvalidUsername {
|
||||||
// if client's using a unicode nick or something weird, let's just set 'em up with a blank username instead.
|
// if client's using a unicode nick or something weird, let's just set 'em up with a stock username instead.
|
||||||
// fixes clients that just use their nick as a username so they can still use the interesting nick
|
// fixes clients that just use their nick as a username so they can still use the interesting nick
|
||||||
if client.preregNick != "" && !isIdent(client.preregNick) {
|
if client.preregNick == msg.Params[0] {
|
||||||
client.SetNames("user", msg.Params[3], false)
|
client.SetNames("user", msg.Params[3], false)
|
||||||
} else {
|
} else {
|
||||||
rb.Add(nil, server.name, ERR_INVALIDUSERNAME, client.t("Malformed username"))
|
rb.Add(nil, server.name, ERR_INVALIDUSERNAME, client.t("Malformed username"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user