summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-11-09 05:51:38 -0500
committerAdam <Adam@anope.org>2013-11-09 05:51:38 -0500
commitafc5c91a09e98a597bfbc458647d363aff303b71 (patch)
treecf0119707d46987c87badc031a691323c1c99ed4 /src
parentaa6c3f34743079c81124f7f3c2ec6498d259f9a1 (diff)
Do not grant auto privileges to founders if they match other access
entries. This allows channel founders to disable auto +qo without having to globally disable autoop or the levels.
Diffstat (limited to 'src')
-rw-r--r--src/access.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/access.cpp b/src/access.cpp
index f4b97c21e..785ba7d26 100644
--- a/src/access.cpp
+++ b/src/access.cpp
@@ -342,7 +342,14 @@ bool AccessGroup::HasPriv(const Anope::string &name) const
return true;
else if (!ci || ci->GetLevel(name) == ACCESS_INVALID)
return false;
- else if (this->founder)
+
+ /* Privileges prefixed with auto are understood to be given
+ * automatically. Sometimes founders want to not automatically
+ * obtain privileges, so we will let them */
+ bool auto_mode = !name.find("AUTO");
+
+ /* Only grant founder privilege if this isn't an auto mode or if they don't match any entries in this group */
+ if ((!auto_mode || this->empty()) && this->founder)
return true;
EventReturn MOD_RESULT;