s2s: accept a swhois metadata key from services — set (or clear, when empty) the user's SWHOIS ext, shown in WHOIS 320

This commit is contained in:
Jean Chevronnet 2026-08-20 00:02:02 +00:00
parent f1ddb878af
commit f3ce0e61ef
No known key found for this signature in database
GPG key ID: 439666D63A9477E4

View file

@ -965,6 +965,17 @@ impl Server {
let v = (!value.is_empty()).then_some(value.as_str());
crate::modules::metadata::apply_user(self, tuid, &nick, &key, v, &setter);
}
// OperServ SWHOIS: an extra WHOIS line services set on the account and
// re-push on each login (empty value clears it).
"swhois" => {
if let Some(u) = self.users.get_mut(&tuid) {
if value.is_empty() {
u.ext.take::<crate::coremods::core_oper::Swhois>();
} else {
u.ext.set(crate::coremods::core_oper::Swhois(value.clone()));
}
}
}
_ => {}
}
}