dictserv: opt-in DICT (RFC 2229) lookup service — bots and /msg answer dict/define/thes/acronym/law/etc via dict.org off-reactor
All checks were successful
CI / check (push) Successful in 4m4s

This commit is contained in:
Jean Chevronnet 2026-07-18 20:21:30 +00:00
parent 76be932131
commit 623750e638
No known key found for this signature in database
15 changed files with 444 additions and 4 deletions

View file

@ -45,6 +45,10 @@ pub struct Config {
// credentials (`kc_…` over SASL) are not honoured.
#[serde(default)]
pub keycard: Option<Keycard>,
// DictServ dictionary lookups (dict.org / RFC 2229). Absent = the service does
// not load and echo makes no outbound lookup requests. Opt-in on purpose.
#[serde(default)]
pub dictserv: Option<Dict>,
// 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.
@ -69,6 +73,18 @@ pub struct Keycard {
pub api_key: String,
}
// DictServ. `server` is a DICT-protocol endpoint (RFC 2229); dict.org hosts the
// standard databases (WordNet, GCIDE, thesaurus, …).
#[derive(Debug, Deserialize, Clone)]
pub struct Dict {
#[serde(default = "default_dict_server")]
pub server: String,
}
fn default_dict_server() -> String {
"dict.org:2628".to_string()
}
// Account-authority configuration.
#[derive(Debug, Deserialize, Clone)]
pub struct Auth {