IRCv3 Commands
Negotiate IRCv3 capabilities between client and server.
Subcommands:
CAP LS [302]— list available capabilitiesCAP REQ <capabilities>— request capabilitiesCAP ACK <capabilities>— server acknowledges (server-side only)CAP NAK <capabilities>— server rejects (server-side only)CAP LIST— list your currently enabled capabilitiesCAP END— end capability negotiation and proceed with registration
Behavior:
- Sending
CAP LSenters capability negotiation mode, which blocks registration completion (the001 RPL_WELCOME) even if NICK and USER have been sent - This allows SASL authentication to complete before registration
CAP ENDreleases the block and proceeds with the handshake- Capabilities can be enabled/disabled with
+and-prefixes inCAP REQ
Example:
→ CAP LS 302← :server CAP * LS :SASL=PLAIN EXTENDED-JOIN AWAY-NOTIFY MESSAGE-TAGS SERVER-TIME MSGID MULTI-PREFIX UHNAMES ACCOUNT-TAG ACCOUNT-NOTIFY CHGHOST CLIENT-TAGS INVITE-EXTENDED INVITE-NOTIFY CAP-NOTIFY SETNAME EXTENDED-UHLIST MONITOR sts=port=6697
→ CAP REQ :SASL EXTENDED-JOIN AWAY-NOTIFY MULTI-PREFIX← :server CAP * ACK :SASL EXTENDED-JOIN AWAY-NOTIFY MULTI-PREFIX
→ AUTHENTICATE PLAIN← :server AUTHENTICATE +
→ AUTHENTICATE <base64_credentials>← :server 900 * nick!ident@host accountname :You are now logged in as accountname← :server 903 * :SASL authentication successful
→ CAP END← (registration continues: 001, 002, 003, etc.)Non-requestable capabilities:
STS— informational only; included inCAP LSbut cannot beCAP REQ’d
AUTHENTICATE
Section titled “AUTHENTICATE”SASL authentication during the connection handshake.
Syntax: AUTHENTICATE <mechanism|data|*>
Flow:
- Request
SASLcapability inCAP REQ AUTHENTICATE PLAIN— select the PLAIN mechanism- Server responds:
AUTHENTICATE + - Send base64-encoded credentials:
AUTHENTICATE <base64> - Server responds with 900/903 (success) or 904 (failure)
Aborting SASL:
AUTHENTICATE *PLAIN format:
The credential string before base64 encoding is: authzid\0authcid\0password
For example, to login as Alice with password secret:
\0Alice\0secretBase64 encoded: AEFsaWNlAHNlY3JldA==
Constraints:
- Only valid during CAP negotiation (
cap_negotiating = true) - Only valid before registration (
registered = false) - Maximum of 3 failed attempts per connection (configurable via
max_attempts_per_connection) - PLAIN requires TLS unless
require_tls: falseis configured - Each AUTHENTICATE message has a maximum length of 400 characters
Errors:
| Numeric | Meaning |
|---|---|
904 ERR_SASLFAIL | Authentication failed |
905 ERR_SASLTOOLONG | Message too long |
906 ERR_SASLABORTED | SASL aborted |
907 ERR_SASLALREADY | Already authenticated |
908 RPL_SASLMECHS | Available mechanisms list |
ACCOUNT
Section titled “ACCOUNT”Account change notification (server-generated).
This is sent by the server to clients with the ACCOUNT-NOTIFY capability when a user identifies or logs out.
Format:
:nick!ident@host ACCOUNT accountname:nick!ident@host ACCOUNT *accountname— user has identified to this account*— user has logged out
TAGMSG
Section titled “TAGMSG”Send a message with tags but no text content.
Syntax: TAGMSG <target>
Behavior:
- Sends message tags without a text body (useful for reactions, typing indicators, etc.)
- Requires
MESSAGE-TAGScapability - The message is delivered with whatever client-only tags the sender includes
Example:
@+react=👍 TAGMSG #channelMONITOR
Section titled “MONITOR”Track when specific users go online or offline.
Syntax:
MONITOR + <nick1>[,<nick2>,...]— add to monitor listMONITOR - <nick1>[,<nick2>,...]— remove from monitor listMONITOR L— list your monitor targetsMONITOR C— clear your monitor listMONITOR S— show current status of all monitored targets
Behavior:
- Efficient alternative to ISON polling
- When a monitored user connects: you receive
730 RPL_MONONLINE - When a monitored user disconnects: you receive
731 RPL_MONOFFLINE - Maximum targets per user: 100 (configurable via
monitor.max_targets) - Requires
MONITORcapability
Responses:
730 RPL_MONONLINE— monitored user came online731 RPL_MONOFFLINE— monitored user went offline732 RPL_MONLIST— your monitor list733 RPL_ENDOFMONLIST— end of monitor list734 ERR_MONLISTFULL— monitor list is full
Example:
MONITOR + Alice,Bob,CharlieMONITOR SMONITOR - BobSETNAME
Section titled “SETNAME”Change your real name (GECOS) during an active session.
Syntax: SETNAME :<new real name>
Behavior:
- Updates your visible real name immediately
- Other users with
SETNAMEcapability receive aSETNAMEnotification - Requires
SETNAMEcapability to be negotiated
Constraints:
- Maximum real name length: 50 characters
Example:
SETNAME :Alice Smith (away)CHGHOST
Section titled “CHGHOST”Change a user’s visible hostname. (Operator command; see also Operator Commands)
When a hostname change occurs, users in shared channels who have the CHGHOST capability receive a notification:
:nick!ident@oldhostname CHGHOST ident newhostWEBIRC
Section titled “WEBIRC”Identify as a WebIRC gateway to pass the real user’s IP and hostname.
Syntax: WEBIRC <password> <gateway> <hostname> <ip> [options]
Behavior:
- Must be sent before NICK/USER
- The gateway must be configured in
webirc.gatewayswith matching IP and password - Sets the user’s real IP and hostname to the provided values
- Optional
secureflag indicates the client connected via HTTPS/WSS to the gateway
Example:
WEBIRC gatewaypassword kiwiirc user.hostname.com 203.0.113.45WEBIRC gatewaypassword kiwiirc user.hostname.com 203.0.113.45 :secure=1See WebIRC Configuration for setup details.