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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user