From 170f5d7a5e0e9a21b731fe1e97b3f95e559a2d4f Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 19 Sep 2017 06:34:53 -0500 Subject: [PATCH] [MIRROR] Log file for PDA messages (#2848) * log file for pda messaegs (#30827) * Log file for PDA messages --- code/__HELPERS/_logging.dm | 2 +- code/_globalvars/logging.dm | 2 ++ code/game/world.dm | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 4b5342031f..8f3a0163b9 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -85,7 +85,7 @@ /proc/log_pda(text) if (config.log_pda) - WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]PDA: [text]") + WRITE_FILE(GLOB.world_pda_log, "\[[time_stamp()]]PDA: [text]") /proc/log_comment(text) if (config.log_pda) diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index e600619d45..3f96b33b34 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -16,6 +16,8 @@ GLOBAL_VAR(config_error_log) GLOBAL_PROTECT(config_error_log) GLOBAL_VAR(sql_error_log) GLOBAL_PROTECT(sql_error_log) +GLOBAL_VAR(world_pda_log) +GLOBAL_PROTECT(world_pda_log) GLOBAL_LIST_EMPTY(bombers) GLOBAL_PROTECT(bombers) diff --git a/code/game/world.dm b/code/game/world.dm index 87d76b9e8a..3763a408ac 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -6,7 +6,7 @@ GLOBAL_PROTECT(security_mode) SetupExternalRSC() - GLOB.config_error_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = file("data/logs/config_error.log") //temporary file used to record errors with loading config, moved to log directory once logging is set bl + GLOB.config_error_log = GLOB.world_pda_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = file("data/logs/config_error.log") //temporary file used to record errors with loading config, moved to log directory once logging is set bl CheckSecurityMode() @@ -88,10 +88,12 @@ GLOBAL_PROTECT(security_mode) GLOB.world_runtime_log = file("[GLOB.log_directory]/runtime.log") GLOB.world_qdel_log = file("[GLOB.log_directory]/qdel.log") GLOB.world_href_log = file("[GLOB.log_directory]/hrefs.html") + GLOB.world_pda_log = file("[GLOB.log_directory]/pda.log") GLOB.sql_error_log = file("[GLOB.log_directory]/sql.log") WRITE_FILE(GLOB.world_game_log, "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------") WRITE_FILE(GLOB.world_attack_log, "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------") WRITE_FILE(GLOB.world_runtime_log, "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------") + WRITE_FILE(GLOB.world_pda_log, "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------") GLOB.changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently if(fexists(GLOB.config_error_log)) fcopy(GLOB.config_error_log, "[GLOB.log_directory]/config_error.log") @@ -106,7 +108,7 @@ GLOBAL_PROTECT(security_mode) GLOB.security_mode = SECURITY_ULTRASAFE warning("/tg/station 13 is not supported in ultrasafe security mode. Everything will break!") return - + //try to shell if(shell("echo \"The world is running in trusted mode\"") != null) GLOB.security_mode = SECURITY_TRUSTED