IRCv3 & SASL
capabilities
Negotiated with CAP LS / CAP REQ. Your client normally does this for you.
| Capability | Effect |
|---|---|
sasl | Login during connection. Advertised as sasl=PLAIN,SCRAM-SHA-256, or sasl=PLAIN,SCRAM-SHA-256,EXTERNAL when request_client_cert is on. |
draft/account-registration | Create an account from your client. Advertised as draft/account-registration=custom-account-name. See accounts. |
account-notify account-tag | Account login/logout notices and the sender's account on messages. |
away-notify | Live AWAY updates for channel-mates. |
multi-prefix userhost-in-names | All rank prefixes, and full nick!user@host, in NAMES and WHO. |
extended-join chghost setname | Account and realname on JOIN; live host and realname changes. |
echo-message | Your own messages are echoed back to you. |
message-tags server-time | Message tags and server timestamps. Client-only tags (+typing, +draft/reply) are relayed on messages and on tag-only TAGMSG; a TAGMSG does not count toward +f channel flood. |
invite-notify standard-replies | Invite visibility for ops; machine-readable FAIL/WARN/NOTE replies. |
batch labeled-response | Related lines grouped in a BATCH; replies tagged with the label of the command that caused them. |
draft/chathistory | Message history with CHATHISTORY. See history. Not advertised when history_size = 0. |
draft/message-redaction | REDACT: take back a message. See history. |
draft/read-marker | MARKREAD: where you stopped reading, shared by every session of your account. See history. |
draft/multiline | One message over several lines, up to 24 lines and 4096 bytes (draft/multiline=max-bytes=4096,max-lines=24). The batch stays whole across linked servers and in history; clients without the cap get one message per line. Spam filters check the whole text. |
cap-notify | Live CAP NEW/CAP DEL when capabilities change, for example history being turned on or off by a rehash. |
extended-monitor | MONITOR targets also get away, account and host updates. |
draft/no-implicit-names draft/pre-away | No automatic NAMES after JOIN; AWAY can be set before registration finishes. |
draft/channel-rename | RENAME <old> <new> [:reason]: a chanop renames a live channel, keeping members, modes and history. |
draft/event-playback | CHATHISTORY also replays joins, parts, quits, kicks, mode and topic changes, nick changes and TAGMSG reactions. See history. |
draft/extended-isupport | The ISUPPORT command sends the 005 list on demand, also before registration; with batch, every 005 list comes in a draft/isupport batch. |
With batch, the quits of a netsplit come in one netsplit batch and the joins of a server relinking in one netjoin batch,
both named after the two servers, so clients can fold them into a single line.
UTF8ONLY is advertised and enforced: a line that isn't valid UTF-8 is refused with FAIL <command> INVALID_UTF8
and never relayed ([messages] utf8_only = false turns this off for networks with legacy-charset users).
[server] icon = "https://..." advertises the network's icon as draft/ICON. [messages] client_tag_deny
sets CLIENTTAGDENY: client-only tags that are not relayed ("typing", or "*,-draft/react,-draft/reply" for all but those).
A +draft/channel-context tag is relayed only when it names a channel the sender is on.
Also advertised in 005: MONITOR=100, ELIST=MNU, EXTBAN=,a, STATUSMSG=@%+, EXCEPTS, INVEX, and CHATHISTORY=<n> (the most a single request returns, at most 100).
history
[messages] history_size = 50 # messages kept per conversation; 0 turns history off, max 500 #history_file = "history.json" # survive restarts (history and read markers) #history_dm = true # also keep private messages between two logged-in accounts #history_events = true # also keep joins, parts, modes, topics, nicks and reactions (for draft/event-playback)
Clients with draft/chathistory and batch ask for what they missed. Replies come in a BATCH of type
chathistory, each message with its original time and msgid tags.
| Command | Returns |
|---|---|
CHATHISTORY LATEST <target> * <limit> | The newest messages. With a timestamp= or msgid= instead of *, only those newer than it. |
CHATHISTORY BEFORE|AFTER|AROUND <target> <ref> <limit> | Messages before, after or around a reference (timestamp=2026-10-09T17:20:43.123Z or msgid=...). |
CHATHISTORY BETWEEN <target> <ref> <ref> <limit> | Messages between two references, in either order. |
CHATHISTORY TARGETS <ts> <ts> <limit> | Your channels and private chats with activity in that window, newest first. |
With draft/event-playback the batch also holds the channel's events (JOIN, PART, QUIT, KICK, MODE, TOPIC, NICK) and
TAGMSGs such as +draft/react, each with its own msgid; +typing is never kept. Clients without the cap see only
PRIVMSG and NOTICE, and limits and references count only those. Events are not kept in +D or +u channels.
A channel's history is readable by its members (and IRC operators) and is kept even when the channel empties.
Private history needs both sides to be logged in to an account. Requests are capped at 100 messages.
CHATHISTORY or MARKREAD sent without the capability (or with history off) gets FAIL ... INVALID.
With draft/read-marker, a logged-in client sends MARKREAD <target> timestamp=<time> as you read.
The server keeps the latest position per account and target, sends it on JOIN, and forwards every change to your other sessions,
so a conversation you read on one device shows as read on the others. MARKREAD <target> without a timestamp asks for the stored one.
REDACT <target> <msgid> [:reason] takes a message back. You may redact your own messages (same account, or the
same nick!user@host when not logged in); in a channel, chanops and IRC operators may redact anyone's. Only messages still in
history can be redacted, since that is where the server checks who sent them. The message is removed from history on every server, and clients that
negotiated draft/message-redaction get the REDACT and hide it; other clients can't take back what they already showed.
Errors are FAIL REDACT INVALID_TARGET, UNKNOWN_MSGID or REDACT_FORBIDDEN.
accounts
Accounts are provided by NickServ in the services daemon (bin/services, see services). Every server relays
SASL and REGISTER to it, so the whole network shares one account database. While services are down, sasl and
draft/account-registration are not offered (cap-notify announces them coming and going) and users already logged in stay logged in.
# services/services.toml [nickserv] #store_file = "../config/accounts.json" # unset: the existing database is found and used in place
Ways to register, all creating the same account and logging you in at once:
| Method | Command |
|---|---|
| NickServ | /msg NickServ REGISTER <password> [email]. The account is named after your current nick. |
| IRCv3 draft | REGISTER <account|*> <email|*> <password>. * means your nick. Replies REGISTER SUCCESS. The email is accepted but not stored or verified. Not available before the connection is registered. |
| Classic | /REGISTER <account> <password> |
To log in later: /msg NickServ IDENTIFY [account] <password> (account defaults to your nick). The best way is SASL, below, which logs you in during connection so no IDENTIFY is needed.
Forgot your password? /msg NickServ RESETPASS <account> mails a code to your verified address. Accounts back 330 RPL_WHOISACCOUNT
and the extban a:<account> for +b, +e and +I, matching by account instead of hostmask.
Clients without SASL can log in with PASS account:password at connect.
A logged-in client may run SASL again to switch accounts (re-authentication); if it fails, the current login stays.
SASL PLAIN
Configure your client for SASL PLAIN with your account name and password. It sends AUTHENTICATE PLAIN during connection setup.
PLAIN sends the password itself, so use it only over TLS.
SASL SCRAM-SHA-256
SCRAM proves you know the password without sending it, and the server proves it knows it too, so a fake server cannot collect passwords. The server stores only a salted SCRAM key derived from the password, never the password.
The key is made when the account is registered or when you log in with a password (PLAIN or IDENTIFY).
An older account that has never done either has no key yet, and SCRAM fails for it once: log in with PLAIN one time, then SCRAM works.
Changing the password replaces the key. The SekurNet web chat uses SCRAM automatically and falls back to PLAIN only in that one case.
SASL EXTERNAL (certificate login)
EXTERNAL logs in with a TLS client certificate instead of a password. The server does not validate the certificate against a CA; it only checks whether that exact SHA-256 fingerprint is bound to an account, so self-signed is fine.
1. ask for client certificates
[tls] enabled = true request_client_cert = true # only requests a cert; clients without one still connect
2. make a certificate
openssl req -x509 -newkey rsa:2048 -nodes -days 3650 \ -keyout client-key.pem -out client-cert.pem -subj "/CN=myaccount"
Most clients (WeeChat, irssi, ...) have a "client certificate" option pointing at the pair.
3. bind it to your account
Connect with the certificate, log in normally (PLAIN or /REGISTER), then:
/CERT ADD # binds the fingerprint of the certificate you connected with /CERT INFO # show it /CERT DEL # remove it (disables EXTERNAL until you ADD again)
4. connect passwordless
Connecting with that certificate and sending AUTHENTICATE EXTERNAL logs the account in. Most clients do this
automatically once both client-cert and SASL EXTERNAL are configured.