summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-07-31 23:24:27 -0300
committerJesusaves <cpntb1@ymail.com>2019-07-31 23:24:27 -0300
commit34cc9e06787f02f462299785cc19e89fddb7afe4 (patch)
treee6c38c1451ee8b140c735120f0ca7666094e7c11
parent8c43a6ac55a1a825ae4735521c70417bc0d35d3e (diff)
downloadserverdata-34cc9e06787f02f462299785cc19e89fddb7afe4.tar.gz
serverdata-34cc9e06787f02f462299785cc19e89fddb7afe4.tar.bz2
serverdata-34cc9e06787f02f462299785cc19e89fddb7afe4.tar.xz
serverdata-34cc9e06787f02f462299785cc19e89fddb7afe4.zip
New GM command: @checkidle <player_name>
Like @ipcheck, it returns the idle time of a player. This is useful for GMs. Even if they cannot hugo at someone, they can still botcheck them (@checkidle, /msg and @botcheck)
-rw-r--r--npc/commands/ipcheck.txt30
1 files changed, 29 insertions, 1 deletions
diff --git a/npc/commands/ipcheck.txt b/npc/commands/ipcheck.txt
index a610c84cd..a1f9345c2 100644
--- a/npc/commands/ipcheck.txt
+++ b/npc/commands/ipcheck.txt
@@ -20,6 +20,34 @@ OnCall:
end;
OnInit:
- bindatcmd "ipcheck", "@ipcheck::OnCall", 80, 80, 1;
+ bindatcmd "ipcheck", "@ipcheck::OnCall", 80, 100, 1;
end;
}
+
+// TMW2 script
+// Author: Jesusalva <admin@tmw2.org>
+//
+// @checkidle <player_name>
+// #checkidle <player_name>
+//
+// Returns user idle time in seconds.
+// Useful when the game prohibits warping to player.
+
+
+- script @checkidle 32767,{
+ end;
+
+OnCall:
+ if (.@atcmd_numparameters == 0)
+ .@request$ = strcharinfo(0);
+ else
+ .@request$ = implode(.@atcmd_parameters$, " ");
+ dispbottom strip(.@request$)+" idle time: "+checkidle(.@request$);
+ //dispbottom strcharinfo(0)+": IP "+getcharip(.@request$);
+ end;
+
+OnInit:
+ bindatcmd "checkidle", "@checkidle::OnCall", 60, 80, 1;
+ end;
+}
+