Class ProfanityUtils
Utility functions for interacting with Eco's profanity check system.
Inheritance
Namespace: Eco.Gameplay.Utils
Assembly: Eco.Gameplay.dll
Syntax
public static class ProfanityUtils : Object
Methods
ReplaceIfNotClear(ref String, String, Player)
Replaces text in case it contains profanity and informs the player with a warning
Declaration
public static bool ReplaceIfNotClear(ref string text, string replaceText, Player player)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text System.String to profanity check |
System.String | replaceText | Text System.String to replace profanity with. |
Player | player | Player this profanity originated from. |
Returns
Type | Description |
---|---|
System.Boolean | True if profanity was detected |
WarnPlayer(Player, String, String)
Informs a Player instance about inappropriate text found in a profanity check.
Declaration
public static void WarnPlayer(Player player, string newText, string oldText)
Parameters
Type | Name | Description |
---|---|---|
Player | player | Player to inform about the detected profanity. |
System.String | newText | Original uncensored text System.String to inform the user about. |
System.String | oldText | The new filtered text System.String the profanity was replaced with. |
WarnPlayer(INetClient, String, String)
Informs a Player instance about inappropriate text found in a profanity check.
Declaration
public static void WarnPlayer(INetClient client, string newText, string oldText)
Parameters
Type | Name | Description |
---|---|---|
INetClient | client | INetClient instance to inform about the detected profanity. |
System.String | newText | Original uncensored text System.String to inform the user about. |
System.String | oldText | The new filtered text System.String the profanity was replaced with. |