summaryrefslogtreecommitdiff
path: root/modules/chanserv/main/channel.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-10-07 21:10:47 -0400
committerAdam <Adam@anope.org>2017-10-07 21:10:47 -0400
commit2312f1fbd06ac01bb55e1d99070cde05a09a5a17 (patch)
tree69239628ed39e342650574f93d441f58d6d82b7b /modules/chanserv/main/channel.cpp
parent286bffa2cd6a3f564334c5a4669ea3aadfb27a0a (diff)
No longer expose c->ci and ci->c
Diffstat (limited to 'modules/chanserv/main/channel.cpp')
-rw-r--r--modules/chanserv/main/channel.cpp16
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;
}
}