diff options
author | Timo Sirainen <cras@irssi.org> | 2000-10-15 21:14:13 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-10-15 21:14:13 +0000 |
commit | 4f997ffe8f60b86ed5a9ae4960654b1b77480615 (patch) | |
tree | 068bd76b0dce02f37dc395ae910dd5b4bd8e1d24 /src/irc/core | |
parent | a2cac63e56d88101cd101f0e37c4b8c741467599 (diff) | |
download | irssi-4f997ffe8f60b86ed5a9ae4960654b1b77480615.zip |
Rejoin fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@763 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core')
-rw-r--r-- | src/irc/core/channel-rejoin.c | 22 |
1 files changed, 12 insertions, 10 deletions
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) |