nickserv/chanserv: catch styled/fullwidth look-alike names too, and add a [register] confusable_check toggle (REHASH-reloadable)
All checks were successful
CI / check (push) Successful in 3m48s

This commit is contained in:
Jean Chevronnet 2026-07-19 00:15:08 +00:00
parent c2b70f5004
commit 89ac01d0b0
No known key found for this signature in database
11 changed files with 72 additions and 12 deletions

View file

@ -49,6 +49,9 @@ pub struct Config {
// not load and echo makes no outbound lookup requests. Opt-in on purpose.
#[serde(default)]
pub dictserv: Option<Dict>,
// Registration policy. Absent = defaults (the look-alike guard is on).
#[serde(default)]
pub register: Register,
// Which InspIRCd matching-extbans AKICK may use. Absent = every extban echo
// knows (full compatibility). List `enabled` to restrict it — e.g. drop the
// ones your ircd doesn't provide.
@ -85,6 +88,22 @@ fn default_dict_server() -> String {
"dict.org:2628".to_string()
}
// Registration policy.
#[derive(Debug, Deserialize, Clone)]
#[serde(default)]
pub struct Register {
// Reject look-alike / mixed-script / invisible registration names. On by
// default; turn it off for a community that legitimately uses mixed or
// non-Latin names. Reloadable with REHASH.
pub confusable_check: bool,
}
impl Default for Register {
fn default() -> Self {
Self { confusable_check: true }
}
}
// Account-authority configuration.
#[derive(Debug, Deserialize, Clone)]
pub struct Auth {