1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 20:26:39 +02:00

Brought back the old 1.7 behavior of a level -1 matching all users and 0 matching all identified users

This commit is contained in:
Adam
2011-08-14 18:50:22 -04:00
parent fddb2304c6
commit 960c339a4c
10 changed files with 38 additions and 11 deletions
+5 -1
View File
@@ -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;