helpserv: HELP EXTBANS lists the network live extban set with a friendly example for each

This commit is contained in:
Jean Chevronnet 2026-07-17 22:23:54 +00:00
parent 7f5b37efd6
commit 8c77016aed
No known key found for this signature in database
6 changed files with 112 additions and 9 deletions

View file

@ -187,6 +187,11 @@ impl Db {
self.live_extbans.as_ref().is_none_or(|set| set.iter().any(|e| e.name.eq_ignore_ascii_case(name)))
}
/// The ircd's live extban set (empty until we link and get its CAPAB burst).
pub fn extbans(&self) -> Vec<echo_api::ExtbanCap> {
self.live_extbans.clone().unwrap_or_default()
}
/// Resolve an extban token (name, case-insensitive; or single letter, case-
/// sensitive) against the ircd's live set. For extbans echo's static table lacks.
pub fn extban_lookup(&self, token: &str) -> Option<echo_api::ExtbanCap> {

View file

@ -63,6 +63,9 @@ impl Store for Db {
fn extban_lookup(&self, token: &str) -> Option<echo_api::ExtbanCap> {
Db::extban_lookup(self, token)
}
fn extbans(&self) -> Vec<echo_api::ExtbanCap> {
Db::extbans(self)
}
fn email_enabled(&self) -> bool {
Db::email_enabled(self)
}