diff options
author | Adam <Adam@anope.org> | 2016-11-05 10:35:23 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-11-05 10:35:47 -0400 |
commit | dba19d839af717a697ed54ed5da9c27aef76052a (patch) | |
tree | 86cde664d6f306445875ee96735079dbb09da6fd /modules/commands/cs_access.cpp | |
parent | 7453c71c005671f729e26f2bbeeb750d32c88718 (diff) |
cs_access: fix negative access to apply to the -1/0 special casing
Diffstat (limited to 'modules/commands/cs_access.cpp')
-rw-r--r-- | modules/commands/cs_access.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 6e9b79c6a..60c1a6907 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -891,6 +891,19 @@ class CSAccess : public Module { if (group->ci == NULL) return EVENT_CONTINUE; + + const ChanAccess *highest = group->Highest(); + if (highest && highest->provider == &accessprovider) + { + /* Access accessprovider is the only accessprovider with th concept of negative access, + * so check they don't have negative access + */ + const AccessChanAccess *aca = anope_dynamic_static_cast<const AccessChanAccess *>(highest); + + if (aca->level < 0) + return EVENT_CONTINUE; + } + /* Special case. Allows a level of -1 to match anyone, and a level of 0 to match anyone identified. */ int16_t level = group->ci->GetLevel(priv); if (level == -1) |