1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 23:03:12 +02:00

Move CheckKick event to Channel and make os_forbid use it instead of kicking users in the join event, which does bad things

This commit is contained in:
Adam
2013-06-01 14:55:45 -04:00
parent 6f45d72497
commit b56e71ab14
11 changed files with 70 additions and 72 deletions
+3 -3
View File
@@ -1130,12 +1130,12 @@ class CSSet : 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->HasExt("RESTRICTED") || ci->c->MatchesList(u, "EXCEPT"))
if (!c->ci || !c->ci->HasExt("RESTRICTED") || c->MatchesList(u, "EXCEPT"))
return EVENT_CONTINUE;
if (ci->AccessFor(u).empty() && (!ci->GetFounder() || u->Account() != ci->GetFounder()))
if (c->ci->AccessFor(u).empty() && (!c->ci->GetFounder() || u->Account() != c->ci->GetFounder()))
return EVENT_STOP;
return EVENT_CONTINUE;