From 700df3f28a9df7df5fd91b66a7eb569233ce6f57 Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Sun, 14 Jun 2020 12:31:52 -0400 Subject: [PATCH] Auto kicks AIs that click turfs they shouldnt see(like for example when the camera static bugs out) (#8868) * Auto kicks AIs that click turfs they shouldnt see(like for example when the camera static bugs out) * Forces reconnect * Update code/_onclick/ai.dm Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com> --- code/_onclick/ai.dm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index 1b5947f37b77..4749a0612fc4 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -43,12 +43,11 @@ if(!can_see(A)) if(isturf(A)) //On unmodified clients clicking the static overlay clicks the turf underneath return //So there's no point messaging admins - message_admins("[ADMIN_LOOKUPFLW(src)] might be running a modified client! (failed can_see on AI click of [A] (Turf Loc: [ADMIN_VERBOSEJMP(pixel_turf)]))") - var/message = "[key_name(src)] might be running a modified client! (failed can_see on AI click of [A] (Turf Loc: [AREACOORD(pixel_turf)]))" - log_admin(message) - if(REALTIMEOFDAY >= chnotify + 9000) - chnotify = REALTIMEOFDAY - send2irc_adminless_only("NOCHEAT", message) + message_admins("[ADMIN_LOOKUPFLW(src)] was kicked because they failed can_see on AI click of [A] (Turf Loc: [ADMIN_VERBOSEJMP(pixel_turf)]))") + log_admin("[key_name(src)] was kicked because they failed can_see on AI click of [A] (Turf Loc: [AREACOORD(pixel_turf)])") + to_chat(src, "You have been automatically kicked because you clicked a turf you shouldn't of been able to see as an AI. You should reconnect automatically. If you do not, you can reconnect using the File --> Reconnect button.") + winset(usr, null, "command=.reconnect") + QDEL_IN(client, 3 SECONDS) //fallback if the reconnection doesnt work return var/list/modifiers = params2list(params)