summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-03-31 19:07:23 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-03-31 19:07:23 +0000
commitbfae72766ea2da6db76f6f23bccaf7a5dd708c94 (patch)
tree25ea17fb67008ee938dc15d2f94fbb394fb41993 /src/irc
parentdc4b7456dcb1f6806b7a68188cb4f1db78bf75c3 (diff)
downloadirssi-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/irc')
-rw-r--r--src/irc/core/channel-rejoin.c2
-rw-r--r--src/irc/core/channels-query.c2
-rw-r--r--src/irc/core/irc-channels.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/irc/core/channel-rejoin.c b/src/irc/core/channel-rejoin.c
index 174c1c4e..582f1d0c 100644
--- a/src/irc/core/channel-rejoin.c
+++ b/src/irc/core/channel-rejoin.c
@@ -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);
diff --git a/src/irc/core/channels-query.c b/src/irc/core/channels-query.c
index 06cfdb3a..bc5ebf3a 100644
--- a/src/irc/core/channels-query.c
+++ b/src/irc/core/channels-query.c
@@ -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);
}
diff --git a/src/irc/core/irc-channels.c b/src/irc/core/irc-channels.c
index 75741355..59726d22 100644
--- a/src/irc/core/irc-channels.c
+++ b/src/irc/core/irc-channels.c
@@ -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);