From 3b441bfd281e3f7e474290b27b1d396a2ed9cd58 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 13 Feb 2021 19:03:27 -0700 Subject: [PATCH] kay --- .../controllers/configuration/entries/logging.dm | 3 +++ code/modules/client/client_procs.dm | 16 +++++++++------- tgstation.dme | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 code/controllers/configuration/entries/logging.dm diff --git a/code/controllers/configuration/entries/logging.dm b/code/controllers/configuration/entries/logging.dm new file mode 100644 index 0000000000..2b08d62d54 --- /dev/null +++ b/code/controllers/configuration/entries/logging.dm @@ -0,0 +1,3 @@ +/// forces log_href for tgui +/datum/config_entry/flag/emergency_tgui_logging + config_entry_value = FALSE diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 05d966a0fc..970e34cabe 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -76,9 +76,15 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( to_chat(src, "Your previous action was ignored because you've done too many in a second") return - //Logs all hrefs, except chat pings - if(!(href_list.len == 4 && href_list["tgui"] == 1 && href_list["window_id"] == browseroutput && href_list["type"] == "ping" && href_list["payload"] == "%7B%22index%22%3A2%7D")) - log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]") + + // Tgui Topic middleware + if(tgui_Topic(href_list)) + if(CONFIG_GET(flag/emergency_tgui_logging)) + log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]") + return + + //Logs all hrefs + log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]") //byond bug ID:2256651 if (asset_cache_job && (asset_cache_job in completed_asset_jobs)) @@ -105,10 +111,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( handle_statpanel_click(href_list) return - // Tgui Topic middleware - if(tgui_Topic(href_list)) - return - // Admin PM if(href_list["priv_msg"]) cmd_admin_pm(href_list["priv_msg"],null) diff --git a/tgstation.dme b/tgstation.dme index f733aee27c..45c16fab9d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -293,6 +293,7 @@ #include "code\controllers\configuration\entries\fail2topic.dm" #include "code\controllers\configuration\entries\game_options.dm" #include "code\controllers\configuration\entries\general.dm" +#include "code\controllers\configuration\entries\logging.dm" #include "code\controllers\configuration\entries\persistence.dm" #include "code\controllers\configuration\entries\plushies.dm" #include "code\controllers\configuration\entries\policy.dm"