Add ChanServ ACCESS list with auto-op/voice on join

ACCESS <#channel> LIST|ADD|DEL manages op/voice by account (founder-only
changes). Entries are ChannelAccessAdd/Del events, so they replicate and
compact like the rest, and join grants +o/+v from the list.
This commit is contained in:
Jean Chevronnet 2026-07-12 10:59:15 +00:00
parent b299c4f02e
commit f0ce2d9d1b
No known key found for this signature in database
4 changed files with 199 additions and 10 deletions

View file

@ -3,6 +3,8 @@ use crate::engine::service::{Sender, Service, ServiceCtx};
#[path = "mode.rs"]
mod mode;
#[path = "access.rs"]
mod access;
pub struct ChanServ {
pub uid: String,
@ -127,7 +129,8 @@ impl Service for ChanServ {
}
}
Some("MODE") => mode::handle(me, from, args, ctx, db),
Some("HELP") => ctx.notice(me, from.uid, "ChanServ registers and looks after channels. Commands: \x02REGISTER\x02 <#channel>, \x02INFO\x02 <#channel>, \x02MODE\x02 <#channel> <modes>, \x02MLOCK\x02 <#channel> [modes], \x02DROP\x02 <#channel>."),
Some("ACCESS") => access::handle(me, from, args, ctx, db),
Some("HELP") => ctx.notice(me, from.uid, "ChanServ registers and looks after channels. Commands: \x02REGISTER\x02 <#channel>, \x02INFO\x02 <#channel>, \x02ACCESS\x02 <#channel>, \x02MODE\x02 <#channel> <modes>, \x02MLOCK\x02 <#channel> [modes], \x02DROP\x02 <#channel>."),
Some(other) => ctx.notice(me, from.uid, format!("I don't know the command \x02{other}\x02. Try \x02HELP\x02.")),
None => {}
}