Fix Emote Chat Sanitizer (#32940)
* Fix bug? * Fix :) * aaaa * AAAA!!! * comment * Nicer code * What's a pull requestWhat's a pull request?
This commit is contained in:
@@ -35,7 +35,7 @@ public sealed class ChatSanitizationManager : IChatSanitizationManager
|
||||
{ ":D", "chatsan-smiles-widely" },
|
||||
{ "D:", "chatsan-frowns-deeply" },
|
||||
{ ":O", "chatsan-surprised" },
|
||||
{ ":3", "chatsan-smiles" }, //nope
|
||||
{ ":3", "chatsan-smiles" },
|
||||
{ ":S", "chatsan-uncertain" },
|
||||
{ ":>", "chatsan-grins" },
|
||||
{ ":<", "chatsan-pouts" },
|
||||
|
||||
@@ -746,8 +746,9 @@ public sealed partial class ChatSystem : SharedChatSystem
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private string SanitizeInGameICMessage(EntityUid source, string message, out string? emoteStr, bool capitalize = true, bool punctuate = false, bool capitalizeTheWordI = true)
|
||||
{
|
||||
var newMessage = message.Trim();
|
||||
newMessage = SanitizeMessageReplaceWords(newMessage);
|
||||
var newMessage = SanitizeMessageReplaceWords(message.Trim());
|
||||
|
||||
GetRadioKeycodePrefix(source, newMessage, out newMessage, out var prefix);
|
||||
|
||||
// Sanitize it first as it might change the word order
|
||||
_sanitizer.TrySanitizeEmoteShorthands(newMessage, source, out newMessage, out emoteStr);
|
||||
@@ -759,7 +760,7 @@ public sealed partial class ChatSystem : SharedChatSystem
|
||||
if (punctuate)
|
||||
newMessage = SanitizeMessagePeriod(newMessage);
|
||||
|
||||
return newMessage;
|
||||
return prefix + newMessage;
|
||||
}
|
||||
|
||||
private string SanitizeInGameOOCMessage(string message)
|
||||
|
||||
Reference in New Issue
Block a user