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>
This commit is contained in:
alexkar598
2020-06-14 12:31:52 -04:00
committed by GitHub
parent e2cd03acd3
commit 700df3f28a

View File

@@ -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, "<span class='reallybig'>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.</span>")
winset(usr, null, "command=.reconnect")
QDEL_IN(client, 3 SECONDS) //fallback if the reconnection doesnt work
return
var/list/modifiers = params2list(params)