summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Matveev <stargrave@stargrave.org>2015-11-05 17:04:52 +0300
committerSergey Matveev <stargrave@stargrave.org>2015-11-05 17:04:52 +0300
commitf93640a33547bad6537d2f490e1123c76720f7ff (patch)
treef04fa0c798c01a69b299606280ace88e2f4fd9b6
parentb640107b1fd5f1013d59e26ff0102aeb0b3f5f99 (diff)
downloadgoircd-f93640a33547bad6537d2f490e1123c76720f7ff.tar.xz
Force lowercase nicknames1.3
-rw-r--r--daemon.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon.go b/daemon.go
index 0896add..b795a0c 100644
--- a/daemon.go
+++ b/daemon.go
@@ -162,6 +162,7 @@ func ClientRegister(client *Client, cmd string, cols []string) {
nickname := cols[1]
// Compatibility with some clients prepending colons to nickname
nickname = strings.TrimPrefix(nickname, ":")
+ nickname = strings.ToLower(nickname)
for existingClient := range clients {
if *existingClient.nickname == nickname {
client.ReplyParts("433", "*", nickname, "Nickname is already in use")