diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-16 10:14:15 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-17 21:28:31 +0200 |
commit | de567aa1d312bce9e147fa666dd11173b9c2af58 (patch) | |
tree | ff0c915385177725e08303374d355ac5b8416a4d /src/plugins/irc/irc-protocol.c | |
parent | a5e470a16a80a95ca396c8023ca4b06e2ae4d86b (diff) | |
download | weechat-de567aa1d312bce9e147fa666dd11173b9c2af58.zip |
irc: use parsed command parameters in "331" command callback
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 4183497e3..6a7c714c2 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -4573,7 +4573,7 @@ IRC_PROTOCOL_CALLBACK(330_343) * Callback for the IRC command "331": no topic for channel. * * Command looks like: - * :server 331 mynick #channel :There isn't a topic. + * 331 mynick #channel :There isn't a topic. */ IRC_PROTOCOL_CALLBACK(331) @@ -4581,19 +4581,19 @@ IRC_PROTOCOL_CALLBACK(331) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - IRC_PROTOCOL_MIN_ARGS(4); + IRC_PROTOCOL_MIN_PARAMS(2); - ptr_channel = irc_channel_search (server, argv[3]); + ptr_channel = irc_channel_search (server, params[1]); ptr_buffer = (ptr_channel) ? ptr_channel->buffer : server->buffer; weechat_printf_date_tags ( irc_msgbuffer_get_target_buffer ( - server, argv[3], command, NULL, ptr_buffer), + server, params[1], command, NULL, ptr_buffer), date, irc_protocol_tags (command, "irc_numeric", NULL, NULL), _("%sNo topic set for channel %s%s"), weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, - argv[3]); + params[1]); return WEECHAT_RC_OK; } |