summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-07-29 11:44:57 -0300
committerJesusaves <cpntb1@ymail.com>2021-07-29 11:44:57 -0300
commitb0364c3f77f0cd86a198868b8e992e585a055e91 (patch)
tree6c8bb58f5c5c583d0de608c6c9132723fce091fd
parentf1ebb9f40d60648a39c5e7d7f00f537ca1f3cf8d (diff)
downloadserverdata-b0364c3f77f0cd86a198868b8e992e585a055e91.tar.gz
serverdata-b0364c3f77f0cd86a198868b8e992e585a055e91.tar.bz2
serverdata-b0364c3f77f0cd86a198868b8e992e585a055e91.tar.xz
serverdata-b0364c3f77f0cd86a198868b8e992e585a055e91.zip
Add Moubootaur Legends top-notch debug commands @callfunc and @doevent
Require a special global variable to be set server-wide.
-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);