mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 13:29:27 +01:00
fix FAIL REGISTER INVALID_USERNAME case
This commit is contained in:
parent
a2b5548c8b
commit
75f89a9f1f
@ -2528,8 +2528,9 @@ func registerHandler(server *Server, client *Client, msg ircmsg.Message, rb *Res
|
|||||||
}
|
}
|
||||||
// check that accountName is valid as a non-final parameter;
|
// check that accountName is valid as a non-final parameter;
|
||||||
// this is necessary for us to be valid and it will prevent us from emitting invalid error lines
|
// this is necessary for us to be valid and it will prevent us from emitting invalid error lines
|
||||||
if accountName == "*" || accountName != utils.SafeErrorParam(accountName) {
|
nickErrorParam := utils.SafeErrorParam(accountName)
|
||||||
rb.Add(nil, server.name, "FAIL", "REGISTER", "INVALID_USERNAME", accountName, client.t("Username invalid or not given"))
|
if accountName == "*" || accountName != nickErrorParam {
|
||||||
|
rb.Add(nil, server.name, "FAIL", "REGISTER", "INVALID_USERNAME", nickErrorParam, client.t("Username invalid or not given"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user