summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fe-common/irc/module-formats.c2
-rw-r--r--src/irc/core/channel-rejoin.c22
2 files changed, 13 insertions, 11 deletions
diff --git a/src/fe-common/irc/module-formats.c b/src/fe-common/irc/module-formats.c
index 4aab9c08..b8e330ae 100644
--- a/src/fe-common/irc/module-formats.c
+++ b/src/fe-common/irc/module-formats.c
@@ -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_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 } },
- { "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 } },
{ "not_invited", "You have not been invited to a channel!", 0 },
{ "names", "%K[%g%_Users%_%K(%g$0%K)]%n $1", 2, { 0, 0 } },
diff --git a/src/irc/core/channel-rejoin.c b/src/irc/core/channel-rejoin.c
index 0d50b0b2..7552efcc 100644
--- a/src/irc/core/channel-rejoin.c
+++ b/src/irc/core/channel-rejoin.c
@@ -85,18 +85,20 @@ static void channel_rejoin(IRC_SERVER_REC *server, const char *channel)
g_free_and_null(rec->key);
if (channel_have_key(chanrec))
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);
- /* 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);
+ }
- server->rejoin_channels =
- g_slist_append(server->rejoin_channels, 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)