ChatMonitor 1.1.0

Respond to chat in real time. Mute offensive words; auto-respond to trigger words. Prevent abuse.

  1. mooeypoo
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.16
    Source Code:
    https://github.com/mooeypoo/ChatMonitor
    [​IMG]

    Automatically respond to messages in chat or commands sent by users. ChatMonitor is a flexible configurable system allowing you to respond to any trigger and decide whether the matching message:
    • Should be muted
    • Should be responded to directly to the user or publically as a chat broadcast
    • Cancelled, if it is part of an action
    • Trigger further commands to the server, or to other plugins.
    ChatMonitor allows you to define groups of words, each group with separate responses, replies, and options, all configurable in configuration files.

    Usage

    ChatMonitor automatically responds to input from players -- either a chat message or a triggered command -- with a configured response. As a result, the plugin can be used for various purposes, like:

    • Dealing with offensive language -- muting the message, sending a response to the user, and triggering a warning or ban command.
    • Responding to keywords -- allowing the message through and responding with a broadcast response to the entire chat.
    • Dealing with code of conduct violation -- responding to terms that indicate violation of the rules by muting the message, sending a warning to the user or general chat, or escalating by tiggering a followup command for warning or banning the user.
    Example #1: Responding to trigger "!rules" by broadcasting a message to the entire chat.
    [​IMG]

    Example #2: Responding to an offensive word by muting the message, sending the user a note, and triggering a command for a ban-manager plugin.
    [​IMG]

    Installaion and Configuration

    To install the plugin, download the latest release and upload it to your server's "plugins" directory.

    On the first run of the plugin, it will automatically create the base configuration files:
    • config.yml - contains the lists of words. The first default instance will contain a single group called "list"
    • ChatMonitor_wordgroup_[groupName].yml - contains the definition of the group of names including the trigger words and responses. The first default instance will produce the filename ChatMonitor_wordgroup_list.yml with an empty list of words.
    You should edit the list of words in the group file and provide your desired behavior within the config.

    If you wish to create more groups, you can add the group names to the list in config.yml and on reload, the individual group config files will be auto-created. Alternatively, you can create your own group configuration files by adding their group name to the list in the main config.yml and adding configuration files name ChatMonitor_wordgroup_[groupName].yml per each group.

    See below for configuration options.

    Note about initial operation
    Please note that the plugin will not do anything "out of the box" without editing the initial configuration to add a list of words.

    The example folder provides several lists to start your plugin with. Please feel free to use any and all -- do not forget to add the group name to your config.yml


    Commands
    There are several commands available. These commands work both in-game and in the console.

    Reload
    Code (Text):
    /chatmonitor reload
    Reloads configuration files and word lists without having to restart the server.

    Test
    Code (Text):
    /chatmonitor test (text)
    Tests whether the given text will be caught by the configuration and word lists, and which of the wordlist groups caught it.

    Configuration options
    There are several configuration options for both the main config.yml and the group config files:

    Main configuration (config.yml)
    • defaultmessage - Defines the fallback message in case a group does not have a message, or its message is empty.
    • groups - A list of group names for your word lists. Requires at least one entry.
    Example:
    Code (YAML):
    defaultmessage: "We don't allow this word here."
    groups
    :
     - list
    Group configuration (ChatMonitor_wordgroup_groupname.yml)
    Defines the behavior per each grouping of words. One of those is mandatory for behavior, but you can also define multiple groups with different behaviors, prompts, and word lists.
    • message - The message that will be displayed to the user
    • preventsend - true/false - Dictates whether the triggering text (or command) are allowed to be sent. True would mute the message or cancel the command. False would let it continue processing.
    • broadcast - true/false - Dictates whether the response (defined in the message field) is sent to the player specifically, or is broadcast to the chat as a whole.
    • includecommands - A list of commands that the system should also look at for matches. Default includes 'tell'. Do not include any slashes.
    • runcommands - A list of raw commands that will be triggered, one by one, in case that a player's message matches one of the words. These can be server commands or commands that trigger other plugins.
    • words - a list of words to match in a chat or command. These are 'regular expressions', meaning that the input can include word-boundaries and relevant rules, or just the desired words for a total-match. Please make sure the entries in the list are surrounded by quotes; example: "!rules"
    Example:
    Code (YAML):
    message: "We don't allow this word (%word%) on this server!"
    preventsend
    : true
    broadcast
    : false
    includecommands
    :
    - tell
    runcommands
    :
    - "ban %player% you shouldn't have said that!"
    words
    :
    - "badword"
    - "\bbadw[o0]rd\b"
    Note: Don't forget to reload the plugin after updating any of the config files.

    For a base list of regular expressions covering most known offensive words in English, please see the plugin wiki. You are welcome to use that list as a base for your server's anti-swear group.

    Permissions
    The plugin has several permissions:

    chatmonitor.words.ignore

    Any player with that permission will never trigger any of the words from any group. By default, this permission is assigned to ops.

    chatmonitor.cmd.reload
    Players with this permission will be allowed to use the reload action.

    chatmonitor.cmd.test
    Players with this permission will be allowed to use the test action.

    More information
    For more information and for feature requests and bugs, please visit the plugin's GitHub page.

    Servers running this plugin:
    None yet.​

    If your server is running this plugin, please notify me in a message, and I'll be happy to add it to the list!

Recent Updates

  1. v1.1.0
  2. New minor version release