Logo
Explore Help
Sign In
juni/crystall-punk-14
1
0
Fork 0
You've already forked crystall-punk-14
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
LocalHelperRefactor
crystall-punk-14/Content.Server/Chat/Managers/IChatSanitizationManager.cs

14 lines
320 B
C#
Raw Permalink Normal View History

Removes smilies from existence. (kinda) (#5649)
2021-12-02 18:49:19 -06:00
using System.Diagnostics.CodeAnalysis;
namespace Content.Server.Chat.Managers;
public interface IChatSanitizationManager
{
public void Initialize();
Sanitize shorthand emotes throughought the whole message (#28645) * Rename ChatSanitizationManager to ChatEmoteSanitizationManager The prior name was kind of confusing as there's a emote one and then now there's also chat expansion happening in the accent system, so knowing which I actually need to edit is useful. So, I just need to keep myself not confused. * Rename smileyToEmote and remove punctuation duplicates The name SmileyToEmote is just... Bad. Plus, I needed to remove the punctuation duplicates as that would break any kind of regex parsing that I tried. * Switch to regex from checking end of string I also changed from System.Globalization to ILocalizationManager. Writing that regex was definitely an experience. * Document regex and the manager * Rename it back * Simplify regex
2024-10-17 09:01:32 -05:00
public bool TrySanitizeEmoteShorthands(string input,
EntityUid speaker,
out string sanitized,
[NotNullWhen(true)] out string? emote);
Removes smilies from existence. (kinda) (#5649)
2021-12-02 18:49:19 -06:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.5 Page: 340ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API