Show / Hide Table of Contents

Class ProfanityUtils

Utility functions for interacting with Eco's profanity check system.

Inheritance
System.Object
ProfanityUtils
Namespace: Eco.Gameplay.Utils
Assembly: Eco.Gameplay.dll
Syntax
public static class ProfanityUtils : Object

Methods

CheckAndWarn(String, INotificationReceiver)

Check text in case it contains profanity and informs the player with a warning

Declaration
public static bool CheckAndWarn(string text, INotificationReceiver target)
Parameters
Type Name Description
System.String text

Text System.String to profanity check

INotificationReceiver target

Player this profanity originated from.

Returns
Type Description
System.Boolean

True if profanity was detected

ReplaceIfNotClear(ref String, String, INotificationReceiver)

Replaces text in case it contains profanity and informs the player with a warning

Declaration
public static bool ReplaceIfNotClear(ref string text, string replaceText, INotificationReceiver target)
Parameters
Type Name Description
System.String text

Text System.String to profanity check

System.String replaceText

Text System.String to replace profanity with.

INotificationReceiver target

Player this profanity originated from.

Returns
Type Description
System.Boolean

True if profanity was detected

Warn(INotificationReceiver, String, String)

Informs a Player instance about inappropriate text found in a profanity check.

Declaration
public static void Warn(INotificationReceiver target, string newText, string oldText)
Parameters
Type Name Description
INotificationReceiver target

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.

Warn(INetClient, String, String)

RPC profanity version of Warn

Declaration
public static void Warn(INetClient client, string newText, string oldText)
Parameters
Type Name Description
INetClient client
System.String newText
System.String oldText
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾