diff options
author | Timo Sirainen <cras@irssi.org> | 2002-03-31 19:07:23 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-03-31 19:07:23 +0000 |
commit | bfae72766ea2da6db76f6f23bccaf7a5dd708c94 (patch) | |
tree | 25ea17fb67008ee938dc15d2f94fbb394fb41993 /src/core | |
parent | dc4b7456dcb1f6806b7a68188cb4f1db78bf75c3 (diff) | |
download | irssi-bfae72766ea2da6db76f6f23bccaf7a5dd708c94.zip |
Don't set channel->server = NULL when disconnecting, so scripts can still
use it in eg. "channel destroyed". Patch by Qrczak
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2648 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/channels.c | 2 | ||||
-rw-r--r-- | src/core/servers.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/core/channels.c b/src/core/channels.c index 06bf0c41..1884c402 100644 --- a/src/core/channels.c +++ b/src/core/channels.c @@ -64,7 +64,7 @@ void channel_destroy(CHANNEL_REC *channel) channel->destroying = TRUE; channels = g_slist_remove(channels, channel); - if (channel->server != NULL) + if (!channel->server->disconnected) channel->server->channels = g_slist_remove(channel->server->channels, channel); signal_emit("channel destroyed", 1, channel); diff --git a/src/core/servers.c b/src/core/servers.c index a5a8c701..f99b238f 100644 --- a/src/core/servers.c +++ b/src/core/servers.c @@ -331,7 +331,6 @@ static int server_remove_channels(SERVER_REC *server) for (tmp = server->channels; tmp != NULL; tmp = tmp->next) { CHANNEL_REC *channel = tmp->data; - channel->server = NULL; channel_destroy(channel); found = TRUE; } |