1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 07:56:39 +02:00

Fixed suepradmin

This commit is contained in:
Adam
2011-08-06 17:33:59 -04:00
parent 0448e386de
commit a6dd65f916
9 changed files with 31 additions and 11 deletions
+9 -1
View File
@@ -75,13 +75,21 @@ bool ChanAccess::operator<=(ChanAccess &other)
AccessGroup::AccessGroup() : std::vector<ChanAccess *>()
{
this->SuperAdmin = false;
}
bool AccessGroup::HasPriv(ChannelAccess priv) const
{
if (this->SuperAdmin)
return true;
for (unsigned i = this->size(); i > 0; --i)
if (this->at(i - 1)->HasPriv(priv))
{
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;
}
return false;
}