From: Sergey Matveev Date: Thu, 7 Apr 2016 15:33:27 +0000 (+0300) Subject: Trim possible :-prefix sent by Pidgin in PASS command X-Git-Tag: 1.5^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=goircd.git;a=commitdiff_plain;h=a9e5e5cd2f6acb7d5f243e85f71b3cc0e27137df Trim possible :-prefix sent by Pidgin in PASS command --- diff --git a/daemon.go b/daemon.go index d46ee07..0f2b929 100644 --- a/daemon.go +++ b/daemon.go @@ -167,7 +167,8 @@ func ClientRegister(client *Client, cmd string, cols []string) { client.ReplyNotEnoughParameters("PASS") return } - client.password = &cols[1] + password := strings.TrimPrefix(cols[1], ":") + client.password = &password case "NICK": if len(cols) == 1 || len(cols[1]) < 1 { client.ReplyParts("431", "No nickname given")