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:
parent
a2cac63e56
commit
4f997ffe8f
@ -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 } },
|
||||||
|
@ -85,18 +85,20 @@ 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 */
|
||||||
|
rec = g_new0(REJOIN_REC, 1);
|
||||||
|
rec->channel = g_strdup(channel);
|
||||||
|
if (channel_have_key(chanrec))
|
||||||
|
rec->key = g_strdup(chanrec->key);
|
||||||
|
|
||||||
|
server->rejoin_channels =
|
||||||
|
g_slist_append(server->rejoin_channels, rec);
|
||||||
|
signal_emit("channel rejoin new", 2, server, rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* new rejoin */
|
chanrec->left = TRUE;
|
||||||
rec = g_new0(REJOIN_REC, 1);
|
channel_destroy(CHANNEL(chanrec));
|
||||||
rec->channel = g_strdup(channel);
|
|
||||||
if (channel_have_key(chanrec))
|
|
||||||
rec->key = g_strdup(chanrec->key);
|
|
||||||
|
|
||||||
server->rejoin_channels =
|
|
||||||
g_slist_append(server->rejoin_channels, rec);
|
|
||||||
signal_emit("channel rejoin new", 2, server, rec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void event_target_unavailable(const char *data, IRC_SERVER_REC *server)
|
static void event_target_unavailable(const char *data, IRC_SERVER_REC *server)
|
||||||
|
Loading…
Reference in New Issue
Block a user