reverse-dns clients on connect with pre-registration notices (checking ident / looking up your hostname)

This commit is contained in:
Jean Chevronnet 2026-08-07 18:39:03 +00:00
parent 58596aea66
commit 4fc26d13e9
8 changed files with 392 additions and 24 deletions

View file

@ -69,6 +69,7 @@ pub struct Config {
pub conf_path: String, // where this was loaded from (for REHASH)
pub censor: Vec<(String, String)>, // +G bad words: (find, replace); empty replace = block
pub amu: AntiMixedCfg, // antimixedutf8 module config
pub resolve_hosts: bool, // reverse-DNS clients on connect (default on)
}
impl Default for Config {
@ -90,6 +91,7 @@ impl Default for Config {
conf_path: "echoircd.conf".to_string(),
censor: Vec::new(),
amu: AntiMixedCfg::default(),
resolve_hosts: true,
}
}
}
@ -185,6 +187,12 @@ impl Config {
c.amu.check_channel = t == "both" || t == "channel";
c.amu.check_private = t == "both" || t == "private";
}
"resolve_hosts" | "resolvehosts" | "dns" => {
c.resolve_hosts = !matches!(
v.to_ascii_lowercase().as_str(),
"off" | "false" | "no" | "0"
)
}
_ => {}
}
}