|
@@ -2469,7 +2469,13 @@ func userHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
2469
|
2469
|
|
2470
|
2470
|
err := client.SetNames(msg.Params[0], msg.Params[3], false)
|
2471
|
2471
|
if err == errInvalidUsername {
|
2472
|
|
- rb.Add(nil, server.name, ERR_INVALIDUSERNAME, client.t("Malformed username"))
|
|
2472
|
+ // if client's using a unicode nick or something weird, let's just set 'em up with a stock username instead.
|
|
2473
|
+ // fixes clients that just use their nick as a username so they can still use the interesting nick
|
|
2474
|
+ if client.preregNick == msg.Params[0] {
|
|
2475
|
+ client.SetNames("user", msg.Params[3], false)
|
|
2476
|
+ } else {
|
|
2477
|
+ rb.Add(nil, server.name, ERR_INVALIDUSERNAME, client.t("Malformed username"))
|
|
2478
|
+ }
|
2473
|
2479
|
}
|
2474
|
2480
|
|
2475
|
2481
|
return false
|