diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-15 19:58:19 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-17 21:28:31 +0200 |
commit | 0ea0b24563f91b12fdc77a7d06014cd97c3ac059 (patch) | |
tree | d6a0aa9a20c04934c66fc056e909b0bd988cea18 /src/plugins | |
parent | ec816b4be5c3c5cd0ac3acb64e0f3e453eb1469b (diff) | |
download | weechat-0ea0b24563f91b12fdc77a7d06014cd97c3ac059.zip |
irc: use parsed command parameters in "001" command callback
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 6510dd232..e05ab7142 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -3379,7 +3379,7 @@ IRC_PROTOCOL_CALLBACK(warn) * Callback for the IRC command "001": connected to IRC server. * * Command looks like: - * :server 001 mynick :Welcome to the dancer-ircd Network + * 001 mynick :Welcome to the dancer-ircd Network */ IRC_PROTOCOL_CALLBACK(001) @@ -3389,10 +3389,10 @@ IRC_PROTOCOL_CALLBACK(001) const char *ptr_server_command; int length; - IRC_PROTOCOL_MIN_ARGS(3); + IRC_PROTOCOL_MIN_PARAMS(1); - if (irc_server_strcasecmp (server, server->nick, argv[2]) != 0) - irc_server_set_nick (server, argv[2]); + if (irc_server_strcasecmp (server, server->nick, params[0]) != 0) + irc_server_set_nick (server, params[0]); irc_protocol_cb_numeric (server, date, irc_message, tags, nick, address, host, command, |