1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 15:53:12 +02:00

irc: ignore BATCH commands when capability "batch" is not enabled (issue #1292)

This commit is contained in:
Sébastien Helleu
2023-05-14 15:04:08 +02:00
parent 283c9d7ccf
commit 060cb48094
2 changed files with 122 additions and 3 deletions
+6 -1
View File
@@ -668,6 +668,10 @@ IRC_PROTOCOL_CALLBACK(batch)
IRC_PROTOCOL_MIN_PARAMS(1);
/* do nothing (but ignore BATCH) if capability "batch" is not enabled */
if (!weechat_hashtable_has_key (server->cap_list, "batch"))
return WEECHAT_RC_OK;
if (params[0][0] == '+')
{
/* start batch */
@@ -7784,7 +7788,8 @@ irc_protocol_recv_command (struct t_irc_server *server,
/* if message is not BATCH but has a batch tag, just store it for later */
if (!ignore_batch_tag
&& hash_tags
&& (weechat_strcasecmp (msg_command, "batch") != 0))
&& (weechat_strcasecmp (msg_command, "batch") != 0)
&& weechat_hashtable_has_key (server->cap_list, "batch"))
{
ptr_batch_ref = weechat_hashtable_get (hash_tags, "batch");
if (ptr_batch_ref)