securitygroups: UnrealIRCd-style groups + g: extban + SECURITYGROUPS + WHOIS

This commit is contained in:
Jean Chevronnet 2026-08-09 08:08:06 +00:00
parent 97a35338fa
commit 64dcbd8bf4
9 changed files with 249 additions and 6 deletions

View file

@ -229,6 +229,15 @@ impl Command for Whois {
if let Some(line) = &swhois {
s.numeric(uid, RPL_WHOISSPECIAL, &format!(":{line}"));
}
// security groups (public ones to all; opers/self see private ones too)
let groups = crate::modules::securitygroups::user_groups(s, tuid, is_self || asker_oper);
if !groups.is_empty() {
s.numeric(
uid,
RPL_WHOISSPECIAL,
&format!(":is in security groups: {}", groups.join(", ")),
);
}
// opers can see through the cloak to the real host/ip
if asker_oper && disp != realhost {
s.numeric(