An IRC server that remembers. Accounts, history and channel ownership live in the server itself — no NickServ, no ChanServ, no services package bolted on the side — and it speaks the IRCv3 extensions a modern client needs. Written in Rust.
Rust · tokio · rustls · MariaDB · one static binary, no OpenSSL · BSD-3-Clause
;; on a plain IRC client, no services to /msg /REGISTER * * hunter2-but-longer REGISTER SUCCESS kara :Account successfully registered /JOIN #mine :irc.example.net MODE #mine +o kara ;; you made it, you own it /CHANOWN #mine #mine belongs to kara ;; a week later, from a different client, under a different nick — ;; the room was empty in between. It is still yours. /JOIN #mine :irc.example.net MODE #mine +o kara
What NickServ and ChanServ did, the server does.
Most IRC networks run a separate services package beside the server — a pile of
bots you /msg to register a nick or claim a channel. rIRCd has none. Everything
a services package did is a command the server answers itself, backed by MariaDB.
| Services did this | rIRCd does this |
|---|---|
| Nick registration | REGISTER / VERIFY (draft/account-registration), with optional email verification |
| Identify | SASL PLAIN, SCRAM-SHA-256 or EXTERNAL — no /msg NickServ |
| Nick protection | A registered nick is reserved for its account |
| Nick recovery | GHOST <nick> closes a stale session of your own, wherever on the network it is |
| Password change | PASSWD <current> <new> — the current one is asked for even while logged in |
| Password recovery | RESETPASS <account> mails a code; using it closes every login to the account |
| Dropping an account | DROPACCOUNT <password> removes the account and everything that named it |
| Channel founder | The account that creates a channel. Always opped on join, never shut out by its own +b/+i/+k/+l, not kickable or deoppable in it |
| Channel transfer | CHANOWN #channel <account> — by the founder, or by an operator, said out loud in the channel |
| Access lists | MODE +o / +v on an account is remembered and restored on the next join, under any nick |
| Channel modes, topic, key | Persisted; kept when an owned channel empties, restored on startup |
| Ban lists | +b, +e, +I and +q masks persisted and restored |
| Network bans | KLINE / DLINE, persisted, enforced on connect, and carried across server links |
| Grouped nicks | GROUP reserves the nick you are wearing for your account — the work nick, the phone nick — so being logged in is enough to use any of them. You have to be using a nick to group it: reserving names you have never been seen under is squatting |
| What is held about you | ACCOUNTINFO — when the account was registered and last seen, the address on it, every nick grouped to it, the channels it founded |
| Changing the address | SETEMAIL asks two things: the password, which says it is you, and a code read at the new address, which says you can receive there |
| Server-side ignore | SILENCE +mask — somebody who does not exist to you, and nothing tells them so |
| Vhosts | Automatic HMAC cloaking of every connecting address; SETHOST for operators |
A channel belongs to somebody.
Whoever creates a channel while logged in is its founder — an account, not a nick, so whoever is logged in as it owns the channel on any connection and under any name. A founder is opped whenever they come back, cannot be kicked out of their own channel, cannot be deopped in it, and is not shut out by its own modes. An operator turning on the person who appointed them is how a channel gets stolen, and none of those doors opens that way.
CHANOWN #channel who it belongs to CHANOWN #channel <account> hand it on CHANACCESS #channel who has access CHANDROP #channel give it up
The founder wears ^ (+x) and can put somebody above the operators as & (+a). Status is given and taken only by people who have some of their own, and nobody reaches above themselves. The founder’s ^ comes from the registration rather than from a MODE, so it is true again every time they walk in — on every server.
A network operator may hand on any channel — one whose founder has vanished, or whose founder is the problem, has no other way out. But an operator doing it is announced in the channel as an operator and logged by name. What keeps an operator honest is not being unable to act; it is being unable to act quietly.
A channel that belongs to somebody stays known when the last person walks out — modes, bans, topic and access lists intact. A channel nobody owns is forgotten when it empties, the way a name two people used for an afternoon should be.
channel_creation = "accounts" means only somebody logged in may bring a new channel into being. It gates making one, never joining one, so no channel on the network is ever nobody’s.
Close the client. Come back. Read what you missed.
CHATHISTORY LATEST / BEFORE / AFTER / AROUND / BETWEEN. Clients with draft/event-playback get the full timeline.CHATHISTORY TARGETS lists the conversations you have.MARKREAD persisted per account, so reading something on one device clears it on the other.FILEHOST out of ISUPPORT, POSTs with the same credentials it uses for SASL, and is handed back a URL to paste. A stored file is named by the server, so nothing an uploader writes becomes a path. A network reachable both by name and as a hidden service can name two doors onto one directory. Each client is told the one it came in by, and handed a link on that door — so a file shared from Tor is an onion link, and nobody is asked to leave Tor to share a picture. It does not edit what anybody says: a clearnet user's link stays a clearnet link, including to the people on the onion.[expiry] can let go of accounts nobody has logged in to and channels nobody holding them has visited — a policy a server with real people on it should choose rather than be handed.The tools every other server has, and then some.
A K-line closes the connection, which tells whoever was behind it to come back from another address. SHUN leaves them connected and lets nothing they say reach anybody — no error, no numeric, no hint. They may listen, answer a PING and leave. Nobody is told but the operators. A shun that announced itself would just be a slower kill.
SPAMFILTER is a pattern, where it is looked for — private messages, channels, nicks, topics, quit reasons, real names — and what happens when it is found: warn, block, kill, or ban the address. Globs or regular expressions, and SPAMFILTER TEST tries one before it is set.
RESV holds a name. Somebody who asks for a reserved channel or nick is told why — which is the difference between this and a spam filter. A filter is quiet on purpose, because telling a spammer what caught them hands them the way around it. A reservation is a rule people are meant to be able to read.
Every blocklist eventually lists somebody who belongs here — a shared address, a VPN, an exit node. ELINE vouches for one while the rest of the list stands, instead of the two blunt alternatives: stop believing it for everybody, or stop asking. It covers the blocklist and a D-line at the door, and a K-line or shun once there is a nick. It is not a promise about behaviour: KILL still works, and so does a channel ban.
SAJOIN, SAPART and SAMODE put somebody in a channel, take them out, or set modes without holding ops there. TESTMASK says how many people a ban would hit before anybody sets it, and MAP draws the network. Server notice masks let each operator choose what they hear.
A gateway carrying two hundred people from one address, a bot that must not be pinged out while it thinks, and somebody on a phone are not the same thing. [[classes]] gives each a set of numbers — connections, ping interval, flood allowance, send queue — instead of tuning one set for whichever it would rather lose.
An operator block’s hostmask is enforced on the real address rather than the cloak. require_tls refuses OPER over a connection that is not encrypted, so the password never crosses a wire in the clear, and certfp can be a second factor — or the whole ceremony, with no password at all.
The IRCv3 a client like Switchboard asks for.
PLAIN, SCRAM-SHA-256, EXTERNAL (client certificate) · STS · draft/account-registration · register-before-connecttext.ircv3.net) · WebIRCA database, a build, a prompt.
# MariaDB or MySQL. The schema is created on first start — no migrations to run. cargo build --release sudo cp target/release/rircd /usr/local/bin/ sudo rircd init # asks the questions, writes /etc/rIRCd/config.toml sudo rircd run
REHASH from an operator or SIGHUP from outside re-reads the configuration and the TLS certificate without dropping anybody. A Let’s Encrypt renewal is systemctl reload rircd.DLINE at the socket, and operator notices for every OPER attempt. Behind a reverse proxy that budget would be one address for everybody, so X-Forwarded-For is read — believed only from an address you named as a proxy, and the last entry taken, because a proxy appends what it saw and a client sending a header of its own pushes its lie to the left. Behind a hidden service there is no header that could help, so a failed check is charged twice: once to the address and once to the account being tried, and the wait is whichever has earned more. An account under guessing is slowed wherever the guessing comes from, and one guesser on a shared address is no longer paid for by everybody else on it.+s) so an operator chooses what they hear; channel modes every other server has, including +M, +Z, join throttle and flood limit; bans that lift themselves.Numbers from a run, not from a feeling.
tests/smoke/throughput.py puts every client in one channel, so each message a
sender posts is delivered to every receiver, and reads the server’s own CPU out of
/proc around the burst alone — steady-state delivery, not the cost of
setting the connections up. On a quiet sixteen-core machine over loopback, 500 receivers
in one channel and 5 senders:
| Deliveries | ~126,000 a second |
| One message to all 500 | p50 9.7 ms · p99 19.2 ms |
ISUPPORT is a promise, too. A client that reads NICKLEN=32 will not
offer a longer one. Each of those numbers lives in one place — the token the server
sends and the code that enforces it read the same constant — and a test suite reads the
expectations out of the server’s own ISUPPORT rather than having them
written down, so it checks that the numbers it gives out are the numbers it keeps.
Behind an onion, everybody is 127.0.0.1.
Every client reaching the server through a hidden service arrives from the same address, so a per-address connection limit silently becomes “this many people may use Tor at once” — a rule nobody meant to write, and one that cannot be fixed by counting more carefully. rIRCd lets the onion have a listener of its own, capped as a whole rather than per address: a weaker promise, and the strongest one available.
[server] listen = ["0.0.0.0:6667", "127.0.0.1:6668"] # 6668 is the one Tor forwards to [limits] max_connections_per_ip = 16 # still true of the public port shared_address_listeners = ["127.0.0.1:6668"] max_clients_behind_one_address = 256
Written once, in the README.
The docs are generated from the README of the release that is running, so they cannot describe a server that no longer exists. Every configuration key, every command, every mode, and the whole IRCv3 table.