Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stops mentors seeing debug messages #6598

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions code/__HELPERS/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ GLOBAL_VAR_INIT(log_end, world.system_type == UNIX ? ascii2text(13) : "")

GLOB.STUI?.debug.Add("\[[time]]DEBUG: [text]")
GLOB.STUI?.processing |= STUI_LOG_DEBUG
for(var/client/C in GLOB.admins)
if(C.prefs.toggles_chat & CHAT_DEBUGLOGS)
to_chat(C, "DEBUG: [text]", type = MESSAGE_TYPE_DEBUG)
for(var/client/client in GLOB.admins)
if(CLIENT_IS_STAFF(client))
if(client.prefs.toggles_chat & CHAT_DEBUGLOGS)
to_chat(client, "DEBUG: [text]", type = MESSAGE_TYPE_DEBUG)


/proc/log_game(text)
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/mc/failsafe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
if (. == 1) //We were able to create a new master
SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set
Master.Initialize(10, FALSE, TRUE) //Need to manually start the MC, normally world.new would do this
to_chat(GLOB.admins, SPAN_ADMINNOTICE("MC successfully recreated after recovering all subsystems!"))
message_admins(SPAN_ADMINNOTICE("MC successfully recreated after recovering all subsystems!"))
else
message_admins(SPAN_BOLDANNOUNCE("Failed to create new MC!"))

Expand All @@ -169,7 +169,7 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
if (. == 1) //We were able to create a new master
SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set
Master.Initialize(10, FALSE, TRUE) //Need to manually start the MC, normally world.new would do this
to_chat(GLOB.admins, SPAN_ADMINNOTICE("MC successfully recreated after deleting and recreating all subsystems!"))
message_admins(SPAN_ADMINNOTICE("MC successfully recreated after deleting and recreating all subsystems!"))
else
message_admins(SPAN_BOLDANNOUNCE("Failed to create new MC!"))

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/mc/master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be put offline."
BadBoy.flags |= SS_NO_FIRE
if(msg)
to_chat(GLOB.admins, SPAN_BOLDANNOUNCE("[msg]"))
message_admins(SPAN_BOLDANNOUNCE("[msg]"))
log_world(msg)

if (istype(Master.subsystems))
Expand Down
8 changes: 8 additions & 0 deletions code/modules/tgchat/to_chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
if(target == world)
target = GLOB.clients

var/list/true_targets = list()
if(target == GLOB.admins)
for(var/admin in target)
var/client/admin_client = CLIENT_FROM_VAR(admin)
if(CLIENT_IS_STAFF(admin_client))
true_targets += admin_client
target = true_targets

// Build a message
var/message = list()
if(type) message["type"] = type
Expand Down
Loading