irc: quote NICK command argument sent to the server only if there's a ":" in the nick (closes #1376, issue #1319)
This commit is contained in:
parent
82a92bd4e9
commit
fd592c2323
@ -32,6 +32,7 @@ Bug fixes::
|
||||
* core: replace newlines by spaces in argument "completion" of function hook_command (issue #538)
|
||||
* core: replace char "," by "~" in color codes to separate foreground from background (issue #1264)
|
||||
* alias: remove default aliases /AME and /AMSG (issue #1355)
|
||||
* irc: quote NICK command argument sent to the server only if there's a ":" in the nick (issue #1376, issue #1319)
|
||||
* irc: return all arguments in the PONG response to a PING (issue #1369)
|
||||
* irc: disable server reconnection when the server buffer is closed (issue #236)
|
||||
* irc: strip spaces at beginning/end of addresses in server option "addresses" (issue #195)
|
||||
|
@ -3543,7 +3543,9 @@ irc_send_nick_server (struct t_irc_server *server, const char *nickname)
|
||||
if (server->is_connected)
|
||||
{
|
||||
irc_server_sendf (server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL,
|
||||
"NICK :%s", nickname);
|
||||
"NICK %s%s",
|
||||
(nickname && strchr (nickname, ':')) ? ":" : "",
|
||||
nickname);
|
||||
}
|
||||
else
|
||||
irc_server_set_nick (server, nickname);
|
||||
|
@ -5446,7 +5446,11 @@ IRC_PROTOCOL_CALLBACK(432)
|
||||
|
||||
irc_server_set_nick (server, alternate_nick);
|
||||
|
||||
irc_server_sendf (server, 0, NULL, "NICK :%s", server->nick);
|
||||
irc_server_sendf (
|
||||
server, 0, NULL,
|
||||
"NICK %s%s",
|
||||
(server->nick && strchr (server->nick, ':')) ? ":" : "",
|
||||
server->nick);
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
@ -5490,7 +5494,11 @@ IRC_PROTOCOL_CALLBACK(433)
|
||||
|
||||
irc_server_set_nick (server, alternate_nick);
|
||||
|
||||
irc_server_sendf (server, 0, NULL, "NICK :%s", server->nick);
|
||||
irc_server_sendf (
|
||||
server, 0, NULL,
|
||||
"NICK %s%s",
|
||||
(server->nick && strchr (server->nick, ':')) ? ":" : "",
|
||||
server->nick);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5548,7 +5556,11 @@ IRC_PROTOCOL_CALLBACK(437)
|
||||
|
||||
irc_server_set_nick (server, alternate_nick);
|
||||
|
||||
irc_server_sendf (server, 0, NULL, "NICK :%s", server->nick);
|
||||
irc_server_sendf (
|
||||
server, 0, NULL,
|
||||
"NICK %s%s",
|
||||
(server->nick && strchr (server->nick, ':')) ? ":" : "",
|
||||
server->nick);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3760,8 +3760,9 @@ irc_server_login (struct t_irc_server *server)
|
||||
weechat_string_replace (username, " ", "_") : strdup ("weechat");
|
||||
irc_server_sendf (
|
||||
server, 0, NULL,
|
||||
"NICK :%s\n"
|
||||
"NICK %s%s\n"
|
||||
"USER %s 0 * :%s",
|
||||
(server->nick && strchr (server->nick, ':')) ? ":" : "",
|
||||
server->nick,
|
||||
(username2) ? username2 : "weechat",
|
||||
(realname && realname[0]) ? realname : ((username2) ? username2 : "weechat"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user