nickserv: AJOIN auto-join list

Adds the account auto-join list (AJOIN ADD/DEL/LIST): NickServ SVSJOINs you
into your listed channels each time you identify. The list is a typed
Vec<AjoinEntry> on the account, folded through the event log like the cert and
akick lists (persists and replays; no separate store), reached by modules
through the Store trait. New ForceJoin action serialises to InspIRCd SVSJOIN.
Shown in INFO. Operates on the caller's own account; the oper form for other
users waits on a privilege system.
This commit is contained in:
Jean Chevronnet 2026-07-13 02:09:03 +00:00
parent e0bb3a1fea
commit 75ba9b35b4
No known key found for this signature in database
9 changed files with 211 additions and 5 deletions

View file

@ -27,6 +27,10 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db:
let account = account.to_string();
ctx.login(from.uid, &account);
ctx.notice(me, from.uid, format!("You're now identified as \x02{}\x02. Welcome back!", account));
// Apply the account's auto-join list (AJOIN).
for entry in db.ajoin_list(&account) {
ctx.force_join(from.uid, &entry.channel, &entry.key);
}
}
None => ctx.notice(me, from.uid, "Invalid password. Please try again."),
}