From 8f9e60c8e2871439b35162ae79617ea639e600e3 Mon Sep 17 00:00:00 2001 From: reverse Date: Thu, 20 Aug 2026 14:05:46 +0000 Subject: [PATCH] =?UTF-8?q?whois:=20313=20shows=20the=20generic=20'is=20an?= =?UTF-8?q?=20IRC=20Operator'=20again=20=E2=80=94=20the=20oper=20type=20ga?= =?UTF-8?q?tes=20capabilities,=20and=20a=20custom=20title=20comes=20from?= =?UTF-8?q?=20the=20SWHOIS=20line=20(320)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/coremods/core_info.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/coremods/core_info.rs b/src/coremods/core_info.rs index c3f092f..69be0bd 100644 --- a/src/coremods/core_info.rs +++ b/src/coremods/core_info.rs @@ -298,20 +298,14 @@ impl Command for Whois { s.numeric(uid, RPL_WHOISCHANNELS, &format!("{nick} :{line}")); } } - // 313: is a/an (the type's title, else plain "IRC operator"); - // hidden by +H unless the asker is an oper. + // 313: is an IRC Operator (hidden by +H unless the asker is an oper). The + // oper type sets capabilities, not this line — a custom title (e.g. "is a + // Network Administrator") comes from the SWHOIS line (320) instead. if oper && (!hideoper || asker_oper) { - let title = crate::modules::opertypes::title_of(s, tuid) - .unwrap_or_else(|| "IRC operator".to_string()); - let article = if title.chars().next().is_some_and(|c| "aeiouAEIOU".contains(c)) { - "an" - } else { - "a" - }; s.numeric( uid, RPL_WHOISOPERATOR, - &format!("{nick} :is {article} {title}"), + &format!("{nick} :is an IRC Operator"), ); } // 320: oper-set SWHOIS line. No redundant target-nick param — just the