Skip to content

Commit

Permalink
remove ahahah
Browse files Browse the repository at this point in the history
  • Loading branch information
lzk228 committed Jan 9, 2025
1 parent ccd1fb1 commit 298fc76
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Content.Server/Chat/Managers/ChatSanitizationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@ public bool TrySanitizeEmoteShorthands(string message,
message = r.Replace(message, string.Empty);
}

// Corvax-Start
var laughPattern = @"(?i)\b[ах]+(?:х[ах]*)*\b";
var laughRegex = new Regex(laughPattern, RegexOptions.IgnoreCase);
var laughMatch = laughRegex.Match(sanitized);

if (laughMatch.Success)
{
emote = _loc.GetString("chatsan-laughs", ("ent", speaker)); // Используем "смеётся"
message = laughRegex.Replace(message, ""); // Удаляем смех
}
// Corvax-End

sanitized = message.Trim();
return emote is not null;
}
Expand Down

0 comments on commit 298fc76

Please sign in to comment.