diff options
author | Adam <Adam@anope.org> | 2017-10-07 21:10:47 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-10-07 21:10:47 -0400 |
commit | 2312f1fbd06ac01bb55e1d99070cde05a09a5a17 (patch) | |
tree | 69239628ed39e342650574f93d441f58d6d82b7b /modules/chanserv/akick.cpp | |
parent | 286bffa2cd6a3f564334c5a4669ea3aadfb27a0a (diff) |
No longer expose c->ci and ci->c
Diffstat (limited to 'modules/chanserv/akick.cpp')
-rw-r--r-- | modules/chanserv/akick.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/chanserv/akick.cpp b/modules/chanserv/akick.cpp index d49a63ca5..9014ad9d6 100644 --- a/modules/chanserv/akick.cpp +++ b/modules/chanserv/akick.cpp @@ -209,9 +209,9 @@ class CommandCSAKick : public Command } /* Check excepts BEFORE we get this far */ - if (ci->c) + if (Channel *c = ci->GetChannel()) { - std::vector<Anope::string> modes = ci->c->GetModeList("EXCEPT"); + std::vector<Anope::string> modes = c->GetModeList("EXCEPT"); for (unsigned int i = 0; i < modes.size(); ++i) { if (Anope::Match(modes[i], mask)) @@ -510,7 +510,7 @@ class CommandCSAKick : public Command void DoEnforce(CommandSource &source, ChanServ::Channel *ci) { - Channel *c = ci->c; + Channel *c = ci->GetChannel(); int count = 0; if (!c) @@ -696,12 +696,13 @@ class CSAKick : public Module EventReturn OnCheckKick(User *u, Channel *c, Anope::string &mask, Anope::string &reason) override { - if (!c->ci || c->MatchesList(u, "EXCEPT")) + ChanServ::Channel *ci = c->GetChannel(); + if (!ci || c->MatchesList(u, "EXCEPT")) return EVENT_CONTINUE; - for (unsigned j = 0, end = c->ci->GetAkickCount(); j < end; ++j) + for (unsigned j = 0, end = ci->GetAkickCount(); j < end; ++j) { - AutoKick *ak = c->ci->GetAkick(j); + AutoKick *ak = ci->GetAkick(j); bool kick = false; if (ak->GetAccount()) |