connect: oper can dial a configured server link on demand

This commit is contained in:
Jean Chevronnet 2026-08-08 20:19:14 +00:00
parent cc3240c04f
commit f5cc12e809
4 changed files with 60 additions and 8 deletions

View file

@ -44,10 +44,14 @@ fn main() {
cfg.servername
);
// one uid counter shared by every listener (and by CONNECT) so ids stay unique
let counter = Arc::new(AtomicU64::new(1));
let (tx, rx) = mpsc::channel();
let core_cfg = cfg.clone();
let core_tx = tx.clone(); // the core self-injects events (DNS results)
let core = thread::spawn(move || Ircd::new(core_cfg, core_tx).run(rx));
let core_counter = counter.clone();
let core = thread::spawn(move || Ircd::new(core_cfg, core_tx, core_counter).run(rx));
// background timer: drives ping/idle timeouts
let tick_tx = tx.clone();
@ -58,9 +62,6 @@ fn main() {
}
});
// one uid counter shared by every listener so ids stay unique
let counter = Arc::new(AtomicU64::new(1));
// optional TLS listener (bind_tls + tls_cert + tls_key). A cert/bind problem
// disables TLS but never takes the plaintext listener down.
if let (Some(bind_tls), Some(cert), Some(key)) = (&cfg.bind_tls, &cfg.tls_cert, &cfg.tls_key) {