ChatSentry Wiki
  • ChatSentry
  • Features
  • Compatibility details
  • Module list & info
  • FAQ
  • Perms & Cmds
    • Bypass & misc. permissions
    • Commands (and their permissions)
      • In-game view
      • In depth command usages
  • guides
  • Plugin installation & configuring guide
  • Network bridge setup guide
  • In depth Word & Phrase Filter block list setup
  • In depth Chat Executor guide & entry examples
  • Config guides
    • Main/core config guide
    • Module config guides
      • Admin Notifier
      • Anti Chat Flood
      • Anti Command Prefix
      • Anti Join Flood
      • Anti Parrot
      • Anti Statue Spambot
      • Auto Grammar
      • Auto Punisher
      • Cap Limiter
      • Chat Cooldown
      • Chat Executor
      • Command Spy
      • Link & Ad Blocker
      • Spam Blocker
      • Unicode Remover
      • Word & Phrase Filter
    • Lang file guide
  • contact
  • Get support, talk with other cs users, make suggestions, etc.
  • Plugin Files
    • Default plugin configs & other files
      • /ChatSentry
        • config.yml
        • lang.yml
        • storage.yml
        • changelog.txt
      • /ChatSentry/Modules
        • admin-notifier.yml
        • anti-chat-flood.yml
        • anti-command-prefix.yml
        • anti-join-flood.yml
        • anti-parrot.yml
        • anti-statue-spambot.yml
        • auto-grammar.yml
        • auto-punisher.yml
        • cap-limiter.yml
        • chat-cooldown.yml
        • chat-executor.yml
        • command-spy.yml
        • link-and-ad-blocker.yml
        • spam-blocker.yml
        • unicode-remover.yml
        • word-and-phrase-filter.yml
  • Misc info and resources
    • Preset word lists for the word and phrase filter
    • ChatSentry's SpigotMC Page
  • API
    • About
    • Accessing the API
    • API Documentation
      • Events
      • Methods
  • Development
    • v5 Changelog
    • Legacy Changelogs
      • v4 Changelog
      • v3 Changelog
      • v2 Changelog
      • v1 Changelog
  • legal
    • Terms of Use Agreement
Powered by GitBook
On this page
  • About this module
  • Config guide
  • phrase-whitelist
  • phrase-whitelist-similarity-threshold
  • block-repeated-message-similarity-threshold
  • allowed-repeats
  • repeat-cooldown-in-seconds
  • affected-commands

Was this helpful?

  1. Config guides
  2. Module config guides

Spam Blocker

PreviousLink & Ad BlockerNextUnicode Remover

Last updated 4 years ago

Was this helpful?

About this module

The Intelligent Spam Blocker module prevents players from repeating the same or similar messages over and over within a short period of time. The more times a player attempts to repeat a message when it's already being blocked, the longer before they will be able to repeat themselves again, creating a dynamic and infinitely expanding block period that will disallow spam bots trying to repeat the same messages over and over for long durations of time.

To bypass this module, op or the permission: "chatsentry.spamblocker.bypass" is required.

Config guide

You can access the below settings in the spam-blocker.yml file within the modules folder of the plugin's root folder.

Config excerpts taken from v3.6.0 and may not be completely up-to-date with the latest changes. To see the most up-to-date file, see below:

phrase-whitelist

The phrases below are phrases that the spam blocker will ignore, and can be said over and over.

Character case in the below list does NOT matter. Case variants are automatically checked by the plugin.

Set to "phrase-whitelist: []" to have an empty list.

phrase-whitelist:
  - "wb"
  - "welcome back"
  - "wbbb"
  - "weba"
  - "yes"
  - "yea"
  - "ok"
  - "sure"
  - "no"
  - "nope"
  - "nah"
  - "yup"
  - "yep"
  - "yeh"

phrase-whitelist-similarity-threshold

How similar must a message be to a phrase on the list above to be allowed through? (in %)

1.0 = exactly as one of the phrases on the list (excluding character case) 0.0 = not exact at all (this eliminates the purpose of the whitelist)

phrase-whitelist-similarity-threshold: 0.65

block-repeated-message-similarity-threshold

If a player's message isn't similar to one of the messages on the phrase-whitelist, the below threshold value is used.

How similar must a player's current message be to their last message(s) within the repeat-cooldown-in-seconds period in order to be blocked?

1.0 = message will be blocked only if it's exactly (100%) the same as one of their previous messages within the repeat-cooldown-in-seconds period. 0.0 = message needs to be 0% similar to their last message(s) within the repeat-cooldown-in-seconds period in order to be blocked. (this eliminates the purpose of the similarity checker)

block-repeated-message-similarity-threshold: 0.82

allowed-repeats

This is how many times a player can repeat any messages they said within the last (roughly) repeat-cooldown-in-seconds period of time before being blocked for spam (messages on or similar to the phrase-whitelist will be ignored).

allowed-repeats: 4

repeat-cooldown-in-seconds

How long after a player sends a message should the module forget that a player said the message? (and allow them to repeat it or a similar message again)

repeat-cooldown-in-seconds: 15

affected-commands

The below list will only work if "process-commands" is true in config.yml

The below list is which commands the module will apply to. It's recommended to only set these to your private messaging commands.

Set the list to "affected-commands: []" to apply the module to ALL commands (highly not recommended!)

Make sure to only include base commands; don't add any command arguments. (spaces)

affected-commands:
  - "/tell"
  - "/t"
  - "/msg"
  - "/w"
  - "/r"
  - "/whisper"
  - "/w"
  - "/pm"
spam-blocker.yml