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
This commit is contained in:
Timo Sirainen 2002-03-31 19:07:23 +00:00 committed by cras
commit bfae72766e
6 changed files with 5 additions and 6 deletions

View file

@ -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);

View file

@ -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;
}