1 TS6 protocol description
2 Written by Jilles Tjoelker
4 General format: much like rfc1459
5 Maximum parameters for a command: 15 (this does not include the prefix
8 SID: a server's unique ID. It is configured in each server and consists of
9 a digit and two alphanumerics. Sending SIDs with lowercase letters is
12 UID: a client's unique ID. It consists of the server's SID and six
13 alphanumerics (so it is nine characters long). The first of the alphanumerics
14 should be a letter, numbers are legal but reserved for future use.
16 hunted: a parameter type used for various remote requests. From local users,
17 nicknames and server names are accepted, possibly with wildcards; from servers,
18 UIDs/SIDs (sending names or even wildcards is deprecated). This is done with
19 the function hunt_server(). Any rate limiting should be done locally.
21 duration: a parameter type used for ban durations. It is a duration in seconds.
22 A value of 0 means a permanent ban.
24 propagation: to which other servers the command is sent
26 For all commands with a hunted parameter, the propagation is determined by
27 that, and not otherwise specified.
29 For all commands with a target server mask parameter, the propagation is
30 determined by that, and not otherwise specified. The command is sent to all
31 servers with names matching the given mask (for example '*', '*.example.com',
32 'irc.example.com'). Those servers do not have to be directly connected.
33 Targets cannot be SIDs.
35 Propagation broadcast means the command is sent to all servers.
37 Propagation one-to-one means the command is only sent to the target or the
38 server the target is on.
40 Propagation none means the command is never sent to another server if it is
43 For some other commands, the propagation depends on the parameters and is
46 services server: server mentioned in a service{} block. There are no services
49 service: client with umode +S. This implies that it is on a services server.
52 The initiator sends the PASS, CAPAB and SERVER messages. Upon receiving the
53 SERVER, the listener will check the information, and if it is valid, it will
54 send its own PASS, CAPAB and SERVER messages, followed by SVINFO and the burst.
55 Upon receiving the SERVER, the initiator will send SVINFO and the burst. If
56 ziplinks are used, SVINFO is the first compressed message.
58 The burst consists of SID and SERVER messages for all known servers, UID or
59 EUID messages for all known users (possibly followed by ENCAP REALHOST, ENCAP
60 LOGIN and/or AWAY) and SJOIN messages for all known channels (possibly followed
65 +D (deaf: does not receive channel messages)
66 +S (network service) (only settable on burst from a services server)
67 +a (appears as server administrator)
68 +i (invisible, see rfc1459)
69 +o (IRC operator, see rfc1459)
70 +w (wallops, see rfc1459) (always propagated for historical reasons)
72 +Q/+R/+g/+l/+s/+z (only locally effective)
73 +Z (ssl user) (only settable on burst)
74 possibly more added by modules
86 +k (key: password required to join, <= 23 ascii chars, no : or , or whitespace)
88 +l (limit: maximum number of members before further joins are disallowed)
91 +n (no external messages)
92 +p (private: does not appear in /whois to non-members, no /knock allowed)
93 +r (only registered users may join) (only if a services server exists)
95 +t (only chanops may change topic)
100 +f (forward: channel name <= 30 chars)
101 +j (join throttle: N:T with integer N and T)
103 +F (free target for +f)
105 +P (permanent: does not disappear when empty)
106 +Q (ignore forwards to this)
108 +g (allow any member to /invite)
109 +z (send messages blocked by +m to chanops)
115 Remote ADMIN request.
119 propagation: broadcast
120 parameters: opt. away reason
122 If the away reason is empty or not present, mark the user as not away.
123 Otherwise, mark the user as away.
125 Changing away reason from one non-empty string to another non-empty string
126 may not be propagated.
130 propagation: broadcast
131 parameters: channelTS, channel, type, space separated masks
133 If the channelTS in the message is greater (newer) than the current TS of
134 the channel, drop the message and do not propagate it.
136 Type is the mode letter of a ban-like mode. In efnet TS6 this is 'b', 'e' or
137 'I'. In charybdis TS6 additionally 'q' is possible.
139 Add all the masks to the given list of the channel.
141 All ban-like modes must be bursted using this command, not using MODE or TMODE.
144 source: unregistered server
146 parameters: space separated capability list
148 Sends capabilities of the server. This must include QS and ENCAP. It is also
149 strongly recommended to include EX, CHW, IE and KNOCK, and for charybdis TS6
150 also SAVE and EUID. For use with services, SERVICES and RSFNC are strongly
153 The capabilities may depend on the configuration for the server they are sent
159 propagation: broadcast
160 parameters: client, new hostname
162 Changes the visible hostname of a client.
164 Opers are notified unless the source is a server or a service.
168 parameters: server to connect to, port, hunted
170 Remote connect request. A server WALLOPS should be sent by the receiving
173 The port can be 0 for the default port.
179 parameters: duration, mask, reason
181 Sets a D:line (IP ban checked directly after accepting connection).
183 The mask must be an IP address or CIDR mask.
187 parameters: target server mask, subcommand, opt. parameters...
189 Sends a command to matching servers. Propagation is independent of
190 understanding the subcommand.
192 Subcommands are listed elsewhere with "encap only".
195 source: server or unregistered server
197 parameters: error message
199 Reports a (usually fatal) error with the connection.
201 Error messages may contain IP addresses and have a negative effect on server
206 encap target: single server
210 Remote ETRACE information request.
216 parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, real hostname, account name, gecos
217 propagation: broadcast
219 Introduces a client. The client is on the source server of this command.
221 The account name is '0' if the user is not logged in with services.
225 EUID is similar to UID but includes the ENCAP REALHOST and ENCAP LOGIN
232 parameters: space separated capability list
234 Capability list of remote server.
244 parameters: target user, channel, opt. channelTS
245 propagation: one-to-one
247 Invites a user to a channel.
249 If the channelTS is greater (newer) than the current TS of the channel, drop
252 Not sending the channelTS parameter is deprecated.
257 parameters: '0' (one ASCII zero)
258 propagation: broadcast
260 Parts the source user from all channels.
264 parameters: channelTS, channel, '+' (a plus sign)
265 propagation: broadcast
267 Joins the source user to the given channel. If the channel does not exist yet,
268 it is created with the given channelTS and no modes. If the channel already
269 exists and has a greater (newer) TS, wipe all simple modes and statuses and
270 change the TS, notifying local users of this but not servers (note that
271 ban-like modes remain intact; invites may or may not be cleared).
273 A JOIN is propagated with the new TS of the channel.
277 parameters: channel, target user, opt. reason
278 propagation: broadcast
280 Kicks the target user from the given channel.
282 Unless the channel's TS is 0, no check is done whether the source user has ops.
284 Not sending the reason parameter is questionable.
288 parameters: target user, path
289 propagation: broadcast
291 Removes the user from the network.
293 The format of the path parameter is some sort of description of the source of
294 the kill followed by a space and a parenthesized reason. To avoid overflow,
295 it is recommended not to add anything to the path.
301 parameters: duration, user mask, host mask, reason
303 Sets a K:line (ban on user@host).
308 parameters: target server mask, duration, user mask, host mask, reason
310 As form 1, deprecated.
315 propagation: broadcast
317 Requests an invite to a channel that is locked somehow (+ikl). Notifies all
318 operators of the channel. (In charybdis, on +g channels all members are
321 This is broadcast so that each server can store when KNOCK was used last on
326 parameters: hunted, server mask
328 Remote LINKS request. The server mask limits which servers are listed.
336 Sends a message to operators (with umode +l set). This is intended to be
337 used for strict subsets of the network.
342 parameters: target server mask, text
344 As form 1, deprecated.
349 parameters: account name
351 In a burst, states that the source user is logged in as the account.
355 parameters: server mask, hunted
357 Remote LUSERS request. Most servers ignore the server mask, treating it as '*'.
362 parameters: client, umode changes
363 propagation: broadcast
365 Propagates a user mode change. The client parameter must refer to the same user
368 Not all umodes are propagated to other servers.
372 parameters: channel, cmode changes, opt. cmode parameters...
374 Propagates a channel mode change.
376 This is deprecated because the channelTS is not included. If it is received,
377 it should be propagated as TMODE.
388 parameters: new nickname, new nickTS
389 propagation: broadcast
391 Propagates a nick change.
395 parameters: nickname, hopcount, nickTS, umodes, username, hostname, server, gecos
397 Historic TS5 user introduction. The user is on the server indicated by the
398 server parameter; the source server is meaningless (local link).
404 source: services server
405 parameters: duration, nickname
407 If duration is greater than 0, makes the given nickname unavailable for that
410 If duration is 0, removes a nick delay entry for the given nickname.
412 There may or may not be a client with the given nickname; this does not affect
417 parameters: msgtarget, message
419 As PRIVMSG, except NOTICE messages are sent out, server sources are permitted
420 and most error messages are suppressed.
426 parameters: command name, parameters
428 Reports operspy usage.
433 propagation: broadcast
435 Sends a message to operators (with umode +z set).
439 parameters: comma separated channel list, message
441 Parts the source user from the given channels.
444 source: unregistered server
445 parameters: password, 'TS', TS version, SID
447 Sends the server link password, TS version and SID.
451 parameters: origin, opt. destination server
453 Sends a PING to the destination server, which will reply with a PONG. If the
454 destination server parameter is not present, the server receiving the message
457 The origin field is not used in the server protocol. It is sent as the name
458 (not UID/SID) of the source.
460 Remote PINGs are used for end-of-burst detection, therefore all servers must
465 parameters: origin, destination
467 Routes a PONG back to the destination that originally sent the PING.
471 parameters: msgtarget, message
473 Sends a normal message (PRIVMSG) to the given target.
477 propagation: one-to-one
479 propagation: all servers with -D users on the channel
480 (cmode +m/+n should be checked everywhere, bans should not be checked
482 - a status character ('@'/'+') followed by a channel name, to send to users
483 with that status or higher only.
484 propagation: all servers with -D users with appropriate status
485 - a user@server message, to send to users on a specific server. The exact
486 meaning of the part before the '@' is not prescribed, except that "opers"
487 allows IRC operators to send to all IRC operators on the server in an
489 propagation: one-to-one
490 - a message to all users on server names matching a mask ('$$' followed by mask)
491 propagation: broadcast
492 - a message to all users with hostnames matching a mask ('$#' followed by mask).
493 Note that this is often implemented poorly.
494 propagation: broadcast
499 encap target: single server
503 Remote PRIVS information request.
509 Propagates quitting of a client. No QUIT should be sent for a client that
510 has been removed as result of a KILL message.
517 parameters: real hostname
519 In a burst, propagates the real host of a dynamically-spoofed user.
525 parameters: opt. rehash type
527 Remote REHASH request. If the rehash type is omitted, it is equivalent to
528 a regular /rehash, otherwise it is equivalent to /rehash <rehash type>.
534 parameters: duration, mask, reason
536 Sets a RESV, making a nickname mask or exact channel unavailable.
541 parameters: target server mask, duration, mask, reason
543 As form 1, deprecated.
548 encap target: single server
549 source: services server
550 parameters: target user, new nickname, old nickTS, new nickTS
552 Forces a nickname change and propagates it.
554 The command is ignored if the nick TS of the user is not equal to the old
555 nickTS parameter. If the new nickname already exists (and is not the target
556 user), it is killed first.
564 parameters: source uid, '*', 'S', sasl mechanism name
566 Requests that a SASL agent (a service) initiate the authentication process.
567 The source uid is that of an unregistered client. This is why it is not sent
571 encap target: single server
573 parameters: source uid, target uid, mode, data
575 Part of a SASL authentication exchange. The mode is 'C' to send some data
576 (base64 encoded), or 'S' to end the exchange (data indicates type of
577 termination: 'A' for abort, 'F' for authentication failure, 'S' for
578 authentication success).
583 propagation: broadcast
584 parameters: target uid, TS
586 Resolve a nick collision by changing a nickname to the UID.
588 The server should verify that the UID belongs to a registered user, the user
589 does not already have their UID as their nick and the TS matches the user's
590 nickTS. If not, drop the message.
592 SAVE should be propagated as a regular NICK change to links without SAVE capab.
597 source: unregistered server
598 parameters: server name, hopcount, server description
600 Registers the connection as a server. PASS and CAPAB must have been sent
601 before, SVINFO should be sent afterwards.
603 If there is no such server configured or authentication failed, the connection
606 This is propagated as a SID message.
610 propagation: broadcast
611 parameters: server name, hopcount, server description
613 Introduces a new TS5 server, directly connected to the source of this command.
614 This is only used for jupes as TS5 servers may do little else than existing.
618 propagation: broadcast
619 parameters: server name, hopcount, sid, server description
621 Introduces a new server, directly connected to the source of this command.
625 propagation: broadcast
626 parameters: new nickname, new username, new visible hostname, new nickTS, new login name
628 Broadcasts a change of several user parameters at once.
630 Currently only sent after an SVSLOGIN.
634 propagation: broadcast
635 parameters: channelTS, simple modes, opt. mode parameters..., nicklist
637 Broadcasts a channel creation or bursts a channel.
639 The nicklist consists of users joining the channel, with status prefixes for
640 their status ('@+', '@', '+' or ''), for example:
641 '@+1JJAAAAAB +2JJAAAA4C 1JJAAAADS'. All users must be behind the source server
642 so it is not possible to use this message to force users to join a channel.
644 The interpretation depends on the channelTS and the current TS of the channel.
645 If either is 0, set the channel's TS to 0 and accept all modes. Otherwise, if
646 the incoming channelTS is greater (newer), ignore the incoming simple modes
647 and statuses and join and propagate just the users. If the incoming channelTS
648 is lower (older), wipe all modes and change the TS, notifying local users of
649 this but not servers (invites may be cleared). In the latter case, kick on
650 split riding may happen: if the key (+k) differs or the incoming simple modes
651 include +i, kick all local users, sending KICK messages to servers.
653 An SJOIN is propagated with the new TS and modes of the channel. The statuses
654 are propagated if and only if they were accepted.
656 SJOIN must be used to propagate channel creation and in netbursts. For regular
657 users joining channels, JOIN must be used. Pseudoservers may use SJOIN to join
664 parameters: snomask letter, text
666 Sends the text as a server notice from the source server to opers with the
670 parameters: target server, comment
672 Removes the target server and all servers and users behind it from the network.
674 If the target server is the receiving server or the local link this came from,
675 this is an announcement that the link is being closed.
677 Otherwise, if the target server is locally connected, the server should send
678 a WALLOPS announcing the SQUIT.
682 parameters: stats letter, hunted
684 Remote STATS request. Privileges are checked on the server executing the
690 source: services server
691 parameters: target user, new login name (optional)
693 If the new login name is not present or empty, mark the target user as not
694 logged in, otherwise mark the target user as logged in as the given account.
699 parameters: current TS version, minimum TS version, '0', current time
701 Verifies TS protocol compatibility and clock. If anything is not in order,
704 The current TS version is the highest version supported by the source server
705 and the minimum TS version is the lowest version supported.
707 The current time is sent as a TS in the usual way.
712 encap target: single server
713 source: services server
714 parameters: target, new nick, new username, new visible hostname, new login name
716 Sent after successful SASL authentication.
718 The target is a UID, typically an unregistered one.
720 Any of the "new" parameters can be '*' to leave the corresponding field
721 unchanged. The new login name can be '0' to log the user out.
723 If the UID is registered on the network, a SIGNON with the changes will be
724 broadcast, otherwise the changes will be stored, to be used when registration
729 propagation: broadcast
740 parameters: channelTS, channel, cmode changes, opt. cmode parameters...
742 Propagates a channel mode change.
744 If the channelTS is greater (newer) than the current TS of the channel, drop
747 On input, only the limit on parameters per line restricts how many cmode
748 parameters can be present. Apart from this, arbitrary modes shall be
749 processed. Redundant modes may be dropped. For example, +n-n may be applied and
750 propagated as +n-n, -n or (if the channel was already -n) nothing, but not as
753 The parameter for mode -k (removing a key) shall be ignored.
755 On output, at most ten cmode parameters should be sent; if there are more,
756 multiple TMODE messages should be sent.
760 propagation: broadcast
762 Propagates a channel topic change. The server may verify that the source has
770 Performs a trace to the target, sending 200 numerics from each server passing
771 the message on. The target server sends a description of the target followed
774 TRACE, STATS l and STATS L are the only commands using hunt_server that use the
775 hunted parameter for more than just determining which server the command
776 should be executed on.
779 parameters: target name, hunted
781 Executes a trace command on the target server. No 200 numerics are sent.
782 The target name is a name, not a UID, and should be on the target server.
786 propagation: broadcast
787 parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, gecos
788 propagation: broadcast
790 Introduces a client. The client is on the source server of this command.
800 Removes a D:line (IP ban checked directly after accepting connection).
802 The mask must be an IP address or CIDR mask.
808 parameters: user mask, host mask
810 Removes a K:line (ban on user@host).
815 parameters: target server mask, user mask, host mask
817 As form 1, deprecated.
830 parameters: target server mask, mask
832 As form 1, deprecated.
840 Removes an X:line (ban on realname).
845 parameters: target server mask, mask
847 As form 1, deprecated.
853 Remote USERS request.
859 Remote VERSION request.
865 propagation: broadcast
867 In efnet TS6, sends a message to operators (with umode +z set). This is a
868 deprecated equivalent to OPERWALL.
870 In charybdis TS6, sends a message to local users with umode +w set (or possibly
871 another indication that WALLOPS messages should be sent), including non-opers.
876 propagation: broadcast
878 Sends a message to local users with umode +w set (or possibly another
879 indication that WALLOPS messages should be sent).
881 In efnet TS6 this may include non-opers, in charybdis TS6 this may only be
886 parameters: hunted, target nick
888 Remote WHOIS request.
894 parameters: duration, mask, reason
896 Sets an X:line (ban on realname).
901 parameters: target server mask, duration, mask, reason
903 As form 1, deprecated.
905 Local only commands (charybdis 3.1):