Expand OperServ: SQLINE nick bans, GLOBAL, and KILL
Generalise the network-ban store to carry the ircd X-line kind (defaulted to the user@host G-line for existing records) so one event-sourced, lazily-expiring, burst-reasserted list backs every ban type, and drive ADD/DEL/LIST from one implementation per kind: - AKILL stays the user@host G-line; SQLINE is a nick Q-line, its mask validated as a nick glob (an @ is refused so an AKILL-shaped mask can't become an over-broad nick ban). Both are keyed by (kind, mask). - GLOBAL <message> announces to every user via a $* server-glob notice. - KILL <nick> [reason] disconnects a user, attributed to the operator. All four are admin-gated, and OperServ itself stays invisible to non-opers. Bans and kills go out as typed actions (AddLine/DelLine/KillUser) the ircd link serialises to ADDLINE/DELLINE/KILL.
This commit is contained in:
parent
57e104e510
commit
930198b826
9 changed files with 351 additions and 189 deletions
|
|
@ -326,6 +326,7 @@ impl Protocol for InspIrcd {
|
|||
vec![self.sourced(format!("ADDLINE {} {} {} {} {} :{}", kind, mask, setter, now, duration, reason))]
|
||||
}
|
||||
NetAction::DelLine { kind, mask } => vec![self.sourced(format!("DELLINE {} {}", kind, mask))],
|
||||
NetAction::KillUser { from, uid, reason } => vec![format!(":{} KILL {} :{}", from, uid, reason)],
|
||||
NetAction::Raw(s) => vec![s.clone()],
|
||||
// Internal: the link layer handles these before serialization.
|
||||
NetAction::DeferRegister { .. } | NetAction::DeferPassword { .. } | NetAction::SendEmail { .. } => vec![],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue