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:
+5
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user