From ade630f86461bb1adc4bcdfd1299ebf209b2adb2 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Sun, 8 Jan 2017 22:17:04 -0800 Subject: [PATCH] Tightens the permissions on debug, DI panel, view variables --- code/datums/datumvars.dm | 2 +- code/datums/statclick.dm | 2 +- code/modules/mob/mob.dm | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 53a927386bd..84432b2c239 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -6,7 +6,7 @@ //set src in world - if(!usr.client || !usr.client.holder) + if(!is_admin(usr)) to_chat(usr, "You need to be an administrator to access this.") return diff --git a/code/datums/statclick.dm b/code/datums/statclick.dm index 51018fae9cb..e10a63b8356 100644 --- a/code/datums/statclick.dm +++ b/code/datums/statclick.dm @@ -31,7 +31,7 @@ // This bit is called when clicked in the stat panel /obj/effect/statclick/debug/Click() - if(!usr.client.holder) + if(!is_admin(usr)) return usr.client.debug_variables(target) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 44ba3cb99c3..6293707cdc8 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -946,8 +946,7 @@ var/list/slot_equipment_priority = list( \ add_spell_to_statpanel(S) - if(client && client.holder) - + if(is_admin(src)) if(statpanel("DI")) //not looking at that panel stat("Loc", "([x], [y], [z]) [loc]") stat("CPU", "[world.cpu]")