]> jfr.im git - solanum.git/blame - doc/technical/ts6-protocol.txt
Remove comments related to (removed) ability to disable TS6.
[solanum.git] / doc / technical / ts6-protocol.txt
CommitLineData
cdff8b70
JT
1TS6 protocol description
2Written by Jilles Tjoelker
3
4General format: much like rfc1459
5Maximum parameters for a command: 15 (this does not include the prefix
6and command name)
7
8SID: a server's unique ID. It is configured in each server and consists of
9a digit and two alphanumerics. Sending SIDs with lowercase letters is
10questionable.
11
12UID: a client's unique ID. It consists of the server's SID and six
13alphanumerics (so it is nine characters long). The first of the alphanumerics
14should be a letter, numbers are legal but reserved for future use.
15
16hunted: a parameter type used for various remote requests. From local users,
17nicknames and server names are accepted, possibly with wildcards; from servers,
18UIDs/SIDs (sending names or even wildcards is deprecated). This is done with
19the function hunt_server(). Any rate limiting should be done locally.
20
21duration: a parameter type used for ban durations. It is a duration in seconds.
22A value of 0 means a permanent ban.
23
24propagation: to which other servers the command is sent. For all commands
25with a hunted parameter, the propagation is determined by that, and not
26otherwise specified. Propagation broadcast means the command is sent to all
27servers. Propagation one-to-one means the command is only sent to the target
28or the server the target is on. Propagation none means the command is never
29sent to another server if it is received. For some other commands, the
30propagation depends on the parameters and is described in text.
31
32services server: server mentioned in a service{} block. There are no services
33servers on EFnet.
34
35service: client with umode +S. This implies that it is on a services server.
36
37user modes:
38(all)
39+D (deaf: does not receive channel messages)
40+S (network service) (only settable on burst from a services server)
41+a (appears as server administrator)
42+i (invisible, see rfc1459)
43+o (IRC operator, see rfc1459)
44+w (wallops, see rfc1459) (always propagated for historical reasons)
45(charybdis TS6)
46+Q/+R/+g/+l/+s/+z (only locally effective)
47+Z (ssl user) (only settable on burst)
48possibly more added by modules
49
50channel modes:
51(all)
52statuses
53+o (prefix @) (ops)
54+v (prefix +) (voice)
55type A
56+b (ban)
57+e (ban exception)
58+I (invite exception)
59type B
60+k (key: password required to join, <= 23 ascii chars, no : or , or whitespace)
61type C
62+l (limit: maximum number of members before further joins are disallowed)
63type D
64+m (moderated)
65+n (no external messages)
66+p (private: does not appear in /whois to non-members, no /knock allowed)
67+r (only registered users may join) (only if a services server exists)
68+s (secret)
69+t (only chanops may change topic)
70(charybdis TS6)
71type A
72+q (quiet)
73type C
74+f (forward: channel name <= 30 chars)
75+j (join throttle: N:T with integer N and T)
76type D
77+F (free target for +f)
78+L (large ban list)
79+P (permanent: does not disappear when empty)
80+Q (ignore forwards to this)
81+c (strip colours)
82+g (allow any member to /invite)
83+z (send messages blocked by +m to chanops)
84
85ADMIN
86source: user
87parameters: hunted
88
89Remote ADMIN request.
90
91AWAY
92source: user
93propagation: broadcast
94parameters: opt. away reason
95
96If the away reason is empty or not present, mark the user as not away.
97Otherwise, mark the user as away.
98
99Changing away reason from one non-empty string to another non-empty string
100may not be propagated.
101
102BMASK
103source: server
104propagation: broadcast
105parameters: channelTS, channel, type, space separated masks
106
107If the channelTS in the message is greater (newer) than the current TS of
108the channel, drop the message and do not propagate it.
109
110Type is the mode letter of a ban-like mode. In efnet TS6 this is 'b', 'e' or
111'I'. In charybdis TS6 additionally 'q' is possible.
112
113Add all the masks to the given list of the channel.
114
115All ban-like modes must be bursted using this command, not using MODE or TMODE.
116
117CAPAB
118source: unregistered server
119propagation: none
120parameters: space separated capability list
121
122Sends capabilities of the server. This must include QS and ENCAP.
123
124CHGHOST
125charybdis TS6
126source: any
127propagation: broadcast
128parameters: client, new hostname
129
130Changes the visible hostname of a client.
131
132Opers are notified unless the source is a server or a service.
133
134CONNECT
135source: any
136parameters: server to connect to, port, hunted
137
138Remote connect request. A server WALLOPS should be sent by the receiving
139server.
140
141The port can be 0 for the default port.
142
143DLINE
144charybdis TS6
145encap only
146source: user
147parameters: duration, mask, reason
148
149Sets a D:line (IP ban checked directly after accepting connection).
150
151The mask must be an IP address or CIDR mask.
152
153ENCAP
154source: any
155parameters: target server mask, subcommand, opt. parameters...
156
157Sends a command to all servers with names matching the given mask (for example
158'*', '*.example.com', 'irc.example.com'). Those servers do not have to be
159directly connected. Targets cannot be SIDs.
160
161Propagation is independent of understanding the subcommand.
162
163ERROR
164source: server or unregistered server
165propagation: none
166parameters: error message
167
168Reports a (usually fatal) error with the connection.
169
170Error messages may contain IP addresses and have a negative effect on server
171IP hiding.
172
173ETRACE
174encap only
175encap target: single server
176source: oper
177parameters: client
178
179Remote ETRACE information request.
180
181EUID
182charybdis TS6
183capab: EUID
184source: server
185parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, real hostname, account name, gecos
186propagation: broadcast
187
188Introduces a client. The client is on the source server of this command.
189
190The account name is '0' if the user is not logged in with services.
191
192Nick TS rules apply.
193
194EUID is similar to UID but includes the ENCAP REALHOST and ENCAP LOGIN
195information.
196
197GCAP
198encap only
199encap target: *
200source: server
201parameters: space separated capability list
202
203Capability list of remote server.
204
205INFO
206source: user
207parameters: hunted
208
209Remote INFO request.
210
211INVITE
212source: user
213parameters: target user, channel, opt. channelTS
214propagation: one-to-one
215
216Invites a user to a channel.
217
218If the channelTS is greater (newer) than the current TS of the channel, drop
219the message.
220
221Not sending the channelTS parameter is deprecated.
222
223JOIN
2241.
225source: user
226parameters: '0' (one ASCII zero)
227propagation: broadcast
228
229Parts the source user from all channels.
230
2312.
232source: user
233parameters: channelTS, channel, '+' (a plus sign)
234propagation: broadcast
235
236Joins the source user to the given channel. If the channel does not exist yet,
237it is created with the given channelTS and no modes. If the channel already
238exists and has a greater (newer) TS, wipe all simple modes and statuses and
239change the TS, notifying local users of this but not servers (note that
240ban-like modes remain intact; invites may or may not be cleared).
241
242KICK
243source: any
244parameters: channel, target user, opt. reason
245propagation: broadcast
246
247Kicks the target user from the given channel.
248
249Unless the channel's TS is 0, no check is done whether the source user has ops.
250
251Not sending the reason parameter is questionable.
252
253KILL
254source: any
255parameters: target user, path
256propagation: broadcast
257
258Removes the user from the network.
259
260The format of the path parameter is some sort of description of the source of
261the kill followed by a space and a parenthesized reason. To avoid overflow,
262it is recommended not to add anything to the path.
263
264KLINE
2651.
266encap only
267source: user
268parameters: duration, user mask, host mask, reason
269
270Sets a K:line (ban on user@host).
271
2722.
273capab: KLN
274source: user
275parameters: target server mask, duration, user mask, host mask, reason
276
277As form 1, deprecated.
278
279KNOCK
280source: user
281parameters: channel
282propagation: broadcast
283
284Requests an invite to a channel that is locked somehow (+ikl). Notifies all
285operators of the channel. (In charybdis, on +g channels all members are
286notified.)
287
288This is broadcast so that each server can store when KNOCK was used last on
289a channel.
290
291LINKS
292source: user
293parameters: hunted, server mask
294
295Remote LINKS request. The server mask limits which servers are listed.
296
297LOGIN
298encap only
299source: user
300parameters: account name
301
302In a burst, states that the source user is logged in as the account.
303
304LUSERS
305source: user
306parameters: server mask, hunted
307
308Remote LUSERS request. Most servers ignore the server mask, treating it as '*'.
309
310MODE
3111.
312source: user
313parameters: client, umode changes
314propagation: broadcast
315
316Propagates a user mode change. The client parameter must refer to the same user
317as the source.
318
319Not all umodes are propagated to other servers.
320
3212.
322source: any
323parameters: channel, cmode changes, opt. cmode parameters...
324
325Propagates a channel mode change.
326
327This is deprecated because the channelTS is not included. If it is received,
328it should be propagated as TMODE.
329
330MOTD
331source: user
332parameters: hunted
333
334Remote MOTD request.
335
336NICK
3371.
338source: user
339parameters: new nickname, new nickTS
340propagation: broadcast
341
342Propagates a nick change.
343
3442.
345source: server
346parameters: nickname, hopcount, nickTS, umodes, username, hostname, server, gecos
347
348Historic TS5 user introduction. The user is on the server indicated by the
349server parameter; the source server is meaningless (local link).
350
351NICKDELAY
352charybdis TS6
353encap only
354encap target: *
355source: services server
356parameters: duration, nickname
357
358If duration is greater than 0, makes the given nickname unavailable for that
359time.
360
361If duration is 0, removes a nick delay entry for the given nickname.
362
363There may or may not be a client with the given nickname; this does not affect
364the operation.
365
366NOTICE
367source: any
368parameters: msgtarget, message
369
370As PRIVMSG, except NOTICE messages are sent out, server sources are permitted
371and most error messages are suppressed.
372
373OPERSPY
374encap only
375encap target: *
376source: user
377parameters: command name, parameters
378
379Reports operspy usage.
380
381OPERWALL
382source: user
383parameters: message
384propagation: broadcast
385
386Sends a message to operators (with umode +z set).
387
388PART
389source: user
390parameters: comma separated channel list, message
391
392Parts the source user from the given channels.
393
394PASS
395source: unregistered server
396parameters: password, 'TS', TS version, SID
397
398Sends the server link password, TS version and SID.
399
400PING
401source: any
402parameters: origin, destination server
403
404Sends a PING to the destination server, which will reply with a PONG.
405
406The origin field is not used in the server protocol.
407
408Remote PINGs are used for end-of-burst detection, therefore all servers must
409implement them.
410
411PONG
412source: server
413parameters: origin, destination
414
415Routes a PONG back to the destination that originally sent the PING.
416
417PRIVMSG
418source: user
419parameters: msgtarget, message
420
421Sends a normal message (PRIVMSG) to the given target.
422
423The target can be:
424- a client
425 propagation: one-to-one
426- a channel name
427 propagation: all servers with -D users on the channel
428 (cmode +m/+n should be checked everywhere, bans should not be checked
429 remotely)
430- a status character ('@'/'+') followed by a channel name, to send to users
431 with that status or higher only.
432 propagation: all servers with -D users with appropriate status
433- a user@server message, to send to users on a specific server. The exact
434 meaning of the part before the '@' is not prescribed, except that "opers"
435 allows IRC operators to send to all IRC operators on the server in an
436 unspecified format.
437 propagation: one-to-one
438- a message to all users on server names matching a mask ('$$' followed by mask)
439 propagation: broadcast
440- a message to all users with hostnames matching a mask ('$#' followed by mask).
441 Note that this is often implemented poorly.
442 propagation: broadcast
443
444PRIVS
445charybdis TS6
446encap only
447encap target: single server
448source: oper
449parameters: client
450
451Remote PRIVS information request.
452
453QUIT
454source: user
455parameters: comment
456
457Propagates quitting of a client. No QUIT should be sent for a client that
458has been removed as result of a KILL message.
459
460REALHOST
461charybdis TS6
462encap only
463encap target: *
464source: user
465parameters: real hostname
466
467In a burst, propagates the real host of a dynamically-spoofed user.
468
469REHASH
470charybdis TS6
471encap only
472source: user
473parameters: opt. rehash type
474
475Remote REHASH request. If the rehash type is omitted, it is equivalent to
476a regular /rehash, otherwise it is equivalent to /rehash <rehash type>.
477
478RESV
4791.
480encap only
481source: user
482parameters: duration, mask, reason
483
484Sets a RESV, making a nickname mask or exact channel unavailable.
485
4862.
487capab: CLUSTER
488source: user
489parameters: target server mask, duration, mask, reason
490
491As form 1, deprecated.
492
493RSFNC
494encap only
495capab: RSFNC
496encap target: single server
497source: services server
498parameters: target user, new nickname, old nickTS, new nickTS
499
500Forces a nickname change and propagates it.
501
502The command is ignored if the nick TS of the user is not equal to the old
503nickTS parameter. If the new nickname already exists (and is not the target
504user), it is killed first.
505
506SASL
507charybdis TS6
508encap only
5091.
510encap target: *
511source: server
512parameters: source uid, '*', 'S', sasl mechanism name
513
514Requests that a SASL agent (a service) initiate the authentication process.
515The source uid is that of an unregistered client. This is why it is not sent
516as the prefix.
517
5182.
519encap target: single server
520source: server
521parameters: source uid, target uid, mode, data
522
523Part of a SASL authentication exchange. The mode is 'C' to send some data
524(base64 encoded), or 'S' to end the exchange (data indicates type of
525termination: 'A' for abort, 'F' for authentication failure, 'S' for
526authentication success).
527
528SAVE
529capab: SAVE
530source: server
531propagation: broadcast
532parameters: target uid, TS
533
534Resolve a nick collision by changing a nickname to the UID.
535
536The server should verify that the UID belongs to a registered user, the user
537does not already have their UID as their nick and the TS matches the user's
538nickTS. If not, drop the message.
539
540SAVE should be propagated as a regular NICK change to links without SAVE capab.
541present.
542
543SERVER
5441.
545source: unregistered server
546parameters: server name, hopcount, server description
547
548Registers the connection as a server. PASS and CAPAB must have been sent
549before, SVINFO should be sent afterwards.
550
551If there is no such server configured or authentication failed, the connection
552should be dropped.
553
554This is propagated as a SID message.
555
5562.
557source: server
558propagation: broadcast
559parameters: server name, hopcount, server description
560
561Introduces a new TS5 server, directly connected to the source of this command.
562This is only used for jupes as TS5 servers may do little else than existing.
563
564SID
565source: server
566propagation: broadcast
567parameters: server name, hopcount, sid, server description
568
569Introduces a new server, directly connected to the source of this command.
570
571SIGNON
572source: user
573propagation: broadcast
574parameters: new nickname, new username, new visible hostname, new nickTS, new login name
575
576Broadcasts a change of several user parameters at once.
577
578Currently only sent after an SVSLOGIN.
579
580SJOIN
581source: server
582propagation: broadcast
583parameters: channelTS, simple modes, opt. mode parameters..., nicklist
584
585Broadcasts a channel creation or bursts a channel.
586
587The nicklist consists of users joining the channel, with status prefixes for
588their status ('@+', '@', '+' or ''), for example:
589'@+1JJAAAAAB +2JJAAAA4C 1JJAAAADS'. All users must be behind the source server
590so it is not possible to use this message to force users to join a channel.
591
592The interpretation depends on the channelTS and the current TS of the channel.
593If either is 0, set the channel's TS to 0 and accept all modes. Otherwise, if
594the incoming channelTS is greater (newer), ignore the incoming simple modes
595and statuses and join and propagate just the users. If the incoming channelTS
596is lower (older), wipe all modes and change the TS, notifying local users of
597this but not servers (invites may be cleared). In the latter case, kick on
598split riding may happen: if the key (+k) differs or the incoming simple modes
599include +i, kick all local users, sending KICK messages to servers.
600
601SJOIN must be used to propagate channel creation and in netbursts. For regular
602users joining channels, JOIN must be used. Pseudoservers may use SJOIN to join
603a user with ops.
604
605SNOTE
606charybdis TS6
607encap only
608source: server
609parameters: snomask letter, text
610
611Sends the text as a server notice from the source server to opers with the
612given snomask set.
613
614SQUIT
615parameters: target server, comment
616
617Removes the target server and all servers and users behind it from the network.
618
619If the target server is the receiving server or the local link this came from,
620this is an announcement that the link is being closed.
621
622Otherwise, if the target server is locally connected, the server should send
623a WALLOPS announcing the SQUIT.
624
625STATS
626source: user
627parameters: stats letter, hunted
628
629Remote STATS request. Privileges are checked on the server executing the
630actual request.
631
632SU
633encap only
634encap target: *
635source: services server
636parameters: target user, new login name (optional)
637
638If the new login name is not present or empty, mark the target user as not
639logged in, otherwise mark the target user as logged in as the given account.
640
641SVINFO
642source: server
643propagation: none
644parameters: current TS version, minimum TS version, '0', current time
645
646Verifies TS protocol compatibility and clock. If anything is not in order,
647the link is dropped.
648
649The current TS version is the highest version supported by the source server
650and the minimum TS version is the lowest version supported.
651
652The current time is sent as a TS in the usual way.
653
654SVSLOGIN
655charybdis TS6
656encap only
657encap target: single server
658source: services server
659parameters: target, new nick, new username, new visible hostname, new login name
660
661Sent after successful SASL authentication.
662
663The target is a UID, typically an unregistered one.
664
665Any of the "new" parameters can be '*' to leave the corresponding field
666unchanged. The new login name can be '0' to log the user out.
667
668If the UID is registered on the network, a SIGNON with the changes will be
669broadcast, otherwise the changes will be stored, to be used when registration
670completes.
671
672TB
673source: server
674propagation: broadcast
675parameters:
676
677TIME
678source: user
679parameters: hunted
680
681Remote TIME request.
682
683TMODE
684source: any
685parameters: channelTS, channel, cmode changes, opt. cmode parameters...
686
687Propagates a channel mode change.
688
689If the channelTS is greater (newer) than the current TS of the channel, drop
690the message.
691
692On input, only the limit on parameters per line restricts how many cmode
693parameters can be present. Apart from this, arbitrary modes shall be
694processed. Redundant modes may be dropped. For example, +n-n may be applied and
695propagated as +n-n, -n or (if the channel was already -n) nothing, but not as
696+n.
697
698The parameter for mode -k (removing a key) shall be ignored.
699
700On output, at most ten cmode parameters should be sent; if there are more,
701multiple TMODE messages should be sent.
702
703TOPIC
704source: user
705propagation: broadcast
706
707Propagates a channel topic change. The server may verify that the source has
708ops in the channel.
709
710TRACE
711source: user
7121.
713parameters: hunted
714
715Performs a trace to the target, sending 200 numerics from each server passing
716the message on. The target server sends a description of the target followed
717by a 262 numeric.
718
719TRACE, STATS l and STATS L are the only commands using hunt_server that use the
720hunted parameter for more than just determining which server the command
721should be executed on.
722
7232.
724parameters: target name, hunted
725
726Executes a trace command on the target server. No 200 numerics are sent.
727The target name is a name, not a UID, and should be on the target server.
728
729UID
730source: server
731propagation: broadcast
732parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, gecos
733propagation: broadcast
734
735Introduces a client. The client is on the source server of this command.
736
737Nick TS rules apply.
738
739UNDLINE
740charybdis TS6
741encap only
742source: user
743parameters: mask
744
745Removes a D:line (IP ban checked directly after accepting connection).
746
747The mask must be an IP address or CIDR mask.
748
749UNKLINE
7501.
751encap only
752source: user
753parameters: user mask, host mask
754
755Removes a K:line (ban on user@host).
756
7572.
758capab: UNKLN
759source: user
760parameters: target server mask, user mask, host mask
761
762As form 1, deprecated.
763
764UNRESV
7651.
766encap only
767source: user
768parameters: mask
769
770Removes a RESV.
771
7722.
773capab: CLUSTER
774source: user
775parameters: target server mask, mask
776
777As form 1, deprecated.
778
779UNXLINE
7801.
781encap only
782source: user
783parameters: mask
784
785Removes an X:line (ban on realname).
786
7872.
788capab: CLUSTER
789source: user
790parameters: target server mask, mask
791
792As form 1, deprecated.
793
794USERS
795source: user
796parameters: hunted
797
798Remote USERS request.
799
800VERSION
801source: any
802parameters: hunted
803
804Remote VERSION request.
805
806WALLOPS
8071.
808source: user
809parameters: message
810propagation: broadcast
811
812In efnet TS6, sends a message to operators (with umode +z set). This is a
813deprecated equivalent to OPERWALL.
814
815In charybdis TS6, sends a message to local users with umode +w set (or possibly
816another indication that WALLOPS messages should be sent), including non-opers.
817
8182.
819source: server
820parameters: message
821propagation: broadcast
822
823Sends a message to local users with umode +w set (or possibly another
824indication that WALLOPS messages should be sent).
825
826In efnet TS6 this may include non-opers, in charybdis TS6 this may only be
827sent to opers.
828
829WHOIS
830source: user
831parameters: hunted, target nick
832
833Remote WHOIS request.
834
835XLINE
8361.
837encap only
838source: user
839parameters: duration, mask, reason
840
841Sets an X:line (ban on realname).
842
8432.
844capab: CLUSTER
845source: user
846parameters: target server mask, duration, mask, reason
847
848As form 1, deprecated.
849
850Local only commands (charybdis 3.1):
851
852ACCEPT
853AUTHENTICATE
854CAP
855CHALLENGE
856CHANTRACE
857CLOSE
858CNOTICE
859CPRIVMSG
860DIE
861GET
862HELP
863ISON
864LIST
865LOCOPS
866MAP
867MASKTRACE
868MODLIST
869MODLOAD
870MODRELOAD
871MODRESTART
872MODUNLOAD
873MONITOR
874NAMES
875OPER
876POST
877PUT
878RESTART
879SCAN
880SET
881TESTGECOS
882TESTLINE
883TESTMASK
884UHELP
885UNREJECT
886USER
887USERHOST
888WEBIRC
889WHO
890WHOWAS