Adds --export-wcmd-json / --import-wcmd-json with the established
readEnumField template factoring int+name dual encoding for both
minSecurityLevel ("player"/"helper"/"moderator"/"gamemaster"/
"admin") and category ("info"/"movement"/"communication"/
"admincmd"/"debug"). Aliases array serialized as JSON string
array.
All 3 presets (basic/movement/admin) byte-identical binary
roundtrip OK including the movement preset's multi-alias
commands (/stand has aliases ["standup", "su"]).
Live-tested flat-namespace collision validator: hand-mutated
/stand (cmdId=11) to add 'sit' as an alias, colliding with the
canonical /sit command. Validator correctly errored: "alias
'sit' collides with another command name or alias — chat
parser would dispatch ambiguously". Catches the class of typo
bugs where a new alias would shadow an existing command, with
the failure surface being silent dispatch ambiguity rather
than an error.
CLI flag count 1488 -> 1490.
Novel replacement for the implicit slash-command registry
vanilla WoW carried in the client's ChatFrame.lua + server-side
per-command CommandHandler hooks (no formal data-driven catalog;
commands were registered ad-hoc with hard-coded security checks
scattered across LevelMgr / WorldMgr / CharacterMgr). Each WCMD
entry binds one command name to its aliases, minimum security
level required, argument schema string, help text, per-player
throttle in ms, hidden flag (for debug-only commands), and
category.
Three presets covering the security-tier spectrum:
--gen-cmd-basic 4 standard player Info commands (/who
/played /time /ginfo) at Player security
with no throttle
--gen-cmd-movement 3 emote-style Movement commands (/sit
/stand /sleep) with short typing-speed
aliases ("sd" / "su" / "sd")
--gen-cmd-admin 3 GameMaster-only Admin commands
(/announce 5s throttle / /kick 2s
throttle / /ban 10s throttle —
demonstrating per-command rate-limiting
to prevent admin-spam abuse)
Validator catches: id+command required, minSecurityLevel 0..4,
category 0..4, no duplicate cmdIds. CRITICAL: command names
AND aliases share one flat namespace (chat parser dispatches
uniformly by typed string) — duplicate name across canonical+
aliases errors. Warns on uppercase chars in names (parser is
case-insensitive but convention is lowercase), Admin-category
command at Player/Helper security level (likely security
misconfiguration — admin commands usually require GameMaster+),
throttleMs > 60000 (likely ms-vs-s units typo — 60+ second
throttle is nearly unusable), self-alias (canonical already
matches), and empty helpText (/help would show the command
without description).
Format count 142 -> 143. CLI flag count 1481 -> 1488.