[MIRROR] Log file for PDA messages (#2848)

* log file for pda messaegs (#30827)

* Log file for PDA messages
This commit is contained in:
CitadelStationBot
2017-09-19 06:34:53 -05:00
committed by Poojawa
parent e1aa96ad64
commit 170f5d7a5e
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -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)
+2
View File
@@ -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)
+4 -2
View File
@@ -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