diff options
Diffstat (limited to 'modules/commands/cs_access.cpp')
-rw-r--r-- | modules/commands/cs_access.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 6e9b79c6a..8bc6b9a31 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -1,6 +1,6 @@ /* ChanServ core functions * - * (C) 2003-2016 Anope Team + * (C) 2003-2017 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. @@ -437,7 +437,7 @@ class CommandCSAccess : public Command list.Process(replies); source.Reply(_("Access list for %s:"), ci->name.c_str()); - + for (unsigned i = 0; i < replies.size(); ++i) source.Reply(replies[i]); @@ -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 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->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) |