1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Rejoin fixes

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@763 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-10-15 21:14:13 +00:00 committed by cras
parent a2cac63e56
commit 4f997ffe8f
2 changed files with 13 additions and 11 deletions

View File

@ -56,7 +56,7 @@ FORMAT_REC fecommon_irc_formats[] = {
{ "joinerror_bad_mask", "Cannot join to channel %_$0%_ %K(%nBad channel mask%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 } }, { "joinerror_unavail", "Cannot join to channel %_$0%_ %K(%nChannel is temporarily unavailable%K)", 1, { 0 } },
{ "joinerror_duplicate", "Channel %_$0%_ already exists - cannot create it", 1, { 0 } }, { "joinerror_duplicate", "Channel %_$0%_ already exists - cannot create it", 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 } }, { "channel_rejoin", "Channel %_$0%_ is temporarily unavailable, this is normally because of netsplits. Irssi will now automatically try to rejoin back to this channel until the join is successful. Use /RMREJOINS command if you wish to abort this.", 1, { 0 } },
{ "inviting", "Inviting $0 to %_$1", 2, { 0, 0 } }, { "inviting", "Inviting $0 to %_$1", 2, { 0, 0 } },
{ "not_invited", "You have not been invited to a channel!", 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 } }, { "names", "%K[%g%_Users%_%K(%g$0%K)]%n $1", 2, { 0, 0 } },

View File

@ -85,9 +85,7 @@ static void channel_rejoin(IRC_SERVER_REC *server, const char *channel)
g_free_and_null(rec->key); g_free_and_null(rec->key);
if (channel_have_key(chanrec)) if (channel_have_key(chanrec))
rec->key = g_strdup(chanrec->key); rec->key = g_strdup(chanrec->key);
return; } else {
}
/* new rejoin */ /* new rejoin */
rec = g_new0(REJOIN_REC, 1); rec = g_new0(REJOIN_REC, 1);
rec->channel = g_strdup(channel); rec->channel = g_strdup(channel);
@ -97,6 +95,10 @@ static void channel_rejoin(IRC_SERVER_REC *server, const char *channel)
server->rejoin_channels = server->rejoin_channels =
g_slist_append(server->rejoin_channels, rec); g_slist_append(server->rejoin_channels, rec);
signal_emit("channel rejoin new", 2, server, rec); signal_emit("channel rejoin new", 2, server, rec);
}
chanrec->left = TRUE;
channel_destroy(CHANNEL(chanrec));
} }
static void event_target_unavailable(const char *data, IRC_SERVER_REC *server) static void event_target_unavailable(const char *data, IRC_SERVER_REC *server)