chanserv: full AKICK extban registry, [extban] enabled gate, passive extbans pushed as channel bans for the ircd to enforce

This commit is contained in:
Jean Chevronnet 2026-07-17 21:06:14 +00:00
parent 9a197fca3d
commit f7c38cedad
No known key found for this signature in database
10 changed files with 224 additions and 65 deletions

View file

@ -227,9 +227,19 @@ impl Network {
ip: &u.ip,
gecos: &u.gecos,
account: self.accounts.get(uid).map(String::as_str),
// TODO(extban): capture the user's server + TLS fingerprint from the s2s
// stream to match the `server`/`fingerprint` extbans.
server: "",
fingerprint: None,
channels: self.channels_of(uid),
})
}
/// The channels `uid` is currently in (for the `channel` extban).
pub fn channels_of(&self, uid: &str) -> Vec<String> {
self.channels.iter().filter(|(_, c)| c.members.contains(uid)).map(|(k, _)| k.clone()).collect()
}
// Every known user whose uid carries `sid` as its prefix — i.e. those behind
// a server, used to forget them all when it splits (SQUIT).
pub fn uids_on_server(&self, sid: &str) -> Vec<String> {