Silently ignore unknown in-channel fantasy commands
All checks were successful
CI / check (push) Successful in 4m15s

This commit is contained in:
Jean Chevronnet 2026-07-19 17:09:07 +00:00
parent d6b681c972
commit bfff7dba91
No known key found for this signature in database
3 changed files with 35 additions and 1 deletions

View file

@ -199,6 +199,12 @@ impl Engine {
return;
}
// Only ChanServ's own verbs are fantasy commands. An unknown `!word` is
// some other bot's command sharing the `!` prefix, not ours, so ignore it
// silently instead of the bot barking "I don't know that command".
if !echo_chanserv::is_command(cmd) {
return;
}
let Some(csuid) = self.service_uid("ChanServ") else { return };
// Rewrite `!cmd args…` into `CMD #channel args…` for ChanServ.
let mark = ctx.actions.len();