From 68ff525d2e5ce4c8e3b4f8ffd4b464aeec28d422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 3 May 2024 19:12:43 +0200 Subject: 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. --- src/plugins/relay/api/relay-api-protocol.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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)) -- cgit v1.2.3