Fix incorrectly ported emote sanitization (#7370)

This commit is contained in:
mirrorcult
2022-04-01 00:08:26 -07:00
committed by GitHub
parent 3005777ef9
commit 634cf59527

View File

@@ -82,22 +82,21 @@ public sealed class ChatSystem : EntitySystem
return;
}
// Sus
if (player?.AttachedEntity is { Valid: true } entity && source != entity)
{
return;
}
if (!CanSendInGame(message, shell, player))
return;
message = SanitizeInGameICMessage(source, message, out var emoteStr);
// Is this -actually- an emote, and is a player sending it?
// Was there an emote in the message? If so, send it.
if (player != null && emoteStr != message && emoteStr != null)
{
SendEntityEmote(source, emoteStr, hideChat);
return;
}
// Sus
if (player?.AttachedEntity is { Valid: true } entity && source != entity)
{
return;
}
// Otherwise, send whatever type.