summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Busse <mail@baerlin.eu>2015-09-28 06:22:17 +0200
committerBjörn Busse <mail@baerlin.eu>2015-09-28 06:22:17 +0200
commit5a17f44b24340dc970bbbbfb7420fb86f88837b7 (patch)
treedeb82309d14d8173634c71842931494e87cac1f2
parentb67868201041359c456457b62910866a8e072b2b (diff)
downloadgoircd-5a17f44b24340dc970bbbbfb7420fb86f88837b7.tar.xz
Increase client compatibility - let Quassel IRC users join
Quassel prefixes the nickname in the NICK command with a colon. This seems to be in accordance with rfc2812. Therefor check if the first character of a nickname is a colon and remove it.
-rw-r--r--daemon.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/daemon.go b/daemon.go
index 6b44039..7af810c 100644
--- a/daemon.go
+++ b/daemon.go
@@ -180,6 +180,9 @@ func (daemon *Daemon) ClientRegister(client *Client, command string, cols []stri
return
}
nickname := cols[1]
+ if (strings.HasPrefix(nickname, ":")) {
+ nickname = strings.TrimPrefix(nickname, ":")
+ }
for existingClient := range daemon.clients {
if existingClient.nickname == nickname {
client.ReplyParts("433", "*", nickname, "Nickname is already in use")