summaryrefslogtreecommitdiff
path: root/npc/commands/debug.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/commands/debug.txt')
-rw-r--r--npc/commands/debug.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt
index b86dab04..e8e28290 100644
--- a/npc/commands/debug.txt
+++ b/npc/commands/debug.txt
@@ -640,6 +640,30 @@ OnAllPerms:
@allperms=true;
end;
+// These are really dangerous functions
+// Force ADMs to set a variable to use, so I know they are aware of server code
+OnCallFunc:
+ if (!$@ALLOW_SUPERDEBUG) {
+ dispbottom col("This command is restricted for senior dev-admins. Please do not use it again.", 1);
+ die();
+ end;
+ }
+ .@request$ = "";
+ .@request$ += implode(.@atcmd_parameters$, " ");
+ callfunc .@request$;
+ end;
+
+OnDoEvent:
+ if (!$@ALLOW_SUPERDEBUG) {
+ dispbottom col("This command is restricted for senior dev-admins. Please do not use it again.", 1);
+ die();
+ end;
+ }
+ .@request$ = "";
+ .@request$ += implode(.@atcmd_parameters$, " ");
+ doevent .@request$;
+ end;
+
OnInit:
registercmd "@debug", "Debug Spell::OnDebug";
bindatcmd "getvar", "Debug Spell::OnGetVar", 99, 99, 1;
@@ -648,6 +672,8 @@ OnInit:
bindatcmd "set-var", "Debug Spell::OnSetVar", 99, 99, 1;
bindatcmd "sclear", "Debug Spell::OnSClear", 99, 99, 1;
bindatcmd "allperms", "Debug Spell::OnAllPerms", 99, 100, 1;
+ bindatcmd "callfunc", "@wgm::OnCallFunc", 99, 99, 1;
+ bindatcmd "doevent", "@wgm::OnDoEvent", 99, 99, 1;
// Setup debug server command overrides
if (debug) {
add_group_command("str", 0, true, false);