From 8e1b5bc300c46615d0c6f6f8108aeff865d00d3f Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Fri, 2 Sep 2022 08:37:57 +0200 Subject: [PATCH] admin deadsay now uses deadchat_broadcasts as it ought to. (#69593) About The Pull Request The admin deadsay command is old and still based on the assumption that ghosts and admins are the only ones that can hear deadchat messages, while using a snowflake loop that's pretty much superseded by the deadchat_broadcast proc. --- code/modules/admin/verbs/deadsay.dm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 6a26aef1471..221aca3da99 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -25,14 +25,8 @@ rank_name = pick(strings("admin_nicknames.json", "ranks", "config")) admin_name = pick(strings("admin_nicknames.json", "names", "config")) var/name_and_rank = "[span_tooltip(rank_name, "STAFF")] ([admin_name])" - var/rendered = "[span_prefix("DEAD:")] [name_and_rank] says, \"[emoji_parse(msg)]\"" - for (var/mob/M in GLOB.player_list) - var/admin_holder = M.client?.holder - if(isnewplayer(M) && !admin_holder) // We want to make sure admins can see this when in the lobby too! - continue - if (M.stat == DEAD || (admin_holder && (M.client?.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only given to Administrators and above - to_chat(M, rendered, confidential = TRUE) + deadchat_broadcast("[span_prefix("DEAD:")] [name_and_rank] says, \"[emoji_parse(msg)]\"") SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!