From 5a17f44b24340dc970bbbbfb7420fb86f88837b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Busse?= Date: Mon, 28 Sep 2015 06:22:17 +0200 Subject: [PATCH] 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. --- daemon.go | 3 +++ 1 file changed, 3 insertions(+) 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") -- 2.44.0