summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-03-30 21:39:47 +0200
committerSébastien Helleu <flashcode@flashtux.org>2022-03-30 21:41:14 +0200
commitf39553152f6472d3f5351ddfce5dd77a12c6a628 (patch)
tree1e793d6efa34e88da76335856fa8881fa40eea5f
parent89f49040f37c3b75de13382d021813b83e5e801f (diff)
downloadweechat-f39553152f6472d3f5351ddfce5dd77a12c6a628.zip
relay: fix save of channels when JOIN/PART are received from an IRC relay client (closes #1771)
-rw-r--r--ChangeLog.adoc1
-rw-r--r--src/plugins/relay/irc/relay-irc.c16
2 files changed, 16 insertions, 1 deletions
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",