Scaffold the federated services daemon

Protocol-agnostic core: a Protocol trait maps raw server-to-server lines to a
normalized event/action model, so the engine never touches a raw line and a new
ircd is one new module. Adds event-log state (state is a fold over the log) and
a service framework. First protocol impl links to an InspIRCd (insp4) uplink —
completes the CAPAB/SERVER handshake, bursts, and introduces NickServ.
This commit is contained in:
Jean Chevronnet 2026-07-11 19:28:30 +00:00
commit f82ab0c70a
No known key found for this signature in database
15 changed files with 890 additions and 0 deletions

1
src/services/mod.rs Normal file
View file

@ -0,0 +1 @@
pub mod nickserv;

25
src/services/nickserv.rs Normal file
View file

@ -0,0 +1,25 @@
use crate::engine::service::{Service, ServiceCtx};
pub struct NickServ {
pub uid: String,
}
impl Service for NickServ {
fn nick(&self) -> &str {
"NickServ"
}
fn uid(&self) -> &str {
&self.uid
}
fn gecos(&self) -> &str {
"Nickname Services"
}
fn on_command(&mut self, from: &str, args: &[&str], ctx: &mut ServiceCtx) {
match args.first().map(|s| s.to_ascii_uppercase()).as_deref() {
Some("HELP") => ctx.notice(self.uid(), from, "Commands: REGISTER, IDENTIFY (coming soon)."),
Some(other) => ctx.notice(self.uid(), from, format!("Unknown command: {}. Try HELP.", other)),
None => {}
}
}
}