diff --git a/Content.Server/Chat/Systems/ChatSystem.Radio.cs b/Content.Server/Chat/Systems/ChatSystem.Radio.cs index ef97ad83b1..e764b9a387 100644 --- a/Content.Server/Chat/Systems/ChatSystem.Radio.cs +++ b/Content.Server/Chat/Systems/ChatSystem.Radio.cs @@ -73,6 +73,9 @@ public sealed partial class ChatSystem chan = _prototypeManager.Index("Common"); } + // Re-capitalize message since we removed the prefix. + message = SanitizeMessageCapital(source, message); + if (_inventory.TryGetSlotEntity(source, "ears", out var entityUid) && TryComp(entityUid, out HeadsetComponent? headset)) { diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index 24986dac0c..1cfadbeee1 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -1,5 +1,6 @@ using System.Linq; using System.Text; +using System.Text.RegularExpressions; using Content.Server.Administration.Logs; using Content.Server.Administration.Managers; using Content.Server.Chat.Managers; @@ -244,17 +245,22 @@ public sealed partial class ChatSystem : SharedChatSystem private void SendEntitySpeak(EntityUid source, string originalMessage, bool hideChat = false) { - if (!_actionBlocker.CanSpeak(source)) return; + if (!_actionBlocker.CanSpeak(source)) + return; var (message, channel) = GetRadioPrefix(source, originalMessage); + if (channel != null) + { + _listener.PingListeners(source, message, channel); + SendEntityWhisper(source, message, hideChat); + return; + } + message = TransformSpeech(source, message); if (message.Length == 0) return; - if (channel != null) - _listener.PingListeners(source, message, channel); - var messageWrap = Loc.GetString("chat-manager-entity-say-wrap-message", ("entityName", Name(source))); @@ -271,7 +277,8 @@ public sealed partial class ChatSystem : SharedChatSystem private void SendEntityWhisper(EntityUid source, string originalMessage, bool hideChat = false) { - if (!_actionBlocker.CanSpeak(source)) return; + if (!_actionBlocker.CanSpeak(source)) + return; var message = TransformSpeech(source, originalMessage); if (message.Length == 0)