mirror of
https://github.com/weechat/weechat.git
synced 2026-07-01 15:26:37 +02:00
irc: use parsed command parameters in "331" command callback
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user