1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 03:16:38 +02:00

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.
This commit is contained in:
Adam
2013-11-09 05:51:38 -05:00
parent aa6c3f3474
commit afc5c91a09
+8 -1
View File
@@ -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;