summaryrefslogtreecommitdiff
path: root/modules/commands/cs_access.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-11-05 10:35:23 -0400
committerAdam <Adam@anope.org>2016-11-05 10:35:47 -0400
commitdba19d839af717a697ed54ed5da9c27aef76052a (patch)
tree86cde664d6f306445875ee96735079dbb09da6fd /modules/commands/cs_access.cpp
parent7453c71c005671f729e26f2bbeeb750d32c88718 (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.cpp13
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)