Skip to content

Commit

Permalink
change message comparation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirus59 committed Feb 8, 2025
1 parent c9609be commit 68c499e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Content.Server/SS220/Chat/ChatManager.Censorship.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public string DeleteProhibitedCharacters(string message, EntityUid player)
public string DeleteProhibitedCharacters(string message, ICommonSession? player = null)
{
string censoredMessage = ProhibitedCharactersRegex().Replace(message, string.Empty);
if (message != censoredMessage && player != null)
if (message.Length != censoredMessage.Length && player != null)
{
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"{player.Name} tried to send a message with forbidden characters:\n{message}");
SendAdminAlert(Loc.GetString("chat-manager-founded-prohibited-characters", ("player", player.Name), ("message", message)));
Expand Down

0 comments on commit 68c499e

Please sign in to comment.