engine: staff-feed alerts are also recorded to the incident log, so a blocked look-alike registration is searchable via OperServ LOGSEARCH
All checks were successful
CI / check (push) Successful in 3m45s
All checks were successful
CI / check (push) Successful in 3m45s
This commit is contained in:
parent
0d16240606
commit
754c5d9e95
2 changed files with 7 additions and 1 deletions
|
|
@ -105,7 +105,11 @@ impl Engine {
|
||||||
// Announce whatever this command changed to the staff audit channel.
|
// Announce whatever this command changed to the staff audit channel.
|
||||||
out.extend(self.audit_feed(audit_mark, &nick, account.as_deref()));
|
out.extend(self.audit_feed(audit_mark, &nick, account.as_deref()));
|
||||||
for (cat, text) in alerts {
|
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);
|
out.push(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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"))),
|
if from == "42SAAAAAO" && to == "#services" && text.contains("[REGISTER]") && text.contains("boss") && text.contains("look-alike"))),
|
||||||
"staff feed alert: {out:?}"
|
"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:
|
// Perf harness — not part of the normal suite. Run:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue