summaryrefslogtreecommitdiff
path: root/src/access.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-06 17:33:59 -0400
committerAdam <Adam@anope.org>2011-08-06 17:33:59 -0400
commita6dd65f916adbdd4edf6494a2d3ab2d94484189f (patch)
treebb0a25159930a991ad355f2bb58604bbe1e65fcb /src/access.cpp
parent0448e386dee2d6a591e4a67586b5ad059127a8c3 (diff)
Fixed suepradmin
Diffstat (limited to 'src/access.cpp')
-rw-r--r--src/access.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/access.cpp b/src/access.cpp
index 5fba02c98..07e82159c 100644
--- a/src/access.cpp
+++ b/src/access.cpp
@@ -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;
}