From 5437e34b650aaa60a533da3cc545f437db0e8d48 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 15 Mar 2021 01:21:19 +0100 Subject: [PATCH] [MIRROR] Non-admin observers can now use emoji that start with d or p at the beginning of a message without admin command warnings. (#4162) * Observers can now use emojis at the start of messages without the risk of triggering admin commands. (#57433) Added a client.holder check to the line about radio extensions for admin chat and deadchat commands. It means common observers can finally spam dchat with plushie emoji. Admin observers still have to deadmin before using emojis safely, until someone takes the time to refactor saycode mods so these admin commands only acept the comma prefix (luckily, observer/get_message_mods() doesn't trim the message). * Non-admin observers can now use emoji that start with d or p at the beginning of a message without admin command warnings. Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/mob/dead/observer/observer_say.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/dead/observer/observer_say.dm b/code/modules/mob/dead/observer/observer_say.dm index fcb8b7994c4..eed1771c715 100644 --- a/code/modules/mob/dead/observer/observer_say.dm +++ b/code/modules/mob/dead/observer/observer_say.dm @@ -15,7 +15,7 @@ return var/list/message_mods = list() message = get_message_mods(message, message_mods) - if(client && (message_mods[RADIO_EXTENSION] == MODE_ADMIN || message_mods[RADIO_EXTENSION] == MODE_DEADMIN)) + if(client?.holder && (message_mods[RADIO_EXTENSION] == MODE_ADMIN || message_mods[RADIO_EXTENSION] == MODE_DEADMIN)) message = trim_left(copytext_char(message, length(message_mods[RADIO_KEY]) + 2)) if(message_mods[RADIO_EXTENSION] == MODE_ADMIN) client.cmd_admin_say(message)