feat(editor): add WWFL (Word Filter) — 116th open format

Novel replacement for the implicit chat-moderation
patterns vanilla WoW carried in the bad-word checker
(the hardcoded substring list the CMSG_MESSAGECHAT
handler walked before broadcasting). Each entry defines
one pattern the chat preprocessor matches against
outbound messages, the replacement to apply (or
"drop"/"warn"/"mute" the sender), and a kind tag for
analytics.

Seven filterKind values (Spam / GoldSeller / AllCaps /
RepeatChar / URL / AdvertReward / Misc) and four
severity levels (Warn — log only, Replace — substitute
matched span, Drop — silently discard, Mute — drop AND
mute sender). Per-filter caseSensitive flag for context-
specific rules (uppercase shouting detection vs
lowercase RMT keyword detection).

Intentionally non-profanity focused — the ecosystem
distributes through CI / public PRs where embedded
profanity creates reviewer-experience and licensing
concerns. The presets cover the moderation surfaces
server admins actually need: makeSpamRMT (5 RMT
patterns: wts/wtb gold drops, g0ld typo-substitution
replace, 1000g-for bulk-offer drop, free-gold mute),
makeAllCaps (3 shouting patterns), makeURLDetect (3
URL-leakage patterns: http://, https://, www.).
Profanity-list integration is left to deployment-time
configuration where local laws and community standards
apply.

Validator's most novel check is per-pattern uniqueness
— two filters with the same pattern would dispatch
ambiguously through the chat preprocessor. Also warns
on Replace severity with empty replacement (would
silently lose match — use Drop explicitly if intended).

Format count 115 -> 116. CLI flag count 1234 -> 1239.
This commit is contained in:
Kelsi 2026-05-10 02:35:06 -07:00
parent aaf169a8af
commit 7d201cd6f3
10 changed files with 712 additions and 0 deletions

View file

@ -140,6 +140,7 @@ constexpr FormatRow kFormats[] = {
{"WSPV", ".wspv", "spells", "implicit Spell.dbc context overrides","Spell variant catalog (stance/talent/racial substitution)"},
{"WVOX", ".wvox", "audio", "CreatureTextSounds + per-quest voice","Voiceover audio catalog (per-NPC, per-event clips)"},
{"WTRD", ".wtrd", "social", "trade-window state machine policy", "Trade window rules catalog (P2P trade policy)"},
{"WWFL", ".wwfl", "social", "chat preprocessor bad-word matcher", "Word filter catalog (spam/RMT/all-caps/URL)"},
// Additional pipeline catalogs without the alternating
// gen/info/validate CLI surface (loaded by the engine