1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

irc: add a condition for colon before the password in PASS message (issue #602)

Some weird IRC servers may refuse a PASS command with a colon, so we
send a colon only if the password contains spaces or begins with a
colon.
This commit is contained in:
Sébastien Helleu
2015-11-24 20:26:06 +01:00
parent 9e9dd27bb3
commit 4fca6c58c8
2 changed files with 9 additions and 2 deletions
+7 -1
View File
@@ -3328,7 +3328,13 @@ irc_server_login (struct t_irc_server *server)
server, IRC_SERVER_OPTION_CAPABILITIES);
if (password && password[0])
irc_server_sendf (server, 0, NULL, "PASS :%s", password);
{
irc_server_sendf (
server, 0, NULL,
"PASS %s%s",
((password[0] == ':') || (strchr (password, ' '))) ? ":" : "",
password);
}
if (!server->nick)
{