From b6a9a0c813a9e05ada62007cc1c70e87513b4f24 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 20 May 2024 21:26:39 -0500 Subject: [PATCH] detection of using /tar --- src/engine/net/client/ClientMessagePump.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index 60dbd91d..ec4ab4ed 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -148,6 +148,12 @@ public class ClientMessagePump implements NetMsgHandler { pc.setActive(true); pc.setLastTarget(GameObjectType.values()[msg.getTargetType()], msg.getTargetID()); + + if(!pc.getTimestamps().containsKey("lastTab")) + pc.getTimestamps().put("lastTab",System.currentTimeMillis()); + + if(System.currentTimeMillis() - pc.getTimestamps().get("lastTab") < 100) + Logger.error("USE OF /TAR SUSPECTED BY PLAYER: " + pc.getName()); } private static void social(SocialMsg msg, ClientConnection origin) throws MsgSendException {