From dc99702b9d130388be43fc393821d4965cfd57c7 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 16:54:11 +0200 Subject: [PATCH] Logging improvements --- code/__HELPERS/unsorted.dm | 3 +-- code/game/machinery/telecomms/telecomunications.dm | 3 +-- code/modules/admin/admin_investigate.dm | 9 ++++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index bb246f61379..682d76d513b 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -659,8 +659,7 @@ Turf and target are seperate in case you want to teleport some distance from a t /proc/get_mob_by_ckey(key) if(!key) return - var/list/mobs = sortmobs() - for(var/mob/M in mobs) + for(var/mob/M in mobs_list) if(M.ckey == key) return M diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 9856f482b0b..f3b84e75f89 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -629,13 +629,12 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() update_logs() /obj/machinery/telecomms/server/proc/admin_log(var/mob/mob) - var/msg="[key_name(mob)] has compiled a script to server [src]:" diary << msg diary << rawcode src.investigate_log("[msg]
[rawcode]", "ntsl") if(length(rawcode)) // Let's not bother the admins for empty code. - message_admins("[key_name_admin(mob)] has compiled and uploaded a NTSL script to [src.id]",0,1) + message_admins("[key_name_admin(mob)] has compiled and uploaded a NTSL script to [src.id] (JMP)") // Simple log entry datum diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 56cf1a1a837..aea9f51f715 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -26,7 +26,7 @@ F << "[time_stamp()] \ref[src] ([x],[y],[z]) || [src] [message]
" //ADMINVERBS -/client/proc/investigate_show( subject in list("hrefs","pda","singulo","atmos","gold core","cult") ) +/client/proc/investigate_show( subject in list("hrefs","pda","singulo","atmos","ntsl","gold core","cult") ) set name = "Investigate" set category = "Admin" if(!holder) return @@ -64,6 +64,13 @@ src << browse(F,"window=investigate[subject];size=800x300") if("atmos") + var/F = investigate_subject2file(subject) + if(!F) + src << "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed." + return + src << browse(F,"window=investigate[subject];size=800x300") + + if("ntsl") var/F = investigate_subject2file(subject) if(!F) src << "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed."