From 4d8df89bb5b56bd3ca7b281726722f9d21fefdf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 24 Apr 2022 21:49:31 +0200 Subject: [PATCH] irc: fix add of channel to autojoin option when joining a channel with a buffer still opened --- ChangeLog.adoc | 1 + src/plugins/irc/irc-command.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 1d0d53f10..4873ca666 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -29,6 +29,7 @@ Bug fixes:: * core: fix bad window size on startup with some terminals like https://github.com/kovidgoyal/kitty[kitty] (issue #1769) * buflist: fix memory leak when reading config and changing option buflist.look.sort + * irc: fix add of channel to autojoin option when joining a channel with a buffer still opened * relay: fix save of channels in autojoin option when JOIN and PART commands are received from an IRC relay client (issue #1771) * trigger: add `${buffer.notify} > 0` in conditions of default trigger "beep" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index d0dca1d1f..36b4adeec 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -2893,10 +2893,10 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments, } } if (manual_join - && !irc_channel_search (server, pos_channel) && (strcmp (pos_channel, "0") != 0)) { - if (weechat_config_boolean (irc_config_look_buffer_open_before_join)) + if (!irc_channel_search (server, pos_channel) + && weechat_config_boolean (irc_config_look_buffer_open_before_join)) { /* * open the channel buffer immediately (do not wait