From 0073dbce092e1b7d72af3f575debc5a9aff7d146 Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Fri, 2 Sep 2022 12:30:08 +0200
Subject: [PATCH] [MIRROR] admin deadsay now uses deadchat_broadcasts as it
ought to. [MDB IGNORE] (#16013)
* 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.
* admin deadsay now uses deadchat_broadcasts as it ought to.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
---
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!