summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-05-03 19:12:43 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-05-03 19:12:43 +0200
commit68ff525d2e5ce4c8e3b4f8ffd4b464aeec28d422 (patch)
treed902b1303a58554d342ca46fa58baa92d399d051
parent7e79dd92ba9f4eab78096d5685cfd613fae25bea (diff)
downloadweechat-68ff525d2e5ce4c8e3b4f8ffd4b464aeec28d422.zip
relay/api: do not relay any signal received on a relay buffer
This fixes a creation of multiple fset buffers on remote when /fset is used on the server.
-rw-r--r--src/plugins/relay/api/relay-api-protocol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/relay/api/relay-api-protocol.c b/src/plugins/relay/api/relay-api-protocol.c
index e4c0ec729..d56391b93 100644
--- a/src/plugins/relay/api/relay-api-protocol.c
+++ b/src/plugins/relay/api/relay-api-protocol.c
@@ -95,7 +95,7 @@ relay_api_protocol_signal_buffer_cb (const void *pointer, void *data,
|| (strcmp (signal, "buffer_closing") == 0))
{
ptr_buffer = (struct t_gui_buffer *)signal_data;
- if (!ptr_buffer)
+ if (!ptr_buffer || relay_buffer_is_relay (ptr_buffer))
return WEECHAT_RC_OK;
lines = (strcmp (signal, "buffer_opened") == 0) ? LONG_MIN : 0;
@@ -167,6 +167,9 @@ relay_api_protocol_hsignal_nicklist_cb (const void *pointer, void *data,
if (!ptr_parent_group)
return WEECHAT_RC_OK;
+ if (!ptr_buffer || relay_buffer_is_relay (ptr_buffer))
+ return WEECHAT_RC_OK;
+
if ((strcmp (signal, "nicklist_group_added") == 0)
|| (strcmp (signal, "nicklist_group_changed") == 0)
|| (strcmp (signal, "nicklist_group_removing") == 0))