summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Matveev <stargrave@stargrave.org>2016-04-07 18:33:27 +0300
committerSergey Matveev <stargrave@stargrave.org>2016-04-07 18:33:27 +0300
commita9e5e5cd2f6acb7d5f243e85f71b3cc0e27137df (patch)
tree5a0200df3c1c9601379089e8e7f1810dbb9afb20
parent9f6cca6c56d12478afb026ca4bd4ec3a688d6c9b (diff)
downloadgoircd-a9e5e5cd2f6acb7d5f243e85f71b3cc0e27137df.tar.xz
Trim possible :-prefix sent by Pidgin in PASS command1.5
-rw-r--r--daemon.go3
1 files changed, 2 insertions, 1 deletions
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")