From 754c5d9e955bf6bd7d048b2ed8e9d185987d3f7c Mon Sep 17 00:00:00 2001 From: Jean Date: Sun, 19 Jul 2026 00:29:55 +0000 Subject: [PATCH] engine: staff-feed alerts are also recorded to the incident log, so a blocked look-alike registration is searchable via OperServ LOGSEARCH --- src/engine/dispatch.rs | 6 +++++- src/engine/tests.rs | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/dispatch.rs b/src/engine/dispatch.rs index 5dd8140..3ad9f71 100644 --- a/src/engine/dispatch.rs +++ b/src/engine/dispatch.rs @@ -105,7 +105,11 @@ impl Engine { // Announce whatever this command changed to the staff audit channel. out.extend(self.audit_feed(audit_mark, &nick, account.as_deref())); for (cat, text) in alerts { - if let Some(line) = self.feed(&cat, format!("{} {text}", self.who(from))) { + let full = format!("{} {text}", self.who(from)); + // Record to the searchable incident log (OperServ LOGSEARCH) and announce. + let now = self.now_secs(); + self.network.record_incident(format!("[{cat}] {full}"), now); + if let Some(line) = self.feed(&cat, full) { out.push(line); } } diff --git a/src/engine/tests.rs b/src/engine/tests.rs index a81dea5..59f12d5 100644 --- a/src/engine/tests.rs +++ b/src/engine/tests.rs @@ -5552,6 +5552,8 @@ fn confusable_register_alerts_the_staff_feed() { if from == "42SAAAAAO" && to == "#services" && text.contains("[REGISTER]") && text.contains("boss") && text.contains("look-alike"))), "staff feed alert: {out:?}" ); + // ...and it's recorded to the searchable incident log (OperServ LOGSEARCH). + assert!(!e.network.search_incidents("look-alike", 10).is_empty(), "recorded for LOGSEARCH"); } // Perf harness — not part of the normal suite. Run: