fix: Wormhole v3.4.2 — empty-prefix command filter bug #2

Merged
everestmcarthur merged 1 commit from fix/empty-prefix-relay into main 2026-05-12 08:56:21 -04:00

1 commit

Author SHA1 Message Date
Viktor AI
9598f752c1 fix: Wormhole v3.4.2 — empty-prefix command filter bug
The v3.4.1 command filter used bot.get_context() to detect commands,
but an empty-string prefix ('') matched EVERY message, causing
ctx.valid to return True for any message whose first word happened
to be a registered command.  With enough built-in commands (help,
ping, info, set, etc.) this silently dropped most or all relay
traffic (total_messages stayed at 0).

Fix: require ctx.prefix to be truthy (non-empty) before skipping
a message as a command.  Empty-prefix matches are now ignored,
so only messages with a real prefix (!, @bot, etc.) are filtered.

Also re-added the empty-prefix warning to 'wh debug' output so
users know to clean up their bot prefix configuration.
2026-05-12 12:53:18 +00:00