securitygroups: UnrealIRCd-style groups + g: extban + SECURITYGROUPS + WHOIS
This commit is contained in:
parent
97a35338fa
commit
64dcbd8bf4
9 changed files with 249 additions and 6 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ impl Command for WebIrc {
|
|||
};
|
||||
let newip = ip.parse::<IpAddr>().ok();
|
||||
if let Some(u) = s.users.get_mut(&uid) {
|
||||
u.flags.via_webirc = true; // securitygroups: webirc criterion
|
||||
u.host = host.clone();
|
||||
if let Some(a) = newip {
|
||||
u.addr = SocketAddr::new(a, u.addr.port());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue