summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkhsjdhjs <leon.moeller@yahoo.de>2018-05-08 14:54:12 +0000
committerPatrick Griffis <tingping@tingping.se>2018-05-08 16:27:18 -0400
commit57478b65758e6b697b1d82ce21075e74aa475efc (patch)
tree6bfd58a935dc37a16914b08099fdb2990185646a
parent5c5aacd9da7d45dfc1644b87de9e2379a1102d6a (diff)
Fix sending PASS with spaces or starting with :
Closes #2186 Closes #1550
-rw-r--r--src/common/proto-irc.c4
1 files changed, 3 insertions, 1 deletions
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,