1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

irc: do not display first parameter in numeric command when it is "*"

This commit is contained in:
Sébastien Helleu
2021-10-17 20:25:05 +02:00
parent cde0d5f7a5
commit 2ca6420e17
2 changed files with 7 additions and 2 deletions
+4 -2
View File
@@ -3149,7 +3149,8 @@ IRC_PROTOCOL_CALLBACK(numeric)
IRC_PROTOCOL_MIN_PARAMS(1);
arg_text = (irc_server_strcasecmp (server, server->nick, params[0]) == 0) ?
arg_text = ((irc_server_strcasecmp (server, server->nick, params[0]) == 0)
|| (strcmp (params[0], "*") == 0)) ?
1 : 0;
str_params = irc_protocol_string_params (params, arg_text, num_params - 1);
@@ -6910,7 +6911,8 @@ IRC_PROTOCOL_CALLBACK(901)
* Callback for the IRC commands "903" and "907" (SASL OK).
*
* Commands look like:
* 903 nick :SASL authentication successful
* 903 nick :Authentication successful
* 903 * :Authentication successful
*/
IRC_PROTOCOL_CALLBACK(sasl_end_ok)
@@ -4065,6 +4065,9 @@ TEST(IrcProtocolWithServer, 903_907)
CHECK_SRV("-- ok");
RECV(":server 903 alice :SASL authentication successful");
CHECK_SRV("-- SASL authentication successful");
RECV(":server 903 * :SASL authentication successful");
CHECK_SRV("-- SASL authentication successful");
RECV(":server 907 alice ok");
CHECK_SRV("-- ok");