diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-11-21 20:32:25 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-11-21 20:35:32 +0100 |
commit | e743e731ecbedb2e92a1ded8f1f545557917af16 (patch) | |
tree | 9197ecc7d7acf1f555f9cee8defd1513337a1330 /src/plugins/irc/irc-command.c | |
parent | 64aae8b95993bdfa81c822a1280c217a07d48d4b (diff) | |
download | weechat-e743e731ecbedb2e92a1ded8f1f545557917af16.zip |
irc: do not automatically open a channel with name "0" (closes #1429)
"0" is a special channel name which causes a client to leave all the channels
it is presently on.
Note that when option irc.look.buffer_open_before_join is on, WeeChat may still
open channel buffers with an invalid channel name like "1". The server should
reply something like that, displayed on the server buffer:
1: No such channel
Diffstat (limited to 'src/plugins/irc/irc-command.c')
-rw-r--r-- | src/plugins/irc/irc-command.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index e1847aeab..6556a9493 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -2636,7 +2636,8 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments, } if (manual_join && weechat_config_boolean (irc_config_look_buffer_open_before_join) - && !irc_channel_search (server, pos_channel)) + && !irc_channel_search (server, pos_channel) + && (strcmp (pos_channel, "0") != 0)) { /* * open the channel buffer immediately (do not wait for the |