]> jfr.im git - irc/weechat/weechat.git/commitdiff
irc: fix add of channel to autojoin option when joining a channel with a buffer still...
authorSébastien Helleu <redacted>
Sun, 24 Apr 2022 19:49:31 +0000 (21:49 +0200)
committerSébastien Helleu <redacted>
Sun, 24 Apr 2022 20:09:19 +0000 (22:09 +0200)
ChangeLog.adoc
src/plugins/irc/irc-command.c

index 1d0d53f108f04c0414b1e432edd959ec800e3757..4873ca66659fbf3b305a1c70b0e92766e43df08f 100644 (file)
@@ -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"
 
index d0dca1d1f310dd3b3fff41ed5c932beb07565004..36b4adeec96663ee7a168db862efe637999495b7 100644 (file)
@@ -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