mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 19:13:52 +00:00
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:
parent
aaf169a8af
commit
7d201cd6f3
10 changed files with 712 additions and 0 deletions
|
|
@ -160,6 +160,7 @@
|
|||
#include "cli_spell_variants_catalog.hpp"
|
||||
#include "cli_voiceovers_catalog.hpp"
|
||||
#include "cli_trade_rules_catalog.hpp"
|
||||
#include "cli_word_filters_catalog.hpp"
|
||||
#include "cli_catalog_pluck.hpp"
|
||||
#include "cli_catalog_find.hpp"
|
||||
#include "cli_catalog_by_name.hpp"
|
||||
|
|
@ -365,6 +366,7 @@ constexpr DispatchFn kDispatchTable[] = {
|
|||
handleSpellVariantsCatalog,
|
||||
handleVoiceoversCatalog,
|
||||
handleTradeRulesCatalog,
|
||||
handleWordFiltersCatalog,
|
||||
handleCatalogPluck,
|
||||
handleCatalogFind,
|
||||
handleCatalogByName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue