diff options
author | Adam <Adam@anope.org> | 2011-08-06 17:33:59 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-08-06 17:33:59 -0400 |
commit | a6dd65f916adbdd4edf6494a2d3ab2d94484189f (patch) | |
tree | bb0a25159930a991ad355f2bb58604bbe1e65fcb /src/access.cpp | |
parent | 0448e386dee2d6a591e4a67586b5ad059127a8c3 (diff) |
Fixed suepradmin
Diffstat (limited to 'src/access.cpp')
-rw-r--r-- | src/access.cpp | 10 |
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; } |