summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-05-14 15:28:19 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-05-14 15:33:37 +0200
commita6b8c95519033e484ce3b0a7c21278d35690403d (patch)
treea3bf108c507453ad453606b2db6443b3712d9cb4 /src/plugins/irc
parent060cb48094f6a9d187d4645ecb1ec4cd4f374931 (diff)
downloadweechat-a6b8c95519033e484ce3b0a7c21278d35690403d.zip
irc: do not display multiline message if capability "draft/multiline" is not enabled (issue #1923)
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-batch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-batch.c b/src/plugins/irc/irc-batch.c
index 87b51b474..9f5bc63c9 100644
--- a/src/plugins/irc/irc-batch.c
+++ b/src/plugins/irc/irc-batch.c
@@ -496,8 +496,10 @@ irc_batch_modifier_cb (const void *pointer, void *data,
if (items && (num_items > 1))
{
ptr_server = irc_server_search (items[0]);
- if (ptr_server && (num_items > 2)
- && (strcmp (items[1], "draft/multiline") == 0))
+ if (ptr_server
+ && (num_items > 2)
+ && (strcmp (items[1], "draft/multiline") == 0)
+ && weechat_hashtable_has_key (ptr_server->cap_list, "draft/multiline"))
{
result = irc_batch_process_multiline (ptr_server, string, items[2]);
}