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

@ -162,7 +162,7 @@ static void sig_remove_rejoin(IRC_CHANNEL_REC *channel)
{
REJOIN_REC *rec;
if (!IS_IRC_CHANNEL(channel) || channel->server == NULL)
if (!IS_IRC_CHANNEL(channel))
return;
rec = rejoin_find(channel->server, channel->name);

View file

@ -132,7 +132,7 @@ static void sig_channel_destroyed(IRC_CHANNEL_REC *channel)
{
g_return_if_fail(channel != NULL);
if (IS_IRC_CHANNEL(channel) && channel->server != NULL &&
if (IS_IRC_CHANNEL(channel) && !channel->server->disconnected &&
!channel->synced)
query_remove_all(channel);
}

View file

@ -192,7 +192,7 @@ static void sig_channel_destroyed(IRC_CHANNEL_REC *channel)
if (!IS_IRC_CHANNEL(channel))
return;
if (channel->server != NULL && !channel->left && !channel->kicked) {
if (!channel->server->disconnected && !channel->left && !channel->kicked) {
/* destroying channel record without actually
having left the channel yet */
signal_emit("command part", 3, "", channel->server, channel);