Force lowercase nicknames
This commit is contained in:
parent
b640107b1f
commit
f93640a335
@ -162,6 +162,7 @@ func ClientRegister(client *Client, cmd string, cols []string) {
|
|||||||
nickname := cols[1]
|
nickname := cols[1]
|
||||||
// Compatibility with some clients prepending colons to nickname
|
// Compatibility with some clients prepending colons to nickname
|
||||||
nickname = strings.TrimPrefix(nickname, ":")
|
nickname = strings.TrimPrefix(nickname, ":")
|
||||||
|
nickname = strings.ToLower(nickname)
|
||||||
for existingClient := range clients {
|
for existingClient := range clients {
|
||||||
if *existingClient.nickname == nickname {
|
if *existingClient.nickname == nickname {
|
||||||
client.ReplyParts("433", "*", nickname, "Nickname is already in use")
|
client.ReplyParts("433", "*", nickname, "Nickname is already in use")
|
||||||
|
Loading…
Reference in New Issue
Block a user