1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 11:23:13 +02:00

Allow opers with chanserv/administration to use fantasy, even if they don't have the access for it

This commit is contained in:
Adam
2014-03-01 20:02:17 -05:00
parent 4d54358745
commit b7e646ec83
+5 -2
View File
@@ -162,8 +162,11 @@ class Fantasy : public Module
source.command = it->first;
source.permission = info.permission;
AccessGroup ag = c->ci->AccessFor(u);
bool has_fantasia = ag.HasPriv("FANTASIA") || source.HasPriv("chanserv/administration");
EventReturn MOD_RESULT;
if (c->ci->AccessFor(u).HasPriv("FANTASIA"))
if (has_fantasia)
{
FOREACH_RESULT(OnBotFantasy, MOD_RESULT, (source, cmd, c->ci, params));
}
@@ -172,7 +175,7 @@ class Fantasy : public Module
FOREACH_RESULT(OnBotNoFantasyAccess, MOD_RESULT, (source, cmd, c->ci, params));
}
if (MOD_RESULT == EVENT_STOP || !c->ci->AccessFor(u).HasPriv("FANTASIA"))
if (MOD_RESULT == EVENT_STOP || !has_fantasia)
return;
if (MOD_RESULT != EVENT_ALLOW && !info.permission.empty() && !source.HasCommand(info.permission))