summaryrefslogtreecommitdiff
path: root/modules/fantasy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/fantasy.cpp')
-rw-r--r--modules/fantasy.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/fantasy.cpp b/modules/fantasy.cpp
index 6a212a633..0e24b10c5 100644
--- a/modules/fantasy.cpp
+++ b/modules/fantasy.cpp
@@ -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))