gives PRRs access to debug logs (#17848)

* PRR access to debug logs

* Update code/__HELPERS/_logging.dm

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
Charlie
2022-05-25 15:40:10 +01:00
committed by GitHub
co-authored by AffectedArc07
parent dbde2679aa
commit 5d9dbe82ed
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ GLOBAL_PROTECT(log_end)
rustg_log_write(GLOB.world_game_log, "DEBUG: [text][GLOB.log_end]")
for(var/client/C in GLOB.admins)
if(check_rights(R_DEBUG, 0, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS))
if(check_rights(R_DEBUG | R_VIEWRUNTIMES, FALSE, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS))
to_chat(C, "DEBUG: [text]")
/proc/log_game(text)
@@ -149,7 +149,7 @@ GLOBAL_PROTECT(log_end)
/proc/log_gc(text)
rustg_log_write(GLOB.gc_log, "[text][GLOB.log_end]")
for(var/client/C in GLOB.admins)
if(check_rights(R_DEBUG, FALSE, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS))
if(check_rights(R_DEBUG | R_VIEWRUNTIMES, FALSE, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS))
to_chat(C, "GC DEBUG: [text]")
#endif
+2 -1
View File
@@ -280,6 +280,7 @@ GLOBAL_LIST_INIT(admin_verbs_maintainer, list(
verbs += /client/proc/view_runtimes
verbs += /client/proc/cmd_display_del_log
verbs += /client/proc/cmd_display_del_log_simple
verbs += /client/proc/toggledebuglogs
spawn(1) // This setting exposes the profiler for people with R_VIEWRUNTIMES. They must still have it set in cfg/admin.txt
control_freak = 0
@@ -925,7 +926,7 @@ GLOBAL_LIST_INIT(admin_verbs_maintainer, list(
set name = "Toggle Debug Log Messages"
set category = "Preferences"
if(!check_rights(R_DEBUG))
if(!check_rights(R_VIEWRUNTIMES | R_DEBUG))
return
prefs.toggles ^= PREFTOGGLE_CHAT_DEBUGLOGS