From f39553152f6472d3f5351ddfce5dd77a12c6a628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 30 Mar 2022 21:39:47 +0200 Subject: [PATCH] relay: fix save of channels when JOIN/PART are received from an IRC relay client (closes #1771) --- ChangeLog.adoc | 1 + src/plugins/relay/irc/relay-irc.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 266bfb8ca..6ebe38bb7 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -21,6 +21,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] Bug fixes:: * core: fix bad window size on startup with some terminals like https://github.com/kovidgoyal/kitty[kitty] (issue #1769) + * relay: fix save of channels in autojoin option when JOIN and PART commands are received from an IRC relay client (issue #1771) [[v3.5]] == Version 3.5 (2022-03-27) diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index 9ae450305..e1555cba5 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -1600,7 +1600,21 @@ relay_irc_recv (struct t_relay_client *client, const char *data) } else { - if (irc_command && weechat_strcasecmp (irc_command, "ping") == 0) + if (irc_command && weechat_strcasecmp (irc_command, "join") == 0) + { + relay_irc_input_send (client, NULL, + "priority_high", + "/join %s", + irc_args); + } + else if (irc_command && weechat_strcasecmp (irc_command, "part") == 0) + { + relay_irc_input_send (client, NULL, + "priority_high", + "/part %s", + irc_args); + } + else if (irc_command && weechat_strcasecmp (irc_command, "ping") == 0) { relay_irc_sendf (client, ":%s PONG %s :%s",