diff options
author | Timo Sirainen <cras@irssi.org> | 2000-10-14 00:45:16 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-10-14 00:45:16 +0000 |
commit | 6a3efe49ab7b41062650da894eccc2d4be0b8f45 (patch) | |
tree | e60a8f2eaaef04f87d9c8752f2742acc4f5e41bb /src/fe-common/irc/fe-irc-channels.c | |
parent | f850204479e84c3112b6353da48a5a1ec81bb1fe (diff) | |
download | irssi-6a3efe49ab7b41062650da894eccc2d4be0b8f45.zip |
Autorejoin when join temporarily fails because of netsplit is handled
better now. Irssi prints a nice message about it only once and you can
abort it with /RMREJOINS command.
"channel query" -> "channel joined"
channels_join() must not use cmd_return|param_error() commands since we
don't necessarily call it from command handler and signal_stop() could
cause some damage.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@739 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-channels.c')
-rw-r--r-- | src/fe-common/irc/fe-irc-channels.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/fe-common/irc/fe-irc-channels.c b/src/fe-common/irc/fe-irc-channels.c index bb22e54d..8a7de92d 100644 --- a/src/fe-common/irc/fe-irc-channels.c +++ b/src/fe-common/irc/fe-irc-channels.c @@ -19,11 +19,22 @@ */ #include "module.h" +#include "module-formats.h" #include "signals.h" #include "commands.h" +#include "levels.h" #include "servers.h" #include "irc.h" +#include "channel-rejoin.h" + +static void sig_channel_rejoin(IRC_SERVER_REC *server, REJOIN_REC *rec) +{ + g_return_if_fail(rec != NULL); + + printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, + IRCTXT_CHANNEL_REJOIN, rec->channel); +} static void cmd_channel(const char *data, SERVER_REC *server) { @@ -35,10 +46,12 @@ static void cmd_channel(const char *data, SERVER_REC *server) void fe_irc_channels_init(void) { + signal_add("channel rejoin new", (SIGNAL_FUNC) sig_channel_rejoin); command_bind("channel", NULL, (SIGNAL_FUNC) cmd_channel); } void fe_irc_channels_deinit(void) { + signal_remove("channel rejoin new", (SIGNAL_FUNC) sig_channel_rejoin); command_unbind("channel", (SIGNAL_FUNC) cmd_channel); } |