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/botserv/kick.cpp | |
parent | 286bffa2cd6a3f564334c5a4669ea3aadfb27a0a (diff) |
No longer expose c->ci and ci->c
Diffstat (limited to 'modules/botserv/kick.cpp')
-rw-r--r-- | modules/botserv/kick.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/botserv/kick.cpp b/modules/botserv/kick.cpp index b90a6e48e..2fbaf4c1b 100644 --- a/modules/botserv/kick.cpp +++ b/modules/botserv/kick.cpp @@ -1323,7 +1323,8 @@ class BSKick : public Module if (u->IsProtected()) return; - BanData::Data &bd = this->GetBanData(u, ci->c); + Channel *c = ci->GetChannel(); + BanData::Data &bd = this->GetBanData(u, c); ++bd.ttb[ttbtype]; if (ttb && bd.ttb[ttbtype] >= ttb) @@ -1332,15 +1333,15 @@ class BSKick : public Module Anope::string mask = ci->GetIdealBan(u); - ci->c->SetMode(NULL, "BAN", mask); + c->SetMode(NULL, "BAN", mask); EventManager::Get()->Dispatch(&Event::BotBan::OnBotBan, u, ci, mask); } - if (!ci->c->FindUser(u)) + if (!c->FindUser(u)) return; Anope::string buf = Anope::Format(message, std::forward<Args>(args)...); - ci->c->Kick(ci->GetBot(), u, buf); + c->Kick(ci->GetBot(), u, buf); } public: @@ -1518,10 +1519,10 @@ class BSKick : public Module * But FIRST we check whether the user is protected in any * way. */ - ChanServ::Channel *ci = c->ci; + ChanServ::Channel *ci = c->GetChannel(); if (ci == NULL) return; - KickerData *kd = c->ci->GetRef<KickerData *>(); + KickerData *kd = ci->GetRef<KickerData *>(); if (kd == NULL) return; @@ -1734,7 +1735,7 @@ class BSKick : public Module Channel *chan = it->second->chan; ++it; - if (chan->ci && kd->GetAmsgs() && !chan->ci->AccessFor(u).HasPriv("NOKICK")) + if (chan->GetChannel() && kd->GetAmsgs() && !chan->GetChannel()->AccessFor(u).HasPriv("NOKICK")) { TakeAction(ci, u, kd->GetTTBAmsgs(), TTB_AMSGS, _("Don't use AMSGs!")); return; |