reverse-dns clients on connect with pre-registration notices (checking ident / looking up your hostname)
This commit is contained in:
parent
58596aea66
commit
4fc26d13e9
8 changed files with 392 additions and 24 deletions
|
|
@ -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"
|
||||
)
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue