helpserv: HELP EXTBANS lists the network live extban set with a friendly example for each
This commit is contained in:
parent
7f5b37efd6
commit
8c77016aed
6 changed files with 112 additions and 9 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue