services: reword uline/service code comments, drop external daemon references

This commit is contained in:
Jean Chevronnet 2026-08-16 14:12:18 +00:00
parent 36b8a31a9a
commit 04423388d5
4 changed files with 8 additions and 8 deletions

View file

@ -127,7 +127,7 @@ impl Command for Whois {
&format!("{} {srv} :remote user", ru.nick), &format!("{} {srv} :remote user", ru.nick),
); );
// 313: a user on a U-lined services server is "a network service" // 313: a user on a U-lined services server is "a network service"
// (InspIRCd reworks the oper line the same way for services). // — its oper line reads as a service, not an operator.
if s.server_is_service(&ru.sid) { if s.server_is_service(&ru.sid) {
s.numeric( s.numeric(
uid, uid,

View file

@ -47,7 +47,7 @@ pub struct RemoteServer {
pub via: Uid, // the local link uid it is reachable through pub via: Uid, // the local link uid it is reachable through
/// A services (U-lined) server: its name matches a `uline` config entry or the /// A services (U-lined) server: its name matches a `uline` config entry or the
/// configured `sasl_server`. Derived locally from OUR config at link/rehash time, /// configured `sasl_server`. Derived locally from OUR config at link/rehash time,
/// exactly like InspIRCd's `<services server=...>` — nothing on the wire declares /// matched by server name; nothing on the wire declares
/// it. Every user on it is a network service. /// it. Every user on it is a network service.
pub is_service: bool, pub is_service: bool,
/// `uline ... silent`: suppress this server's users' connect/quit server-notices. /// `uline ... silent`: suppress this server's users' connect/quit server-notices.
@ -178,7 +178,7 @@ impl Server {
"IJOIN" if registered => self.link_ijoin_recv(uid, msg), "IJOIN" if registered => self.link_ijoin_recv(uid, msg),
// services (SVS*) enforcement + account login, driven by a linked // services (SVS*) enforcement + account login, driven by a linked
// services pseudoserver (forwarded on if the target is on another server). // services pseudoserver (forwarded on if the target is on another server).
// Like InspIRCd's m_services, these are honoured ONLY from a source on a // They are honoured ONLY from a source on a
// U-lined services server — an ordinary peer's SVS* is ignored. // U-lined services server — an ordinary peer's SVS* is ignored.
"SVSNICK" if registered && self.source_is_service(msg) => self.link_svsnick(uid, msg), "SVSNICK" if registered && self.source_is_service(msg) => self.link_svsnick(uid, msg),
"SVSJOIN" if registered && self.source_is_service(msg) => self.link_svsjoin(uid, msg), "SVSJOIN" if registered && self.source_is_service(msg) => self.link_svsjoin(uid, msg),
@ -218,7 +218,7 @@ impl Server {
/// Whether a server NAME is a services (U-lined) server, and whether it is /// Whether a server NAME is a services (U-lined) server, and whether it is
/// "silent". A name matches if it is the configured `sasl_server` (a SASL /// "silent". A name matches if it is the configured `sasl_server` (a SASL
/// provider is a service) or appears as a `uline = <name> [silent]` entry. /// provider is a service) or appears as a `uline = <name> [silent]` entry.
/// Case-insensitive, matching InspIRCd's `<services server=...>` by name. /// Case-insensitive, matched by server name.
pub fn uline_match(&self, name: &str) -> (bool, bool) { pub fn uline_match(&self, name: &str) -> (bool, bool) {
if !self.sasl_server.is_empty() && name.eq_ignore_ascii_case(&self.sasl_server) { if !self.sasl_server.is_empty() && name.eq_ignore_ascii_case(&self.sasl_server) {
return (true, false); return (true, false);
@ -1926,7 +1926,7 @@ mod tests {
} }
// A server is a service iff its NAME matches the sasl_server or a `uline` config // A server is a service iff its NAME matches the sasl_server or a `uline` config
// entry (case-insensitive); `silent` is honoured. Mirrors InspIRCd IsService. // entry (case-insensitive); `silent` is honoured.
#[test] #[test]
fn uline_recognises_services_server() { fn uline_recognises_services_server() {
use crate::config::Config; use crate::config::Config;

View file

@ -1,5 +1,5 @@
//! customprefix — reconfigure the channel prefix tiers *and* define brand-new ones, //! customprefix — reconfigure the channel prefix tiers *and* define brand-new ones.
//! like InspIRCd's m_customprefix. Two forms, one line each: //! Two forms, one line each:
//! //!
//! ```text //! ```text
//! # reconfigure a built-in tier (oper founder admin op halfop voice): //! # reconfigure a built-in tier (oper founder admin op halfop voice):

View file

@ -269,7 +269,7 @@ impl Server {
self.webirc = fresh.webirc; self.webirc = fresh.webirc;
self.raw_config = fresh.raw; self.raw_config = fresh.raw;
// Re-evaluate which linked servers are services against the fresh // Re-evaluate which linked servers are services against the fresh
// `uline`/`sasl_server` config (like InspIRCd recomputing IsService on rehash). // `uline`/`sasl_server` config (re-evaluated on every rehash).
let names: Vec<(String, String)> = self let names: Vec<(String, String)> = self
.servers .servers
.iter() .iter()