]> Cypherpunks.ru repositories - goircd.git/blobdiff - daemon.go
Trim possible :-prefix sent by Pidgin in PASS command
[goircd.git] / 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.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")