summaryrefslogtreecommitdiff
path: root/src/bots.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 /src/bots.cpp
parent286bffa2cd6a3f564334c5a4669ea3aadfb27a0a (diff)
No longer expose c->ci and ci->c
Diffstat (limited to 'src/bots.cpp')
-rw-r--r--src/bots.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index 35b390ed4..eaa0d045d 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -139,12 +139,13 @@ void ServiceBot::UnAssign(User *u, ChanServ::Channel *ci)
if (MOD_RESULT == EVENT_STOP)
return;
- if (ci->c && ci->c->FindUser(ci->GetBot()))
+ Channel *c = ci->GetChannel();
+ if (c && c->FindUser(ci->GetBot()))
{
if (u)
- ci->GetBot()->Part(ci->c, "UNASSIGN from " + u->nick);
+ ci->GetBot()->Part(c, "UNASSIGN from " + u->nick);
else
- ci->GetBot()->Part(ci->c);
+ ci->GetBot()->Part(c);
}
ci->SetBot(nullptr);