# chaosircd

chaosircd

An IRC daemon built out of runtime-(re)loadable modules — every command, channel mode, user mode and flood check is its own .so, swapped in and out without a restart.

Get started IRCv3 migration plan GitHub

Where chaosircd earns its complexity

Loadable everything

A client command, a channel mode, a user mode, a flood-control check — each one is its own module, loaded per modules.conf and reloadable without taking the network down.

Started as patches to ircd-hybrid to link servers by hostname instead of a static IP (for a network partly running behind a cablemodem's dynamic address); everything past the borrowed dlink linked-list code was written from scratch from there.

The story →

servauth

DNS resolution, ident (RFC 1413), and open-proxy scanning for every connecting client all run in one dedicated child process — lib/servauth/ — so the main event loop never blocks on any of the three.

K-lines and G-lines don't stop at the application layer: a banned address gets pushed onto a BPF socket filter on Linux, refused before it costs the daemon a read().

Features →

WebSocket gateway

lc_lws speaks IRC over ws:///wss:// on the same listener a normal client would use — no separate bouncer process — and self-hosts gamja, a small web IRC client, straight off the wire.

Feeds directly into the IRCv3 migration: a browser client is the fastest way to notice what modern IRC clients actually expect.

IRCv3 plan →

IRC over a WebSocket, same listener

$ wscat --connect ws://localhost:6667/ \
    -x 'NICK roman' -x 'USER roman 0 * :Roman' -x 'JOIN #chaosircd'
< :chaosircd.example 001 roman :welcome to the internet relay chat roman
< :roman!~roman@localhost JOIN #chaosircd

No relay, no translation layer — lc_lws sniffs the handshake on an ordinary client listener and adopts matching connections directly into the same lclient_parse()/ lclient_vsend() path every other client goes through. Point a browser at the same port and gamja loads from it too.

Build it

$ git clone https://github.com/rsenn/chaosircd.git && cd chaosircd
$ cmake -S . -B build
$ cmake --build build -j

Add -DBUILD_LC_LWS=ON for the WebSocket gateway and bundled gamja client — see the WebSocket gateway for what that pulls in.

Status: old, and honest about the gaps

chaosircd has run real networks since 2003, in long bursts separated by long quiet ones — this is a project that gets worked on when it's running something for real, not on a release schedule. CAP was a permanently-empty stub until the IRCv3 work started; most of the capabilities a modern client expects (message-tags, server-time, batch, SASL, ...) aren't there yet.

The IRCv3 migration plan is the honest list of what's done and what isn't, ordered by what's worth doing next rather than by spec number.