Add GroupServ, with groups that grant channel access

User groups (!name) — a founder plus member accounts, each with group-
access flags (the shared flag primitive: F founder, f manage, i invite,
c chan-access, s set, m memo). REGISTER/DROP/INFO/LIST/ADD/DEL/FLAGS;
event-sourced and federated like accounts.

The flagship interconnection: a channel access entry may name a !group, so
every member inherits that channel access. Resolution is group-aware — a
new db.channel_caps() unions a user's direct access with any group they
belong to, and the engine's join handler auto-ops/voices through it. So
"ChanServ FLAGS #chan !team +o" auto-ops every member of !team, and
removing someone from the group revokes it. Opt-in.
This commit is contained in:
Jean Chevronnet 2026-07-14 04:26:07 +00:00
parent c7a4d5be27
commit 09be99785e
No known key found for this signature in database
10 changed files with 602 additions and 17 deletions

View file

@ -49,7 +49,7 @@ pub fn handle(me: &str, from: &Sender, chan: &str, args: &[&str], ctx: &mut Serv
return;
}
let base = current.unwrap_or_default();
let updated = match apply_flags(&base, delta) {
let updated = match apply_flags(&base, delta, ACCESS_FLAGS) {
Ok(f) => f,
Err(bad) => {
ctx.notice(me, from.uid, format!("\x02{bad}\x02 isn't a valid flag. Valid flags: \x02{ACCESS_FLAGS}\x02."));