mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
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
This commit is contained in:
parent
f850204479
commit
6a3efe49ab
8 changed files with 169 additions and 32 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ FORMAT_REC fecommon_irc_formats[] = {
|
|||
{ "joinerror_bad_key", "Cannot join to channel %_$0%_ %K(%nBad channel key%K)", 1, { 0 } },
|
||||
{ "joinerror_bad_mask", "Cannot join to channel %_$0%_ %K(%nBad channel mask%K)", 1, { 0 } },
|
||||
{ "joinerror_unavail", "Cannot join to channel %_$0%_ %K(%nChannel is temporarily unavailable%K)", 1, { 0 } },
|
||||
{ "channel_rejoin", "Channel %_$0%_ is temporarily unavailable, this is normally because of netsplits. Irssi will now automatically try to rejoin to this channel until the join is successfull. Use /RMREJOINS command if you wish to abort this.", 1, { 0 } },
|
||||
{ "inviting", "Inviting $0 to %_$1", 2, { 0, 0 } },
|
||||
{ "not_invited", "You have not been invited to a channel!", 0 },
|
||||
{ "names", "%K[%g%_Users%_%K(%g$0%K)]%n $1", 2, { 0, 0 } },
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ enum {
|
|||
IRCTXT_JOINERROR_BAD_KEY,
|
||||
IRCTXT_JOINERROR_BAD_MASK,
|
||||
IRCTXT_JOINERROR_UNAVAIL,
|
||||
IRCTXT_CHANNEL_REJOIN,
|
||||
IRCTXT_INVITING,
|
||||
IRCTXT_NOT_INVITED,
|
||||
IRCTXT_NAMES,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue