Merge remote-tracking branch 'upstream/master' into develop

This commit is contained in:
Evil Factory
2026-06-16 09:40:27 -03:00
74 changed files with 1167 additions and 408 deletions
@@ -8,6 +8,17 @@ namespace Barotrauma.Networking
{
partial class ChatMessage
{
private static string SanitizeText(Client client, string text)
{
if (!client.HasPermission(ClientPermissions.SpamImmunity))
{
// Prevent clients without spam immunity from being able to use RichString features
text = text.Replace('‖', ' ');
}
return text;
}
public static void ServerRead(IReadMessage msg, Client c)
{
c.KickAFKTimer = 0.0f;
@@ -69,8 +80,7 @@ namespace Barotrauma.Networking
txt = msg.ReadString() ?? "";
}
// Sanitize incoming text message from client so they can't use RichString features
txt = txt.Replace('‖', ' ');
txt = SanitizeText(c, txt);
if (!NetIdUtils.IdMoreRecent(ID, c.LastSentChatMsgID)) { return; }