Fix sending PASS with spaces or starting with :

Closes #2186
Closes #1550
This commit is contained in:
jkhsjdhjs 2018-05-08 14:54:12 +00:00 committed by Patrick Griffis
parent 5c5aacd9da
commit 57478b6575

View 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,