summaryrefslogtreecommitdiff
path: root/modules/commands/cs_set.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-06-01 14:55:45 -0400
committerAdam <Adam@anope.org>2013-06-01 14:55:45 -0400
commitb56e71ab14b020a3a01f1fbd183382083156aaf4 (patch)
tree0a08e0f848697c9c8c708e2e2156ce6256481fe2 /modules/commands/cs_set.cpp
parent6f45d7249785b056ed78916d33ec45045a43ed92 (diff)
Move CheckKick event to Channel and make os_forbid use it instead of kicking users in the join event, which does bad things
Diffstat (limited to 'modules/commands/cs_set.cpp')
-rw-r--r--modules/commands/cs_set.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp
index 1211c5ed0..d07e544cc 100644
--- a/modules/commands/cs_set.cpp
+++ b/modules/commands/cs_set.cpp
@@ -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;