Skip to content

Add Ignore Bots module in Misc category#6521

Open
Imajio wants to merge 1 commit into
MeteorDevelopment:masterfrom
Imajio:feature/ignore-bots
Open

Add Ignore Bots module in Misc category#6521
Imajio wants to merge 1 commit into
MeteorDevelopment:masterfrom
Imajio:feature/ignore-bots

Conversation

@Imajio

@Imajio Imajio commented Jul 17, 2026

Copy link
Copy Markdown

Type of change

  • Bug fix
  • New feature

Description

Adds a new Ignore Bots module (Misc category) that detects and hides
chat-bot spam, tuned for 2b2t.

On 2b2t chat is delivered as system messages (<name> message) with no
signed sender, so the module parses the sender straight from the chat text
and, by default, hides messages from accounts it flags as bots. Detection is
layered, and every layer is an in-game toggle:

  • Behavioral – per-account message flooding, plus coordinated-spam
    (the same message coming from many different accounts at once).
  • Inhuman cadence – long messages sent faster than a human could type
    them (min length + min interval / max chars-per-second).
  • Content filter – links, Discord/Telegram invites, server IPs, zalgo
    and excessive character repetition, and a user keyword list.
  • Lists – manual blacklist/whitelist (friends are always whitelisted)
    and a learned per-session bot cache, so once an account trips any
    detector all of its later messages are hidden too.

Action is configurable: Hide (default - cancels the message), Tag
(prefixes [BOT?] for tuning), or Dim.

Reasoning: BetterChat's anti-spam only collapses identical
consecutive
lines, so it misses the flood/swarm/advertising bots common in
2b2t global chat (each spam line has a different sender). This module fills
that gap without touching non-player lines (queue, death, broadcasts pass
through untouched).

Related issues

N/A

How Has This Been Tested?

  • Compiles cleanly in the dev environment (gradlew build).
  • Detection logic verified with a standalone harness covering 30 cases
    (chat parsing, link/IP/zalgo/char-run detection, cadence math, swarm
    counting, plus realistic 2b2t spam-vs-normal lines) - all passing.
  • Non-player lines (queue position, death messages, server broadcasts) are
    confirmed to be ignored by the parser.

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

A chat-bot filter tuned for 2b2t. Parses the sender from each chat line
and hides messages from likely bots. Detection layers, each toggleable:
message flooding, coordinated cross-account spam, inhuman typing cadence,
a content/advertising filter, and manual blacklist/whitelist with a
learned per-session bot cache. Default action hides the message; Tag and
Dim are also available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant