Add ChanServ with channel registration
REGISTER/INFO/DROP with founder auth, stored as ChannelRegistered and ChannelDropped events so channel registrations replicate across nodes and compact like accounts. Registration requires an identified account; only the founder can drop.
This commit is contained in:
parent
64c6facd56
commit
89593ebeb4
5 changed files with 227 additions and 25 deletions
16
src/main.rs
16
src/main.rs
|
|
@ -12,6 +12,7 @@ use tokio::sync::Mutex;
|
|||
|
||||
use engine::Engine;
|
||||
use proto::inspircd::InspIrcd;
|
||||
use services::chanserv::ChanServ;
|
||||
use services::nickserv::NickServ;
|
||||
|
||||
#[tokio::main]
|
||||
|
|
@ -35,11 +36,16 @@ async fn main() -> Result<()> {
|
|||
ts,
|
||||
));
|
||||
|
||||
let services: Vec<Box<dyn engine::service::Service>> = vec![Box::new(NickServ {
|
||||
uid: format!("{}AAAAAA", cfg.server.sid),
|
||||
guest_nick: cfg.server.guest_nick.clone(),
|
||||
guest_seq: (ts % 100_000) as u32,
|
||||
})];
|
||||
let services: Vec<Box<dyn engine::service::Service>> = vec![
|
||||
Box::new(NickServ {
|
||||
uid: format!("{}AAAAAA", cfg.server.sid),
|
||||
guest_nick: cfg.server.guest_nick.clone(),
|
||||
guest_seq: (ts % 100_000) as u32,
|
||||
}),
|
||||
Box::new(ChanServ {
|
||||
uid: format!("{}AAAAAB", cfg.server.sid),
|
||||
}),
|
||||
];
|
||||
let (gossip_tx, _) = tokio::sync::broadcast::channel::<engine::db::LogEntry>(1024);
|
||||
let mut db = engine::db::Db::open("fedserv.db.jsonl", &cfg.server.sid);
|
||||
db.scram_iterations = cfg.server.scram_iterations;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue