operserv: add NOTIFY oper watch list emitting matched-user events to the staff feed

This commit is contained in:
Jean Chevronnet 2026-07-18 16:16:06 +00:00
parent 86b1aae686
commit c415117ec5
No known key found for this signature in database
11 changed files with 433 additions and 10 deletions

View file

@ -82,6 +82,14 @@ impl Engine {
}
if let Some(nick) = matched {
self.bump(&format!("{nick}.command"));
// NOTIFY watch on services use: log the service + verb only (never
// the arguments, which may carry a password). SET commands carry the
// 'S' flag, everything else 's'.
let verb = text.split_whitespace().next().unwrap_or("").to_ascii_uppercase();
let flag = if verb == "SET" { 'S' } else { 's' };
if let Some(line) = self.notify_line(flag, from, None, &format!("used {nick} {verb}")) {
ctx.actions.push(line);
}
}
}
// Fold any counters the command recorded into the shared registry.