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:
+8
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user