From 94feec379e67bb1386ba6d813b302db3153465b9 Mon Sep 17 00:00:00 2001 From: panurgomatic Date: Fri, 6 May 2011 15:05:32 +0000 Subject: [PATCH] - Game masters and Game admins can view server .log file using "Show Server Log" command in Admin panel. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1538 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/admin/admin.dm | 22 ++++++++++++++++++++++ code/modules/admin/admin_verbs.dm | 6 ++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index d2aafecf144..5a5fec603d7 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -2209,6 +2209,28 @@ var/showadminmessages = 1 log_admin("[key_name(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.") message_admins("\blue [key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.", 1) + +/obj/admins/proc/view_txt_log() + set category = "Admin" + set desc="Shows todays server log in new window" + set name="Show Server Log" + var/path = "data/logs/[time2text(world.realtime,"YYYY")]/[time2text(world.realtime,"MM")]-[time2text(world.realtime,"Month")]/[time2text(world.realtime,"DD")]-[time2text(world.realtime,"Day")].log" + var/output = {" + + [time2text(world.realtime,"Day, MMM DD, YYYY")] - Log + + +
+						[file2text(path)]
+						
+ + "} + usr << browse(output,"window=server_logfile") + onclose(usr,"server_logfile") + return + + + // // //ALL DONE diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 41137af98e6..f8a9090d60e 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -28,7 +28,7 @@ src.holder.level = 6 // Settings - + src.verbs += /obj/admins/proc/view_txt_log src.verbs += /client/proc/colorooc // -- Urist src.verbs += /obj/admins/proc/adjump //toggle admin jumping src.verbs += /obj/admins/proc/adrev //toggle admin revives @@ -173,6 +173,7 @@ // Settings //src.verbs += /client/proc/colorooc // -- Urist + src.verbs += /obj/admins/proc/view_txt_log src.verbs += /obj/admins/proc/adjump //toggle admin jumping src.verbs += /obj/admins/proc/adrev //toggle admin revives src.verbs += /obj/admins/proc/adspawn //toggle admin item spawning @@ -1036,6 +1037,7 @@ src.verbs -= /client/proc/unstealthadmin // Settings + src.verbs -= /obj/admins/proc/view_txt_log src.verbs -= /client/proc/colorooc // -- Urist src.verbs -= /obj/admins/proc/adjump //toggle admin jumping src.verbs -= /obj/admins/proc/adrev //toggle admin revives @@ -1692,4 +1694,4 @@ // Old and unused - if ("Admin Observer") //Former Filthy Xeno \ No newline at end of file + if ("Admin Observer") //Former Filthy Xeno