Fixes admin deadsay not showing up for admins in the lobby (#63652)

* Fixes admin deadsay not showing up for admins in the lobby

* Applied code review suggestion
This commit is contained in:
GoldenAlpharex
2022-01-03 14:49:37 -06:00
committed by GitHub
parent beb10cffb8
commit c1e77e69e0
+3 -2
View File
@@ -27,9 +27,10 @@
var/rendered = "<span class='game deadsay'>[span_prefix("DEAD:")] [span_name("[rank_name]([admin_name])")] says, <span class='message'>\"[emoji_parse(msg)]\"</span></span>"
for (var/mob/M in GLOB.player_list)
if(isnewplayer(M))
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 || (M.client.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 give to Administrators and above
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)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!