From 149654be88b9e9b988027a8e6ff6f691ba1cfea4 Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Fri, 26 Jan 2024 21:31:54 -0500 Subject: [PATCH] Fix color tags in admin logs (#24606) --- Content.Server/Chat/Systems/ChatSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index 1b5c8b83fa..650a8b2947 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -425,11 +425,12 @@ public sealed partial class ChatSystem : SharedChatSystem name = FormattedMessage.EscapeText(name); // color the name unless it's something like "the old man" + string coloredName = name; if (!TryComp(source, out var grammar) || grammar.ProperNoun == true) - name = $"[color={GetNameColor(name)}]{name}[/color]"; + coloredName = $"[color={GetNameColor(name)}]{name}[/color]"; var wrappedMessage = Loc.GetString(speech.Bold ? "chat-manager-entity-say-bold-wrap-message" : "chat-manager-entity-say-wrap-message", - ("entityName", name), + ("entityName", coloredName), ("verb", Loc.GetString(_random.Pick(speech.SpeechVerbStrings))), ("fontType", speech.FontId), ("fontSize", speech.FontSize),