• Home
  • Documentation
  • Guides
  • FAQ
  • Get Llama Chat
Search Results for

    Show / Hide Table of Contents
    • LlamaSoftware.Chat
      • AbstractPlayerDatabase<T>
      • AreaTriggeredChannelJoiner
      • BaseNetworkManager
      • ChatSystem
      • ChatSystemConstants
      • InMemoryPlayerDatabase
      • LlamaChatSettings
      • LlamaChatSettingsProvider
      • Player_Chat
      • SQLitePlayerDatabase
    • LlamaSoftware.Chat.CustomEditors
      • ChatPanelEditor
      • ChatPopupEditor
      • ChatSystemEditor
      • LlamaChatSettingsCreator
      • Player_ChatEditor
      • SocialUIPopupEditor
      • Utilities
    • LlamaSoftware.Chat.Demo
      • ChatCommandHandler
      • CreateAccount
      • DemoGuildJoiner
      • DemoGuildLeaver
      • DummyNameGenerator
      • DynamicChatPopup
      • InMemoryPlayerLogin
      • Login
      • LoginController
      • SettingsPanel
    • LlamaSoftware.Chat.Demo.Lobby
      • LobbyController
      • LobbyLoginController
      • LobbyNetworkManager
      • LobbyPlayer
      • StressTestSender
    • LlamaSoftware.Chat.Demo.Model
      • LobbyPlayerListMessage
      • LoginMessage
      • LoginResponseMessage
      • RegisterPlayerMessage
      • RegisterUserResponseMessage
    • LlamaSoftware.Chat.Model
      • AddRemoveFriendMessage
      • BlockListMessage
      • BlockUnblockPlayerMessage
      • ChatChannel
      • ChatChannel.ChatType
      • ChatEntry
      • ChatMessage
      • FriendsListMessage
      • FriendUpdateMessage
      • Player
      • PlayerToSocialPlayerConverter
      • ServerBroadcastMessage
      • SocialPlayer
      • SubscribeToChannelsMessage
    • LlamaSoftware.Chat.UI
      • BlockedPlayer
      • ChatChannelClickHandler
      • ChatPanel
      • ChatPanel.DirectChatPlayer
      • ChatPanel.UIChatChannel
      • ChatPopup
      • ChatPopupClickHandler
      • Command
      • DynamicChatItem
      • DynamicChatItemEvent
      • Friend
      • Friend.Status
      • LinkType
      • SocialClickHandler
      • SocialUI
      • SocialUIClickHandler
      • SocialUIPopup
      • UIChatMessage
      • WordFilter

    Class WordFilter

    Model for Word Filters. Input strings are matched against RegularExpressions to replace any blacklisted words with the ReplaceWith text. If IgnoreCase is provided then the regular expression can be more simple and match more aggressively to catch words where people may try to avoid the filter by writing "pOOp" instead of "poop". regex must be generated and applied outside of this class. See the System.Text.RegularExpressions.Regex documentation for how to build it correctly, or just use RebuildWordFilterDictionary().

    Example setup: RegularExpression = "cats" ReplaceWith = "*" IgnoreCase = true User inputs: "I love CATS!" Message sent over network: "I love *!" All users receive "I love *!"

    Inheritance
    System.Object
    WordFilter
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LlamaSoftware.Chat.UI
    Assembly: LlamaSoftware.Chat.dll
    Syntax
    [Serializable]
    public class WordFilter

    Fields

    IgnoreCase

    Recommended to be true. This allows more simple RegularExpressions to block more simple ways people tend to try to get around word filters. For example, if true a "poop" RegularExpression will block "PooP". If false, this string would not be matched and would not be blocked.

    If you change this value at runtime you must regenerate the regex.

    Declaration
    public bool IgnoreCase
    Field Value
    Type Description
    System.Boolean

    regex

    The actual System.Text.RegularExpressions.Regex that will be used to System.Text.RegularExpressions.Regex.IsMatch(System.String)ed against.

    Declaration
    public Regex regex
    Field Value
    Type Description
    System.Text.RegularExpressions.Regex

    RegularExpression

    The regular expression that will be tested against. Does not have to be in the format "/regularExpressionHere/g". It can be just "regularexpression" See System.Text.RegularExpressions.Regex documentation for more details.

    If you change this value at runtime you must regenerate the regex.

    Declaration
    public string RegularExpression
    Field Value
    Type Description
    System.String

    ReplaceWith

    Text to replace the matched text with. For example if you block "cats", and this is set to "*" we will put "*" in place of "cats".

    Declaration
    public string ReplaceWith
    Field Value
    Type Description
    System.String
    In This Article
    Back to top Generated by DocFX