1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 07:53:12 +02:00

cs_access: fix negative access to apply to the -1/0 special casing

This commit is contained in:
Adam
2016-11-05 10:35:23 -04:00
parent 7453c71c00
commit dba19d839a
+13
View File
@@ -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)