From dfc11bd1c4449800a74ff0f0297b2f9f4d2639cf Mon Sep 17 00:00:00 2001 From: Jean Date: Tue, 14 Jul 2026 15:02:13 +0000 Subject: [PATCH] Make every pseudo-client a first-class default service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GroupServ, ChanFix, ReportServ, HelpServ and DiceServ were left out of the default service suite, so they came up only when explicitly opted in — an add-on tier the others don't have. They are core services like any other: put them in default_services() so the standard suite is the full set of pseudo-clients, and correct the stale 'NickServ + ChanServ' default in the config comment, main.rs, README and MODULES. --- MODULES.md | 4 ++-- src/config.rs | 13 +++++++++++-- src/main.rs | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/MODULES.md b/MODULES.md index ab89c46..df0c6df 100644 --- a/MODULES.md +++ b/MODULES.md @@ -99,8 +99,8 @@ if enabled("mymod") { services = ["nickserv", "chanserv", "mymod"] ``` -Omitting `[modules]` starts NickServ and ChanServ. A name that isn't built in is -ignored. +Omitting `[modules]` starts the full standard suite (every pseudo-client). A +name that isn't built in is ignored. ## A protocol module diff --git a/src/config.rs b/src/config.rs index 6b74c29..61c96dd 100644 --- a/src/config.rs +++ b/src/config.rs @@ -20,7 +20,8 @@ pub struct Config { // Absent = it does not start. Bind to localhost; a token is required. #[serde(default)] pub jsonrpc: Option, - // Which service modules to start. Absent = the built-in NickServ + ChanServ. + // Which service modules to start. Absent = the full standard suite (all the + // pseudo-clients); listing it trims that set. Every service is first-class. #[serde(default)] pub modules: Modules, // Services operators: accounts granted privileges. Absent = no opers. @@ -132,8 +133,16 @@ impl Default for Modules { } } +// The full standard suite: every pseudo-client is a first-class service and +// comes up by default. An admin trims the list; there is no second tier. fn default_services() -> Vec { - vec!["nickserv".to_string(), "chanserv".to_string(), "botserv".to_string(), "memoserv".to_string(), "statserv".to_string(), "hostserv".to_string(), "operserv".to_string(), "infoserv".to_string()] + [ + "nickserv", "chanserv", "botserv", "hostserv", "memoserv", "operserv", "statserv", + "groupserv", "infoserv", "reportserv", "helpserv", "chanfix", "diceserv", + ] + .iter() + .map(|s| s.to_string()) + .collect() } #[derive(Debug, Deserialize, Clone)] diff --git a/src/main.rs b/src/main.rs index 3e19a7e..1912bd9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,9 +53,9 @@ async fn main() -> Result<()> { ts, )); - // Bring up the service modules named in [modules] (default NickServ + - // ChanServ). Each keeps a fixed uid suffix so its identity is stable no - // matter which others are enabled. + // Bring up the service modules named in [modules] (default: the full + // standard suite — every pseudo-client). Each keeps a fixed uid suffix so + // its identity is stable no matter which others are enabled. let enabled = |name: &str| cfg.modules.services.iter().any(|s| s == name); let mut services: Vec> = Vec::new(); if enabled("nickserv") {