From 57478b65758e6b697b1d82ce21075e74aa475efc Mon Sep 17 00:00:00 2001 From: jkhsjdhjs Date: Tue, 8 May 2018 14:54:12 +0000 Subject: Fix sending PASS with spaces or starting with : Closes #2186 Closes #1550 --- src/common/proto-irc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index 9a53ed2e..776d1434 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -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, -- cgit 1.4.1