summaryrefslogtreecommitdiff
path: root/src/access.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-14 18:50:22 -0400
committerAdam <Adam@anope.org>2011-08-14 18:50:22 -0400
commit960c339a4ccb1be522ec800d9143d30db8ac7001 (patch)
tree6cf9bde695f498f5c2db5b58f97c9733e085a3e7 /src/access.cpp
parentfddb2304c6a05559b4d2c550885646dc2e77e875 (diff)
Brought back the old 1.7 behavior of a level -1 matching all users and 0 matching all identified users
Diffstat (limited to 'src/access.cpp')
-rw-r--r--src/access.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/access.cpp b/src/access.cpp
index 3559a8209..3c1eb8714 100644
--- a/src/access.cpp
+++ b/src/access.cpp
@@ -82,6 +82,7 @@ bool ChanAccess::operator<=(ChanAccess &other)
AccessGroup::AccessGroup() : std::vector<ChanAccess *>()
{
this->ci = NULL;
+ this->nc = NULL;
this->SuperAdmin = this->Founder = false;
}
@@ -93,10 +94,13 @@ bool AccessGroup::HasPriv(ChannelAccess priv) const
return false;
else if (this->Founder)
return true;
+ EventReturn MOD_RESULT;
+ FOREACH_RESULT(I_OnGroupCheckPriv, OnGroupCheckPriv(this, priv));
+ if (MOD_RESULT != EVENT_CONTINUE)
+ return MOD_RESULT == EVENT_ALLOW;
for (unsigned i = this->size(); i > 0; --i)
{
ChanAccess *access = this->at(i - 1);
- EventReturn MOD_RESULT;
FOREACH_RESULT(I_OnCheckPriv, OnCheckPriv(access, priv));
if (MOD_RESULT == EVENT_ALLOW || access->HasPriv(priv))
return true;