summaryrefslogtreecommitdiff
path: root/modules/chanserv/access.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/chanserv/access.cpp')
-rw-r--r--modules/chanserv/access.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/chanserv/access.cpp b/modules/chanserv/access.cpp
index 8342e5973..70db18fad 100644
--- a/modules/chanserv/access.cpp
+++ b/modules/chanserv/access.cpp
@@ -899,6 +899,19 @@ class CSAccess : public Module
{
if (group->ci == NULL)
return EVENT_CONTINUE;
+
+ const ChanServ::ChanAccess *highest = group->Highest();
+ if (highest && highest->provider == &accesschanaccesstype)
+ {
+ /* Access is the only access provider with the concept of negative access,
+ * so check they don't have negative access
+ */
+ const AccessChanAccess *aca = anope_dynamic_static_cast<const AccessChanAccess *>(highest);
+
+ if (aca->GetLevel() < 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)