From 7843e070ff7cf8d78c637df5657c684af57462fc Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 8 Sep 2019 12:13:24 -0700 Subject: [PATCH] Update mob.dm --- code/modules/mob/mob.dm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index f1602f429c..89b37700ea 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -452,22 +452,28 @@ reset_perspective(null) unset_machine() +GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) + //suppress the .click/dblclick macros so people can't use them to identify the location of items or aimbot /mob/verb/DisClick(argu = null as anything, sec = "" as text, number1 = 0 as num , number2 = 0 as num) set name = ".click" set hidden = TRUE set category = null - var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .click macro!" - log_admin(msg) - message_admins(msg) + if(GLOB.exploit_warn_spam_prevention < world.time) + var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .click macro!" + log_admin(msg) + message_admins(msg) + GLOB.exploit_warn_spam_prevention = world.time + 10 /mob/verb/DisDblClick(argu = null as anything, sec = "" as text, number1 = 0 as num , number2 = 0 as num) set name = ".dblclick" set hidden = TRUE set category = null - var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .dblclick macro!" - log_admin(msg) - message_admins(msg) + if(GLOB.exploit_warn_spam_prevention < world.time) + var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .dblclick macro!" + log_admin(msg) + message_admins(msg) + GLOB.exploit_warn_spam_prevention = world.time + 10 /mob/Topic(href, href_list) if(href_list["mach_close"])