diff options
author | Simmo Saan <simmo.saan@gmail.com> | 2018-09-09 20:37:30 +0300 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-05-18 13:46:43 +0200 |
commit | 6edc88f7d6cb42d776b39f23e620060a910b490e (patch) | |
tree | fc494dc0c8460ac2ab375dddb438f4bace3afa83 /src/plugins/irc | |
parent | de3ee174e41b70490c4bfaa335c3710f22619736 (diff) | |
download | weechat-6edc88f7d6cb42d776b39f23e620060a910b490e.zip |
irc: use key when /join-ing in open channel buffer
Diffstat (limited to 'src/plugins/irc')
-rw-r--r-- | src/plugins/irc/irc-channel.c | 7 | ||||
-rw-r--r-- | src/plugins/irc/irc-channel.h | 5 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 3 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 1f9f53e46..072d8122d 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -1417,7 +1417,8 @@ irc_channel_join_smart_filtered_unmask (struct t_irc_channel *channel, */ void -irc_channel_rejoin (struct t_irc_server *server, struct t_irc_channel *channel) +irc_channel_rejoin (struct t_irc_server *server, struct t_irc_channel *channel, + int manual_join, int noswitch) { char join_args[1024]; @@ -1426,7 +1427,7 @@ irc_channel_rejoin (struct t_irc_server *server, struct t_irc_channel *channel) (channel->key) ? " " : "", (channel->key) ? channel->key : ""); - irc_command_join_server (server, join_args, 0, 1); + irc_command_join_server (server, join_args, manual_join, noswitch); } /* @@ -1463,7 +1464,7 @@ irc_channel_autorejoin_cb (const void *pointer, void *data, if (ptr_server_found && (ptr_channel_arg->hook_autorejoin)) { - irc_channel_rejoin (ptr_server_found, ptr_channel_arg); + irc_channel_rejoin (ptr_server_found, ptr_channel_arg, 0, 1); ptr_channel_arg->hook_autorejoin = NULL; } diff --git a/src/plugins/irc/irc-channel.h b/src/plugins/irc/irc-channel.h index 3c3e3926b..93944ff8f 100644 --- a/src/plugins/irc/irc-channel.h +++ b/src/plugins/irc/irc-channel.h @@ -174,8 +174,9 @@ extern void irc_channel_join_smart_filtered_remove (struct t_irc_channel *channe const char *nick); extern void irc_channel_join_smart_filtered_unmask (struct t_irc_channel *channel, const char *nick); -extern void irc_channel_rejoin (struct t_irc_server *server, - struct t_irc_channel *channel); +extern void +irc_channel_rejoin (struct t_irc_server *server, struct t_irc_channel *channel, + int manual_join, int noswitch); extern int irc_channel_autorejoin_cb (const void *pointer, void *data, int remaining_calls); extern void irc_channel_display_nick_back_in_pv (struct t_irc_server *server, diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index f176f0dd5..2bced3a78 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -3040,8 +3040,7 @@ IRC_COMMAND_CALLBACK(join) if (ptr_channel && (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL) && !ptr_channel->nicks) { - irc_command_join_server (ptr_server, ptr_channel->name, - 1, noswitch); + irc_channel_rejoin (ptr_server, ptr_channel, 1, noswitch); } else { diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index c22fe28af..20a960fb7 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -1952,7 +1952,7 @@ IRC_PROTOCOL_CALLBACK(kick) IRC_SERVER_OPTION_AUTOREJOIN_DELAY) == 0) { /* immediately rejoin if delay is 0 */ - irc_channel_rejoin (server, ptr_channel); + irc_channel_rejoin (server, ptr_channel, 0, 1); } else { |