Class SteamWordsTextFilter
Filter out specific words replacing them with a given character. Note that this is mainly just an example, and if you want to make a full profanity filter, it is recommended you find a word list and programmatically load and check it in an efficient manner.
Namespace: KaijuSolutions.SteamMultiplayerEngine
Syntax
public sealed class SteamWordsTextFilter : SteamTextFilter
Fields
replacement
The character to replace all characters in the filtered words with.
Declaration
public char replacement
Field Value
| Type | Description |
|---|---|
| System.Char |
trustFriends
If enabled, filtering will not be applied to messages from friends and ourselves.
Declaration
public bool trustFriends
Field Value
| Type | Description |
|---|---|
| System.Boolean |
words
The words to filter and replace. Note that this is mainly just an example, and if you want to make a full profanity filter, it is recommended you find a word list and programmatically load and check it in an efficient manner.
Declaration
public string[] words
Field Value
| Type | Description |
|---|---|
| System.String[] |
Methods
Filter(ref String, UInt64)
Filter logic.
Declaration
public override void Filter(ref string chat, ulong id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | chat | The chat message to apply the filter to. Must not set to NULL. |
| System.UInt64 | id | The ID of the player that the message is from. |