From 1b2316077d9addb7a61b23ff55c5dc7a42ea102c Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 3 Jan 2022 23:03:24 +0100 Subject: [PATCH] [MIRROR] Fixes admin deadsay not showing up for admins in the lobby [MDB IGNORE] (#10420) * 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 * Fixes admin deadsay not showing up for admins in the lobby Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Co-authored-by: GoldenAlpharex --- code/modules/admin/verbs/deadsay.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 70f473d52ca..75e2749ed39 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -27,9 +27,10 @@ var/rendered = "[span_prefix("DEAD:")] [span_name("[rank_name]([admin_name])")] says, \"[emoji_parse(msg)]\"" 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!