mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Logging configuration
This commit is contained in:
@@ -8,22 +8,6 @@
|
||||
|
||||
var/nudge_script_path = "nudge.py" // where the nudge.py script is located
|
||||
|
||||
var/log_ooc = 0 // log OOC channel
|
||||
var/log_access = 0 // log login/logout
|
||||
var/log_say = 0 // log client say
|
||||
var/log_admin = 0 // log admin actions
|
||||
var/log_debug = 1 // log debug output
|
||||
var/log_game = 0 // log game events
|
||||
var/log_vote = 0 // log voting
|
||||
var/log_whisper = 0 // log client whisper
|
||||
var/log_emote = 0 // log emotes
|
||||
var/log_attack = 0 // log attack messages
|
||||
var/log_adminchat = 0 // log admin chat messages
|
||||
var/log_adminwarn = 0 // log warnings admins get about bomb construction and such
|
||||
var/log_pda = 0 // log pda messages
|
||||
var/log_world_output = 0 // log world.log << messages
|
||||
var/log_runtimes = 0 // logs world.log to a file
|
||||
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
||||
var/pregame_timestart = 240 // Time it takes for the server to start the game
|
||||
var/allow_vote_restart = 0 // allow votes to restart
|
||||
var/allow_vote_mode = 0 // allow votes to change mode
|
||||
@@ -305,54 +289,6 @@
|
||||
if("forum_playerinfo_url")
|
||||
config.forum_playerinfo_url = value
|
||||
|
||||
if("log_ooc")
|
||||
config.log_ooc = 1
|
||||
|
||||
if("log_access")
|
||||
config.log_access = 1
|
||||
|
||||
if("log_say")
|
||||
config.log_say = 1
|
||||
|
||||
if("log_admin")
|
||||
config.log_admin = 1
|
||||
|
||||
if("log_debug")
|
||||
config.log_debug = 1
|
||||
|
||||
if("log_game")
|
||||
config.log_game = 1
|
||||
|
||||
if("log_vote")
|
||||
config.log_vote = 1
|
||||
|
||||
if("log_whisper")
|
||||
config.log_whisper = 1
|
||||
|
||||
if("log_attack")
|
||||
config.log_attack = 1
|
||||
|
||||
if("log_emote")
|
||||
config.log_emote = 1
|
||||
|
||||
if("log_adminchat")
|
||||
config.log_adminchat = 1
|
||||
|
||||
if("log_adminwarn")
|
||||
config.log_adminwarn = 1
|
||||
|
||||
if("log_pda")
|
||||
config.log_pda = 1
|
||||
|
||||
if("log_world_output")
|
||||
config.log_world_output = 1
|
||||
|
||||
if("log_hrefs")
|
||||
config.log_hrefs = 1
|
||||
|
||||
if("log_runtime")
|
||||
config.log_runtimes = 1
|
||||
|
||||
if("pregame_timestart")
|
||||
config.pregame_timestart = text2num(value)
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
var/datum/configuration_section/database_configuration/database
|
||||
/// Holder for the job configuration datum
|
||||
var/datum/configuration_section/job_configuration/jobs
|
||||
/// Holder for the logging configuration datum
|
||||
var/datum/configuration_section/logging_configuration/logging
|
||||
/// Holder for the MC configuration datum
|
||||
var/datum/configuration_section/mc_configuration/mc
|
||||
/// Holder for the ruins configuration datum
|
||||
@@ -37,6 +39,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
custom_sprites = new()
|
||||
database = new()
|
||||
jobs = new()
|
||||
logging = new()
|
||||
mc = new()
|
||||
ruins = new()
|
||||
|
||||
@@ -53,6 +56,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
custom_sprites.load_data(raw_config_data["custom_sprites_configuration"])
|
||||
database.load_data(raw_config_data["database_configuration"])
|
||||
jobs.load_data(raw_config_data["job_configuration"])
|
||||
logging.load_data(raw_config_data["logging_configuration"])
|
||||
mc.load_data(raw_config_data["mc_configuration"])
|
||||
ruins.load_data(raw_config_data["ruin_configuration"])
|
||||
|
||||
|
||||
@@ -53,4 +53,3 @@
|
||||
lowpop_job_map[kvp["name"]] = kvp["lowpop"]
|
||||
if(!isnull(kvp["highpop"]))
|
||||
highpop_job_map[kvp["name"]] = kvp["highpop"]
|
||||
pass()
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/// Config holder for all things regarding logging
|
||||
/datum/configuration_section/logging_configuration
|
||||
/// Log OOC messages
|
||||
var/ooc_logging = TRUE
|
||||
/// Log ingame say messages
|
||||
var/say_logging = TRUE
|
||||
/// Log admin actions
|
||||
var/admin_logging = TRUE
|
||||
/// Log client access (login/logout)
|
||||
var/access_logging = TRUE
|
||||
/// Log game events (roundstart, results, a lot of other things)
|
||||
var/game_logging = TRUE
|
||||
/// Enable logging of votes and their results
|
||||
var/vote_logging = TRUE
|
||||
/// Enable logging of whipers
|
||||
var/whisper_logging = TRUE
|
||||
/// Enable logging of emotes
|
||||
var/emote_logging = TRUE
|
||||
/// Enable logging of attacks between players
|
||||
var/attack_logging = TRUE
|
||||
/// Enable logging of PDA messages
|
||||
var/pda_logging = TRUE
|
||||
/// Enable runtime logging
|
||||
var/runtime_logging = TRUE
|
||||
/// Enable world.log output logging
|
||||
var/world_logging = TRUE
|
||||
/// Log hrefs
|
||||
var/href_logging = TRUE
|
||||
/// Log admin warning messages
|
||||
var/admin_warning_logging = TRUE
|
||||
/// Log asay messages
|
||||
var/adminchat_logging = TRUE
|
||||
/// Log debug messages
|
||||
var/debug_logging = TRUE
|
||||
|
||||
/datum/configuration_section/logging_configuration/load_data(list/data)
|
||||
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
|
||||
CONFIG_LOAD_BOOL(ooc_logging, data["enable_ooc_logging"])
|
||||
CONFIG_LOAD_BOOL(say_logging, data["enable_say_logging"])
|
||||
CONFIG_LOAD_BOOL(admin_logging, data["enable_admin_logging"])
|
||||
CONFIG_LOAD_BOOL(access_logging, data["enable_access_logging"])
|
||||
CONFIG_LOAD_BOOL(game_logging, data["enable_game_logging"])
|
||||
CONFIG_LOAD_BOOL(vote_logging, data["enable_vote_logging"])
|
||||
CONFIG_LOAD_BOOL(whisper_logging, data["enable_whisper_logging"])
|
||||
CONFIG_LOAD_BOOL(emote_logging, data["enable_emote_logging"])
|
||||
CONFIG_LOAD_BOOL(attack_logging, data["enable_attack_logging"])
|
||||
CONFIG_LOAD_BOOL(pda_logging, data["enable_pda_logging"])
|
||||
CONFIG_LOAD_BOOL(runtime_logging, data["enable_runtime_logging"])
|
||||
CONFIG_LOAD_BOOL(world_logging, data["enable_world_logging"])
|
||||
CONFIG_LOAD_BOOL(href_logging, data["enable_href_logging"])
|
||||
CONFIG_LOAD_BOOL(admin_warning_logging, data["enable_admin_warning_logging"])
|
||||
CONFIG_LOAD_BOOL(adminchat_logging, data["enable_adminchat_logging"])
|
||||
CONFIG_LOAD_BOOL(debug_logging, data["enable_debug_logging"])
|
||||
Reference in New Issue
Block a user