From b56e71ab14b020a3a01f1fbd183382083156aaf4 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 1 Jun 2013 14:55:45 -0400 Subject: Move CheckKick event to Channel and make os_forbid use it instead of kicking users in the join event, which does bad things --- modules/commands/cs_akick.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/commands/cs_akick.cpp') diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index b54fca191..17a20a0dd 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -394,7 +394,7 @@ class CommandCSAKick : public Command ChanUserContainer *uc = it->second; ++it; - if (ci->CheckKick(uc->user)) + if (c->CheckKick(uc->user)) ++count; } @@ -514,14 +514,14 @@ class CSAKick : public Module { } - EventReturn OnCheckKick(User *u, ChannelInfo *ci, Anope::string &mask, Anope::string &reason) anope_override + EventReturn OnCheckKick(User *u, Channel *c, Anope::string &mask, Anope::string &reason) anope_override { - if (ci->c->MatchesList(u, "EXCEPT")) + if (!c->ci || c->MatchesList(u, "EXCEPT")) return EVENT_CONTINUE; - for (unsigned j = 0, end = ci->GetAkickCount(); j < end; ++j) + for (unsigned j = 0, end = c->ci->GetAkickCount(); j < end; ++j) { - AutoKick *autokick = ci->GetAkick(j); + AutoKick *autokick = c->ci->GetAkick(j); bool kick = false; if (autokick->nc) -- cgit