diff options
Diffstat (limited to 'modules/chanserv/main/channel.cpp')
-rw-r--r-- | modules/chanserv/main/channel.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/modules/chanserv/main/channel.cpp b/modules/chanserv/main/channel.cpp index a2d56b6ec..f4b0e2578 100644 --- a/modules/chanserv/main/channel.cpp +++ b/modules/chanserv/main/channel.cpp @@ -32,19 +32,13 @@ void ChannelImpl::Delete() Anope::Logger.Debug("Deleting channel {0}", this->GetName()); - if (this->c) + ::Channel *c = this->GetChannel(); + if (c) { - if (this->GetBot() && this->c->FindUser(this->GetBot())) - this->GetBot()->Part(this->c); - - /* Parting the service bot can cause the channel to go away */ - - if (this->c) + if (this->GetBot() && c->FindUser(this->GetBot())) { - if (this->c && this->c->CheckDelete()) - this->c->QueueForDeletion(); - - this->c = NULL; + this->GetBot()->Part(c); + c = nullptr; } } |