Route every handle() early return through the shared tail so swept unbans and incident stamps aren't dropped
This commit is contained in:
parent
b38cde945f
commit
23960adc83
2 changed files with 40 additions and 21 deletions
|
|
@ -2068,7 +2068,15 @@
|
|||
// A user with no access is kicked.
|
||||
e.handle(NetEvent::UserConnect { uid: "000AAAAAC".into(), nick: "rando".into(), host: "h".into(), ip: "0.0.0.0".into() });
|
||||
let out = e.handle(NetEvent::Join { uid: "000AAAAAC".into(), channel: "#c".into(), op: false });
|
||||
assert!(out.iter().any(|a| matches!(a, NetAction::Kick { uid, channel, .. } if uid == "000AAAAAC" && channel == "#c")), "no-access user kicked: {out:?}");
|
||||
let kick = out.iter().find_map(|a| match a {
|
||||
NetAction::Kick { uid, channel, reason, .. } if uid == "000AAAAAC" && channel == "#c" => Some(reason.clone()),
|
||||
_ => None,
|
||||
});
|
||||
let reason = kick.expect(&format!("no-access user kicked: {out:?}"));
|
||||
// The restricted kick must be incident-stamped like every other removal —
|
||||
// it early-returns, so this proves the return routes through finish() and
|
||||
// reaches stamp_incidents (which appends the searchable [#id] tag).
|
||||
assert!(reason.contains("[#"), "restricted kick is incident-stamped: {reason:?}");
|
||||
}
|
||||
|
||||
// ChanServ SET AUTOOP OFF suppresses auto-op on join (on by default).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue