IRC Protocol

Repartee implements comprehensive IRC protocol support covering RFC 2812 and a wide range of IRCv3 extensions, all negotiated automatically at connection time.

Core Protocol

The core IRC layer handles all standard protocol operations defined in RFC 2812:

  • Connection registration -- NICK, USER, PASS, and capability negotiation
  • Channel operations -- JOIN, PART, KICK, INVITE, TOPIC, MODE, ban lists
  • Messaging -- PRIVMSG, NOTICE to channels and users
  • Server queries -- MOTD, LUSERS, VERSION, STATS, INFO, ADMIN, TIME, LINKS
  • User queries -- WHO, WHOIS, WHOWAS, NAMES, LIST
  • CTCP -- VERSION, PING, TIME, ACTION, and custom CTCP queries

IRCv3 Capabilities

Repartee negotiates IRCv3 capabilities during connection via CAP LS/REQ/ACK. The following capabilities are requested when the server supports them:

CapabilityDescription
multi-prefixMultiple mode prefixes per nick (e.g. @+nick)
extended-joinAccount name and realname in JOIN messages
ircnet.com/extended-joinIRCnet ircd 2.12 extension -- JOIN also carries UID, IP and netjoin flag
server-timeMessage timestamps from the server
account-tagAccount name on every message
cap-notifyServer-side capability change notifications
away-notifyReal-time away status changes
account-notifyAccount login/logout notifications
chghostReal-time ident/hostname changes
echo-messageAuthoritative echo of sent messages
invite-notifyNotifications for channel invites
batchGrouped message batches (netsplit/netjoin)
userhost-in-namesFull user@host in NAMES replies
message-tagsArbitrary IRCv3 message metadata (incl. msgid), and client tags on TAGMSG
draft/chathistoryServer/bouncer history: scroll-back paging + reconnect gap-fill
draft/event-playbackJOIN/PART/mode replay inside history batches
draft/multilineA multi-line message sent as one logical message

The ratified +typing client tag rides on TAGMSG over message-tags, so it needs no capability of its own.

Server History & Multiline

When a server or bouncer (soju, ergo, …) advertises draft/chathistory, Repartee pulls history over the wire and folds it into its local SQLite backlog: scroll a channel toward the top to page older messages, and after a reconnect the gap since your last message is filled automatically. History is de-duplicated by msgid and rendered quietly (no notification spam).

draft/multiline lets a pasted or composed multi-line message travel as a single logical message — framed as one BATCH, reassembled on the other side, and E2E-safe so an encrypted block stays one RPE2E unit. In the TUI, Alt+Enter inserts a line break. See the IRCv3 Support reference for the full behaviour.

Typing Indicators

Repartee implements the ratified IRCv3 +typing client tag, so you can see who is actively composing a message in the current channel or query — shown as a status-line item in the TUI and a matching indicator in the web UI (alice and bob are typing…).

Notifications are throttled to one every 3 seconds and expire on their own (6 s after an active, 30 s after a paused), so a peer who disappears mid-sentence never leaves a stuck indicator. Sending the message retracts it. A /me draft counts as typing; a /command draft does not. Typing frames are charged against the normal flood budget, and a TAGMSG never opens a buffer, lands in your log, or bumps an unread counter.

Warning:

Sending is on by default. Out of the box, people in your channels and queries can see when you are composing. Turn it off with /set typing.send_channels false and /set typing.send_queries false; /set typing.show false stops displaying everyone else's. See the [typing] configuration.

SASL Authentication

Repartee supports three SASL mechanisms for authenticating with IRC services:

  • PLAIN -- username and password authentication
  • EXTERNAL -- client certificate-based authentication
  • SCRAM-SHA-256 -- challenge-response authentication with no plaintext password transmission
Tip:

Tip: SASL authentication is configured per-server in your config.toml. Repartee automatically selects the strongest available mechanism.

WHOX Support

WHOX (extended WHO) is auto-detected when the server advertises it via ISUPPORT. Repartee uses WHOX queries to populate account names and full user@host information for nick entries, providing richer user data in the nick list and enabling account-based features like extbans.

Full parity on ircu-family and IRCnet servers. /who — and the nick-list metadata the automatic join-time WHO feeds — understands the SID/UID-aware replies these ircds send, so away state, account names, ident and real hostnames populate correctly there instead of coming back blank. Repartee picks the right field selector per server lineage, disambiguates the reply layout by argument count, and strips IRCnet's extra SID token so it no longer renders glued to the realname. Plain WHO (352) updates nick entries too, so even servers without WHOX get away state and real hostnames.

Extban

Repartee supports the $a:account extended ban type, which bans users by their services account name rather than by hostmask. This is more reliable than hostmask bans since accounts persist across reconnections and host changes.

Use the /ban -a shorthand to quickly set an account-based ban on a user in the current channel.

DCC CHAT

Repartee supports direct peer-to-peer chat connections via the DCC CHAT protocol:

  • Active and passive modes -- initiate direct connections or use reverse (passive) DCC for users behind NAT
  • =nick buffer convention -- DCC chats appear as =Alice in the buffer list, matching irssi behavior
  • Auto IP detection -- from the IRC socket, with manual override via /set dcc.own_ip
  • Auto-accept masks -- configure trusted hostmasks to automatically accept DCC requests
  • Tab-completable commands -- /dcc chat, /dcc close, /dcc list, /dcc reject

Flood Protection

Repartee includes built-in flood protection to prevent being disconnected for sending too many messages too quickly. Outgoing messages are rate-limited to comply with server-side flood thresholds, with automatic queuing and draining.

Netsplit Detection

Netsplit events (server-to-server link failures) are automatically detected and displayed as collapsed, human-readable summaries rather than flooding your channel with individual QUIT and JOIN messages. This uses the IRCv3 batch capability when available, with pattern-based heuristic detection as a fallback.

Multi-Network Support

Repartee supports connecting to multiple IRC networks simultaneously. Add multiple [servers.*] sections to your config file and each network gets its own connection, set of channel buffers, and independent state. All connections share a single event loop for efficient resource usage.

Note:

Next: See the IRCv3 Support reference for detailed protocol coverage, or the Configuration guide to set up server connections.