services: reword uline/service code comments, drop external daemon references
This commit is contained in:
parent
36b8a31a9a
commit
04423388d5
4 changed files with 8 additions and 8 deletions
|
|
@ -127,7 +127,7 @@ impl Command for Whois {
|
|||
&format!("{} {srv} :remote user", ru.nick),
|
||||
);
|
||||
// 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) {
|
||||
s.numeric(
|
||||
uid,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ pub struct RemoteServer {
|
|||
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
|
||||
/// 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.
|
||||
pub is_service: bool,
|
||||
/// `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),
|
||||
// services (SVS*) enforcement + account login, driven by a linked
|
||||
// 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.
|
||||
"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),
|
||||
|
|
@ -218,7 +218,7 @@ impl Server {
|
|||
/// 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
|
||||
/// 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) {
|
||||
if !self.sasl_server.is_empty() && name.eq_ignore_ascii_case(&self.sasl_server) {
|
||||
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
|
||||
// entry (case-insensitive); `silent` is honoured. Mirrors InspIRCd IsService.
|
||||
// entry (case-insensitive); `silent` is honoured.
|
||||
#[test]
|
||||
fn uline_recognises_services_server() {
|
||||
use crate::config::Config;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//! customprefix — reconfigure the channel prefix tiers *and* define brand-new ones,
|
||||
//! like InspIRCd's m_customprefix. Two forms, one line each:
|
||||
//! customprefix — reconfigure the channel prefix tiers *and* define brand-new ones.
|
||||
//! Two forms, one line each:
|
||||
//!
|
||||
//! ```text
|
||||
//! # reconfigure a built-in tier (oper founder admin op halfop voice):
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ impl Server {
|
|||
self.webirc = fresh.webirc;
|
||||
self.raw_config = fresh.raw;
|
||||
// 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
|
||||
.servers
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue