]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
Fix sending PASS with spaces or starting with :
authorjkhsjdhjs <redacted>
Tue, 8 May 2018 14:54:12 +0000 (14:54 +0000)
committerPatrick Griffis <redacted>
Tue, 8 May 2018 20:27:18 +0000 (16:27 -0400)
Closes #2186
Closes #1550

src/common/proto-irc.c

index 9a53ed2e86199c12b03c888dfc9130e9ff1341c2..776d14342611854979ba129f59097c9e87eb1ac3 100644 (file)
@@ -53,7 +53,9 @@ irc_login (server *serv, char *user, char *realname)
 
        if (serv->password[0] && serv->loginmethod == LOGIN_PASS)
        {
-               tcp_sendf (serv, "PASS %s\r\n", serv->password);
+               tcp_sendf (serv, "PASS %s%s\r\n",
+                       (serv->password[0] == ':' || strchr (serv->password, ' ')) ? ":" : "",
+                       serv->password);
        }
 
        tcp_sendf (serv,