]> Cypherpunks.ru repositories - goircd.git/commitdiff
Trim possible :-prefix sent by Pidgin in PASS command 1.5
authorSergey Matveev <stargrave@stargrave.org>
Thu, 7 Apr 2016 15:33:27 +0000 (18:33 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 7 Apr 2016 15:33:27 +0000 (18:33 +0300)
daemon.go

index d46ee07fe0944ea74e63694bd6787cbb253aeb6e..0f2b9298d35b834a8fbd395397f267af12a47cf1 100644 (file)
--- a/daemon.go
+++ b/daemon.go
@@ -167,7 +167,8 @@ func ClientRegister(client *Client, cmd string, cols []string) {
                        client.ReplyNotEnoughParameters("PASS")
                        return
                }
                        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")
        case "NICK":
                if len(cols) == 1 || len(cols[1]) < 1 {
                        client.ReplyParts("431", "No nickname given")