HappyFilter icon

HappyFilter -----

Are you also fed up with the ear-piercing words in the server? Don't worry



HappyFilter – Forbidden-Word Plugin!
Key Features
️ Ultra-Smart Forbidden-Word Filtering
  • More than simple keyword matching – detects words split by special characters (e.g. c/n/m)
  • Regex rules block URLs, ads, etc.
  • Chat-history tracking: forbidden words sent in several messages are still caught
  • Logs caught words to console
  • Fully customizable warning messages
Flexible Replacement System
  • Define your own replacement words – whatever you want!
  • Random pick from replace_words list
⚡ High-Performance (?) Algorithm Boost
  • Aho-Corasick automaton – “use it in OI and you’ll AK!”
  • Asynchronous chat-event processing
️ Configuration Files Explained
Code (YAML):
# config.yml
enabled
: true                       # Enable/disable filtering
log_to_console
: true                 # Print caught words to console
filter_words
:                       # Forbidden-word list
  - "cnm"
  - "sb"
  - "byd"
  - "nm"
filter_rules
:                       # Filtering rules
  regex
:                           # Regular expressions
   - "(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}(?:\\.[a-zA-Z]{2,})?"
  interference_characters
:         # Characters used to split words
   - '/'
   - '\'
   - '.'
   - ','
   - '|'
   - ' '
  replace
:
   replace_words
:                 # Replacement words (random pick)
     - "~"

warning
:                           # Warning message
  enabled
: true
  message
: "§cDo not post sensitive content!"

Code (YAML):
messages.yml
prefix
: "§7[§dHappy§bFilter§7] "   # Chat prefix
commands
:
  reload_success
: "§aConfig reloaded"
  plugin_enabled
: "§aPlugin enabled"
  plugin_disabled
: "§aPlugin disabled"
  unknown_command
: "§cUnknown command!"
  no_permission
: "§cYou don't have permission!"
  help
:
   header
: "§aHappyFilter Help"
   reload
: "§a/happyfilter reload - Reload config"
   help
: "§a/happyfilter help - Show help"
   enable
: "§a/happyfilter enable - Enable word filter"
   disable
: "§a/happyfilter disable - Temporarily disable filter"

log
: "Left index: {l} Right index: {r} Word: {w}"   # Console log format
warning
:
  message
: "§cDo not post sensitive content!"
Command Reference
  • /happyfilter reload – Reload configuration files
  • /happyfilter help – Show help message
  • /happyfilter enable – Turn the filter on
  • /happyfilter disable – Temporarily turn the filter off
Permission Nodes
  • happyfilter.bypass – Bypass the filter
  • happyfilter.admin – Admin commands
Pro Tips
  1. Escape special chars: always write \\ in regex sections!
  2. Add new words: just append a new line under filter_words!
  3. Performance: the automaton is rebuilt only when the word list changes!
  4. Testing: use disable to switch it off for tests, then enable to turn it back on!
[​IMG]
Bug reports: QQ 1031612019 or open an issue on GitHub.
Resource Information
Author:
----------
Total Downloads: 1
First Release: Sep 14, 2025
Last Update: Sep 14, 2025
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings