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, BAN
59 messages for all propagated bans, UID or EUID messages for all known users
60 (possibly followed by ENCAP REALHOST, ENCAP LOGIN and/or AWAY) and SJOIN
61 messages for all known channels (possibly followed by BMASK and/or TB).
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
83 +e (ban exception) (capab: EX)
84 +I (invite exception) (capab: IE)
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) (capab: SERVICES)
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)
113 parameters: target, any...
115 The command name should be three decimal ASCII digits.
117 Propagates a "numeric" command reply, such as from a remote WHOIS request.
119 If the first digit is 0 (indicating a reply about the local connection), it
120 should be changed to 1 before propagation or sending to a user.
122 Numerics to the local server may be sent to opers.
124 To avoid infinite loops, servers should not send any replies to numerics.
128 propagation: one-to-one
130 propagation: all servers with -D users on the channel
132 Numerics to channels are broken in some older servers.
138 Remote ADMIN request.
142 propagation: broadcast
143 parameters: opt. away reason
145 If the away reason is empty or not present, mark the user as not away.
146 Otherwise, mark the user as away.
148 Changing away reason from one non-empty string to another non-empty string
149 may not be propagated.
155 propagation: broadcast (restricted)
156 parameters: type, user mask, host mask, creation TS, duration, lifetime, oper, reason
158 Propagates a network wide ban.
160 The type is K for K:lines; other types are reserved.
162 The creation TS indicates when this ban was last modified. An incoming ban MUST
163 be ignored and not propagated if the creation TS is older than the creation TS
164 of the current ban. If the ban is identical, it SHOULD NOT be propagated to
165 avoid unnecessary network traffic. (Two changes to bans that set the TS to the
166 same value may cause desynchronization.)
168 The duration is 0 for an unban and relative to the creation TS for a ban.
169 When the duration has passed, the ban is no longer active but it may still
170 be necessary to remember it.
172 The lifetime is relative to the creation TS and indicates for how long this
173 ban needs to be remembered and propagated. This MUST be at least the duration.
174 Initially, it is usually set the same as the duration but when the ban is
175 modified later, it SHOULD be set such that the modified ban is remembered at
176 least as long as the original ban. This ensures that the original ban does not
177 revive via split servers. This requirement is only a SHOULD to allow for
178 implementations that only inject bans and do not remember any; implementations
179 that remember and propagate bans MUST set the lifetime appropriately.
181 The oper field indicates the oper that originally set the ban. If this message
182 is the initial propagation of a change, it SHOULD be sent as * (an asterisk).
184 The reason field indicates the reason for the ban. Any part after a | (vertical
185 bar) MUST NOT be shown to normal users. The rest of the field and the creation
186 TS and duration MAY be shown to normal users.
190 propagation: broadcast
191 parameters: channelTS, channel, type, space separated masks
193 If the channelTS in the message is greater (newer) than the current TS of
194 the channel, drop the message and do not propagate it.
196 Type is the mode letter of a ban-like mode. In efnet TS6 this is 'b', 'e' or
197 'I'. In charybdis TS6 additionally 'q' is possible.
199 Add all the masks to the given list of the channel.
201 All ban-like modes must be bursted using this command, not using MODE or TMODE.
204 source: unregistered server
206 parameters: space separated capability list
208 Sends capabilities of the server. This must include QS and ENCAP. It is also
209 strongly recommended to include EX, CHW, IE and KNOCK, and for charybdis TS6
210 also SAVE and EUID. For use with services, SERVICES and RSFNC are strongly
213 The capabilities may depend on the configuration for the server they are sent
219 propagation: broadcast
220 parameters: client, new hostname
222 Changes the visible hostname of a client.
224 Opers are notified unless the source is a server or a service.
228 parameters: server to connect to, port, hunted
230 Remote connect request. A server WALLOPS should be sent by the receiving
233 The port can be 0 for the default port.
239 parameters: duration, mask, reason
241 Sets a D:line (IP ban checked directly after accepting connection).
243 The mask must be an IP address or CIDR mask.
247 parameters: target server mask, subcommand, opt. parameters...
249 Sends a command to matching servers. Propagation is independent of
250 understanding the subcommand.
252 Subcommands are listed elsewhere with "encap only".
255 source: server or unregistered server
257 parameters: error message
259 Reports a (usually fatal) error with the connection.
261 Error messages may contain IP addresses and have a negative effect on server
266 encap target: single server
270 Remote ETRACE information request.
276 parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, real hostname, account name, gecos
277 propagation: broadcast
279 Introduces a client. The client is on the source server of this command.
281 The account name is '0' if the user is not logged in with services.
285 EUID is similar to UID but includes the ENCAP REALHOST and ENCAP LOGIN
292 parameters: space separated capability list
294 Capability list of remote server.
300 parameters: user mask, host mask, reason
301 propagation: broadcast
303 Propagates a G:line vote. Once votes from three different opers (based on
304 user@host mask) on three different servers have arrived, trigger the G:line.
305 Pending G:lines expire after some time, usually ten minutes. Triggered G:lines
306 expire after a configured time which may differ across servers.
308 Requests from server connections must be propagated, unless they are found to
309 be syntactically invalid (e.g. '!' in user mask). Therefore, disabling glines
310 must not affect propagation, and too wide glines, double votes and glines that
311 already exist locally must still be propagated.
313 Of course, servers are free to reject gline requests from their own operators.
320 parameters: user mask, host mask, reason
321 propagation: broadcast
323 Propagates a G:line removal vote. Once three votes have arrived (as with
324 G:lines), remove the G:line. Pending G:lines removals expire after some time,
327 Pending G:line removals do not interact with pending G:lines. Triggering a
328 G:line does not affect a pending G:line removal. Triggering a G:line removal
329 does not affect a pending G:line.
339 parameters: target user, channel, opt. channelTS
340 propagation: one-to-one
342 Invites a user to a channel.
344 If the channelTS is greater (newer) than the current TS of the channel, drop
347 Not sending the channelTS parameter is deprecated.
352 parameters: '0' (one ASCII zero)
353 propagation: broadcast
355 Parts the source user from all channels.
359 parameters: channelTS, channel, '+' (a plus sign)
360 propagation: broadcast
362 Joins the source user to the given channel. If the channel does not exist yet,
363 it is created with the given channelTS and no modes. If the channel already
364 exists and has a greater (newer) TS, wipe all simple modes and statuses and
365 change the TS, notifying local users of this but not servers (note that
366 ban-like modes remain intact; invites may or may not be cleared).
368 A JOIN is propagated with the new TS of the channel.
372 parameters: channel, target user, opt. reason
373 propagation: broadcast
375 Kicks the target user from the given channel.
377 Unless the channel's TS is 0, no check is done whether the source user has ops.
379 Not sending the reason parameter is questionable.
383 parameters: target user, path
384 propagation: broadcast
386 Removes the user from the network.
388 The format of the path parameter is some sort of description of the source of
389 the kill followed by a space and a parenthesized reason. To avoid overflow,
390 it is recommended not to add anything to the path.
396 parameters: duration, user mask, host mask, reason
398 Sets a K:line (ban on user@host).
403 parameters: target server mask, duration, user mask, host mask, reason
405 As form 1, deprecated.
411 propagation: broadcast
413 Requests an invite to a channel that is locked somehow (+ikl). Notifies all
414 operators of the channel. (In charybdis, on +g channels all members are
417 This is broadcast so that each server can store when KNOCK was used last on
422 parameters: hunted, server mask
424 Remote LINKS request. The server mask limits which servers are listed.
432 Sends a message to operators (with umode +l set). This is intended to be
433 used for strict subsets of the network.
438 parameters: target server mask, text
440 As form 1, deprecated.
445 parameters: account name
447 In a burst, states that the source user is logged in as the account.
451 parameters: server mask, hunted
453 Remote LUSERS request. Most servers ignore the server mask, treating it as '*'.
458 parameters: client, umode changes
459 propagation: broadcast
461 Propagates a user mode change. The client parameter must refer to the same user
464 Not all umodes are propagated to other servers.
468 parameters: channel, cmode changes, opt. cmode parameters...
470 Propagates a channel mode change.
472 This is deprecated because the channelTS is not included. If it is received,
473 it should be propagated as TMODE.
484 parameters: new nickname, new nickTS
485 propagation: broadcast
487 Propagates a nick change.
491 parameters: nickname, hopcount, nickTS, umodes, username, hostname, server, gecos
493 Historic TS5 user introduction. The user is on the server indicated by the
494 server parameter; the source server is meaningless (local link).
500 source: services server
501 parameters: duration, nickname
503 If duration is greater than 0, makes the given nickname unavailable for that
506 If duration is 0, removes a nick delay entry for the given nickname.
508 There may or may not be a client with the given nickname; this does not affect
513 parameters: msgtarget, message
515 As PRIVMSG, except NOTICE messages are sent out, server sources are permitted
516 and most error messages are suppressed.
518 Servers may not send '$$', '$#' and opers@server notices. Older servers may
519 not allow servers to send to specific statuses on a channel.
525 parameters: command name, parameters
527 Reports operspy usage.
532 propagation: broadcast
534 Sends a message to operators (with umode +z set).
538 parameters: comma separated channel list, message
540 Parts the source user from the given channels.
543 source: unregistered server
544 parameters: password, 'TS', TS version, SID
546 Sends the server link password, TS version and SID.
550 parameters: origin, opt. destination server
552 Sends a PING to the destination server, which will reply with a PONG. If the
553 destination server parameter is not present, the server receiving the message
556 The origin field is not used in the server protocol. It is sent as the name
557 (not UID/SID) of the source.
559 Remote PINGs are used for end-of-burst detection, therefore all servers must
564 parameters: origin, destination
566 Routes a PONG back to the destination that originally sent the PING.
570 parameters: msgtarget, message
572 Sends a normal message (PRIVMSG) to the given target.
576 propagation: one-to-one
578 propagation: all servers with -D users on the channel
579 (cmode +m/+n should be checked everywhere, bans should not be checked
581 - a status character ('@'/'+') followed by a channel name, to send to users
582 with that status or higher only.
584 propagation: all servers with -D users with appropriate status
585 - '=' followed by a channel name, to send to chanops only, for cmode +z.
586 capab: CHW and EOPMOD
587 propagation: all servers with -D chanops
588 - a user@server message, to send to users on a specific server. The exact
589 meaning of the part before the '@' is not prescribed, except that "opers"
590 allows IRC operators to send to all IRC operators on the server in an
592 propagation: one-to-one
593 - a message to all users on server names matching a mask ('$$' followed by mask)
594 propagation: broadcast
595 Only allowed to IRC operators.
596 - a message to all users with hostnames matching a mask ('$#' followed by mask).
597 Note that this is often implemented poorly.
598 propagation: broadcast
599 Only allowed to IRC operators.
601 In charybdis TS6, services may send to any channel and to statuses on any
607 encap target: single server
611 Remote PRIVS information request.
617 Propagates quitting of a client. No QUIT should be sent for a client that
618 has been removed as result of a KILL message.
625 parameters: real hostname
627 In a burst, propagates the real host of a dynamically-spoofed user.
633 parameters: opt. rehash type
635 Remote REHASH request. If the rehash type is omitted, it is equivalent to
636 a regular /rehash, otherwise it is equivalent to /rehash <rehash type>.
642 parameters: duration, mask, reason
644 Sets a RESV, making a nickname mask or exact channel unavailable.
649 parameters: target server mask, duration, mask, reason
651 As form 1, deprecated.
656 encap target: single server
657 source: services server
658 parameters: target user, new nickname, old nickTS, new nickTS
660 Forces a nickname change and propagates it.
662 The command is ignored if the nick TS of the user is not equal to the old
663 nickTS parameter. If the new nickname already exists (and is not the target
664 user), it is killed first.
672 parameters: source uid, '*', 'S', sasl mechanism name
674 Requests that a SASL agent (a service) initiate the authentication process.
675 The source uid is that of an unregistered client. This is why it is not sent
679 encap target: single server
681 parameters: source uid, target uid, mode, data
683 Part of a SASL authentication exchange. The mode is 'C' to send some data
684 (base64 encoded), or 'S' to end the exchange (data indicates type of
685 termination: 'A' for abort, 'F' for authentication failure, 'S' for
686 authentication success).
691 propagation: broadcast
692 parameters: target uid, TS
694 Resolve a nick collision by changing a nickname to the UID.
696 The server should verify that the UID belongs to a registered user, the user
697 does not already have their UID as their nick and the TS matches the user's
698 nickTS. If not, drop the message.
700 SAVE should be propagated as a regular NICK change to links without SAVE capab.
705 source: unregistered server
706 parameters: server name, hopcount, server description
708 Registers the connection as a server. PASS and CAPAB must have been sent
709 before, SVINFO should be sent afterwards.
711 If there is no such server configured or authentication failed, the connection
714 This is propagated as a SID message.
718 propagation: broadcast
719 parameters: server name, hopcount, server description
721 Introduces a new TS5 server, directly connected to the source of this command.
722 This is only used for jupes as TS5 servers may do little else than existing.
726 propagation: broadcast
727 parameters: server name, hopcount, sid, server description
729 Introduces a new server, directly connected to the source of this command.
733 propagation: broadcast
734 parameters: new nickname, new username, new visible hostname, new nickTS, new login name
736 Broadcasts a change of several user parameters at once.
738 Currently only sent after an SVSLOGIN.
742 propagation: broadcast
743 parameters: channelTS, simple modes, opt. mode parameters..., nicklist
745 Broadcasts a channel creation or bursts a channel.
747 The nicklist consists of users joining the channel, with status prefixes for
748 their status ('@+', '@', '+' or ''), for example:
749 '@+1JJAAAAAB +2JJAAAA4C 1JJAAAADS'. All users must be behind the source server
750 so it is not possible to use this message to force users to join a channel.
752 The interpretation depends on the channelTS and the current TS of the channel.
753 If either is 0, set the channel's TS to 0 and accept all modes. Otherwise, if
754 the incoming channelTS is greater (newer), ignore the incoming simple modes
755 and statuses and join and propagate just the users. If the incoming channelTS
756 is lower (older), wipe all modes and change the TS, notifying local users of
757 this but not servers (invites may be cleared). In the latter case, kick on
758 split riding may happen: if the key (+k) differs or the incoming simple modes
759 include +i, kick all local users, sending KICK messages to servers.
761 An SJOIN is propagated with the new TS and modes of the channel. The statuses
762 are propagated if and only if they were accepted.
764 SJOIN must be used to propagate channel creation and in netbursts. For regular
765 users joining channels, JOIN must be used. Pseudoservers may use SJOIN to join
772 parameters: snomask letter, text
774 Sends the text as a server notice from the source server to opers with the
778 parameters: target server, comment
780 Removes the target server and all servers and users behind it from the network.
782 If the target server is the receiving server or the local link this came from,
783 this is an announcement that the link is being closed.
785 Otherwise, if the target server is locally connected, the server should send
786 a WALLOPS announcing the SQUIT.
790 parameters: stats letter, hunted
792 Remote STATS request. Privileges are checked on the server executing the
798 source: services server
799 parameters: target user, new login name (optional)
801 If the new login name is not present or empty, mark the target user as not
802 logged in, otherwise mark the target user as logged in as the given account.
807 parameters: current TS version, minimum TS version, '0', current time
809 Verifies TS protocol compatibility and clock. If anything is not in order,
812 The current TS version is the highest version supported by the source server
813 and the minimum TS version is the lowest version supported.
815 The current time is sent as a TS in the usual way.
820 encap target: single server
821 source: services server
822 parameters: target, new nick, new username, new visible hostname, new login name
824 Sent after successful SASL authentication.
826 The target is a UID, typically an unregistered one.
828 Any of the "new" parameters can be '*' to leave the corresponding field
829 unchanged. The new login name can be '0' to log the user out.
831 If the UID is registered on the network, a SIGNON with the changes will be
832 broadcast, otherwise the changes will be stored, to be used when registration
838 propagation: broadcast
839 parameters: channel, topicTS, opt. topic setter, topic
841 Propagates a channel topic as part of a burst.
843 If the channel had no topic yet or the topicTS in the message is older than
844 the topicTS of the current topic on the channel and the topics differ, set
845 the topic with topicTS and topic setter, and propagate the message. Otherwise
846 ignore the message and do not propagate it.
848 If the topic setter is not present, use a server name instead.
858 parameters: channelTS, channel, cmode changes, opt. cmode parameters...
860 Propagates a channel mode change.
862 If the channelTS is greater (newer) than the current TS of the channel, drop
865 On input, only the limit on parameters per line restricts how many cmode
866 parameters can be present. Apart from this, arbitrary modes shall be
867 processed. Redundant modes may be dropped. For example, +n-n may be applied and
868 propagated as +n-n, -n or (if the channel was already -n) nothing, but not as
871 The parameter for mode -k (removing a key) shall be ignored.
873 On output, at most ten cmode parameters should be sent; if there are more,
874 multiple TMODE messages should be sent.
878 propagation: broadcast
879 parameters: channel, topic
881 Propagates a channel topic change. The server may verify that the source has
884 The topicTS shall be set to the current time and the topic setter shall be
885 set indicating the source user. Note that this means that the topicTS of a
886 topic set with TOPIC is not necessarily consistent across the network.
893 Performs a trace to the target, sending 200 numerics from each server passing
894 the message on. The target server sends a description of the target followed
897 TRACE, STATS l and STATS L are the only commands using hunt_server that use the
898 hunted parameter for more than just determining which server the command
899 should be executed on.
902 parameters: target name, hunted
904 Executes a trace command on the target server. No 200 numerics are sent.
905 The target name is a name, not a UID, and should be on the target server.
909 propagation: broadcast
910 parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, gecos
911 propagation: broadcast
913 Introduces a client. The client is on the source server of this command.
923 Removes a D:line (IP ban checked directly after accepting connection).
925 The mask must be an IP address or CIDR mask.
931 parameters: user mask, host mask
933 Removes a K:line (ban on user@host).
938 parameters: target server mask, user mask, host mask
940 As form 1, deprecated.
953 parameters: target server mask, mask
955 As form 1, deprecated.
963 Removes an X:line (ban on realname).
968 parameters: target server mask, mask
970 As form 1, deprecated.
976 Remote USERS request.
982 Remote VERSION request.
988 propagation: broadcast
990 In efnet TS6, sends a message to operators (with umode +z set). This is a
991 deprecated equivalent to OPERWALL.
993 In charybdis TS6, sends a message to local users with umode +w set (or possibly
994 another indication that WALLOPS messages should be sent), including non-opers.
999 propagation: broadcast
1001 Sends a message to local users with umode +w set (or possibly another
1002 indication that WALLOPS messages should be sent).
1004 In efnet TS6 this may include non-opers, in charybdis TS6 this may only be
1009 parameters: hunted, target nick
1011 Remote WHOIS request.
1017 parameters: duration, mask, reason
1019 Sets an X:line (ban on realname).
1024 parameters: target server mask, duration, mask, reason
1026 As form 1, deprecated.
1028 Local only commands (charybdis 3.1):