filter (m_filter) as a self-contained module: Server.ext typemap for module state + module_commands() wiring; FILTER command + on_pre_message hook all in modules/filter.rs

This commit is contained in:
Jean Chevronnet 2026-08-08 22:34:56 +00:00
parent 7bf9e4c0b8
commit ee98fade40
4 changed files with 197 additions and 0 deletions

View file

@ -169,6 +169,10 @@ pub struct Server {
pub mline: HashMap<Uid, MlineBatch>, // in-progress inbound multiline batches
pub event_tx: Sender<Event>, // self-inject events (DNS results)
pub conn_counter: Arc<AtomicU64>, // mints connection uids (for CONNECT dials)
/// Module-owned server state, keyed by type — the InspIRCd `ExtensionItem`
/// equivalent. Each `modules/*.rs` stores its own struct here so features live
/// in their own file instead of bloating this one.
pub ext: Extensible,
}
impl Server {
@ -216,6 +220,7 @@ impl Server {
mline: HashMap::new(),
event_tx,
conn_counter,
ext: Extensible::default(),
}
}