[admin] NTSL Logging (#6443)

* Update server.dm

* Update world.dm

* Update logging.dm

* Update atoms.dm

* Update _logging.dm

* Update server.dm

* Update general.dm

* Update logging.dm

* Update logging.dm

* Update logging.dm

* Update config.txt

* Update config.txt
This commit is contained in:
Nichlas Pihl
2019-07-24 14:48:38 +02:00
committed by alexkar598
parent a71bc0470e
commit 8a0779751f
9 changed files with 29 additions and 13 deletions

View File

@@ -29,15 +29,16 @@
#define LOG_CHAT (1 << 6) #define LOG_CHAT (1 << 6)
#define LOG_COMMENT (1 << 7) #define LOG_COMMENT (1 << 7)
#define LOG_TELECOMMS (1 << 8) #define LOG_TELECOMMS (1 << 8)
#define LOG_OOC (1 << 9) #define LOG_NTSL (1 << 9)
#define LOG_ADMIN (1 << 10) #define LOG_OOC (1 << 10)
#define LOG_OWNERSHIP (1 << 11) #define LOG_ADMIN (1 << 11)
#define LOG_GAME (1 << 12) #define LOG_OWNERSHIP (1 << 12)
#define LOG_ADMIN_PRIVATE (1 << 13) #define LOG_GAME (1 << 13)
#define LOG_ASAY (1 << 14) #define LOG_ADMIN_PRIVATE (1 << 14)
#define LOG_MECHA (1 << 15) #define LOG_ASAY (1 << 15)
#define LOG_VIRUS (1 << 16) #define LOG_MECHA (1 << 16)
#define LOG_CLONING (1 << 17) #define LOG_VIRUS (1 << 17)
#define LOG_CLONING (1 << 18)
//Individual logging panel pages //Individual logging panel pages
#define INDIVIDUAL_ATTACK_LOG (LOG_ATTACK) #define INDIVIDUAL_ATTACK_LOG (LOG_ATTACK)
@@ -46,7 +47,7 @@
#define INDIVIDUAL_COMMS_LOG (LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS) #define INDIVIDUAL_COMMS_LOG (LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS)
#define INDIVIDUAL_OOC_LOG (LOG_OOC | LOG_ADMIN) #define INDIVIDUAL_OOC_LOG (LOG_OOC | LOG_ADMIN)
#define INDIVIDUAL_OWNERSHIP_LOG (LOG_OWNERSHIP) #define INDIVIDUAL_OWNERSHIP_LOG (LOG_OWNERSHIP)
#define INDIVIDUAL_SHOW_ALL_LOG (LOG_ATTACK | LOG_SAY | LOG_WHISPER | LOG_EMOTE | LOG_DSAY | LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS | LOG_OOC | LOG_ADMIN | LOG_OWNERSHIP | LOG_GAME) #define INDIVIDUAL_SHOW_ALL_LOG (LOG_ATTACK | LOG_SAY | LOG_WHISPER | LOG_EMOTE | LOG_DSAY | LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS | LOG_NTSL | LOG_OOC | LOG_ADMIN | LOG_OWNERSHIP | LOG_GAME)
#define LOGSRC_CLIENT "Client" #define LOGSRC_CLIENT "Client"
#define LOGSRC_MOB "Mob" #define LOGSRC_MOB "Mob"

View File

@@ -1,6 +1,6 @@
#define LOG_LOOC (1 << 15) #define LOG_LOOC (1 << 19)
#define INDIVIDUAL_LOOC_LOG (LOG_LOOC) #define INDIVIDUAL_LOOC_LOG (LOG_LOOC)
#undef INDIVIDUAL_SHOW_ALL_LOG #undef INDIVIDUAL_SHOW_ALL_LOG
#define INDIVIDUAL_SHOW_ALL_LOG (LOG_ATTACK | LOG_SAY | LOG_WHISPER | LOG_EMOTE | LOG_DSAY | LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS | LOG_OOC | LOG_ADMIN | LOG_OWNERSHIP | LOG_GAME | LOG_LOOC) #define INDIVIDUAL_SHOW_ALL_LOG (LOG_ATTACK | LOG_SAY | LOG_WHISPER | LOG_EMOTE | LOG_DSAY | LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS | LOG_NTSL | LOG_OOC | LOG_ADMIN | LOG_OWNERSHIP | LOG_GAME | LOG_LOOC)

View File

@@ -139,6 +139,10 @@
if (CONFIG_GET(flag/log_telecomms)) if (CONFIG_GET(flag/log_telecomms))
WRITE_LOG(GLOB.world_telecomms_log, "TCOMMS: [text]") WRITE_LOG(GLOB.world_telecomms_log, "TCOMMS: [text]")
/proc/log_ntsl(text)
if (CONFIG_GET(flag/log_ntsl))
WRITE_LOG(GLOB.world_ntsl_log, "NTSL: [text]")
/proc/log_chat(text) /proc/log_chat(text)
if (CONFIG_GET(flag/log_pda)) if (CONFIG_GET(flag/log_pda))
//same thing here //same thing here

View File

@@ -20,6 +20,8 @@ GLOBAL_VAR(world_pda_log)
GLOBAL_PROTECT(world_pda_log) GLOBAL_PROTECT(world_pda_log)
GLOBAL_VAR(world_telecomms_log) GLOBAL_VAR(world_telecomms_log)
GLOBAL_PROTECT(world_telecomms_log) GLOBAL_PROTECT(world_telecomms_log)
GLOBAL_VAR(world_ntsl_log)
GLOBAL_PROTECT(world_ntsl_log)
GLOBAL_VAR(world_manifest_log) GLOBAL_VAR(world_manifest_log)
GLOBAL_PROTECT(world_manifest_log) GLOBAL_PROTECT(world_manifest_log)
GLOBAL_VAR(query_debug_log) GLOBAL_VAR(query_debug_log)

View File

@@ -75,6 +75,8 @@
/datum/config_entry/flag/log_telecomms // log telecomms messages /datum/config_entry/flag/log_telecomms // log telecomms messages
/datum/config_entry/flag/log_ntsl // log NTSL compilation
/datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases. /datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases.
/datum/config_entry/flag/log_world_topic // log all world.Topic() calls /datum/config_entry/flag/log_world_topic // log all world.Topic() calls
@@ -483,4 +485,4 @@
/datum/config_entry/number/reopen_roundstart_suicide_roles_delay /datum/config_entry/number/reopen_roundstart_suicide_roles_delay
min_val = 30 min_val = 30
/datum/config_entry/flag/reopen_roundstart_suicide_roles_command_report /datum/config_entry/flag/reopen_roundstart_suicide_roles_command_report

View File

@@ -647,6 +647,8 @@
log_comment(log_text) log_comment(log_text)
if(LOG_TELECOMMS) if(LOG_TELECOMMS)
log_telecomms(log_text) log_telecomms(log_text)
if(LOG_NTSL)
log_ntsl(log_text)
if(LOG_OOC) if(LOG_OOC)
log_ooc(log_text) log_ooc(log_text)
if(LOG_LOOC) // yogs - LOOC log if(LOG_LOOC) // yogs - LOOC log

View File

@@ -114,6 +114,7 @@ GLOBAL_VAR(restart_counter)
GLOB.world_attack_log = "[GLOB.log_directory]/attack.log" GLOB.world_attack_log = "[GLOB.log_directory]/attack.log"
GLOB.world_pda_log = "[GLOB.log_directory]/pda.log" GLOB.world_pda_log = "[GLOB.log_directory]/pda.log"
GLOB.world_telecomms_log = "[GLOB.log_directory]/telecomms.log" GLOB.world_telecomms_log = "[GLOB.log_directory]/telecomms.log"
GLOB.world_ntsl_log = "[GLOB.log_directory]/ntsl.log"
GLOB.world_manifest_log = "[GLOB.log_directory]/manifest.log" GLOB.world_manifest_log = "[GLOB.log_directory]/manifest.log"
GLOB.world_href_log = "[GLOB.log_directory]/hrefs.log" GLOB.world_href_log = "[GLOB.log_directory]/hrefs.log"
GLOB.sql_error_log = "[GLOB.log_directory]/sql.log" GLOB.sql_error_log = "[GLOB.log_directory]/sql.log"

View File

@@ -112,6 +112,9 @@ LOG_PDA
## log telecomms messages ## log telecomms messages
LOG_TELECOMMS LOG_TELECOMMS
## log ntsl compilations
LOG_NTSL
## log prayers ## log prayers
LOG_PRAYER LOG_PRAYER

View File

@@ -51,5 +51,6 @@
to_chat(user, "<span class='warning'>You are banned from using NTSL.</span>") to_chat(user, "<span class='warning'>You are banned from using NTSL.</span>")
return return
if(Compiler) if(Compiler)
user.log_message(rawcode, LOG_NTSL)
return Compiler.Compile(rawcode) return Compiler.Compile(rawcode)
//end-NTSL //end-NTSL