]> jfr.im git - solanum.git/blame - doc/technical/ts6-protocol.txt
Merge branch 'authd-framework-2' into authd-framework
[solanum.git] / doc / technical / ts6-protocol.txt
CommitLineData
cdff8b70
JT
1TS6 protocol description
2Written by Jilles Tjoelker
a5c46d31 3Edits by Elizabeth Myers to add TS rules described by Lee Harvey.
cdff8b70
JT
4
5General format: much like rfc1459
6Maximum parameters for a command: 15 (this does not include the prefix
7and command name)
8
9SID: a server's unique ID. It is configured in each server and consists of
10a digit and two alphanumerics. Sending SIDs with lowercase letters is
11questionable.
12
13UID: a client's unique ID. It consists of the server's SID and six
14alphanumerics (so it is nine characters long). The first of the alphanumerics
15should be a letter, numbers are legal but reserved for future use.
16
17hunted: a parameter type used for various remote requests. From local users,
18nicknames and server names are accepted, possibly with wildcards; from servers,
19UIDs/SIDs (sending names or even wildcards is deprecated). This is done with
20the function hunt_server(). Any rate limiting should be done locally.
21
a5c46d31 22
cdff8b70
JT
23duration: a parameter type used for ban durations. It is a duration in seconds.
24A value of 0 means a permanent ban.
25
755c144e
JT
26IP addresses: IP addresses are converted to text in the usual way, including
27'::' shortening in IPv6, with the exception that a zero is prepended to any
28IP address that starts with a colon.
29
03204327
JT
30propagation: to which other servers the command is sent
31
32For all commands with a hunted parameter, the propagation is determined by
33that, and not otherwise specified.
34
35For all commands with a target server mask parameter, the propagation is
36determined by that, and not otherwise specified. The command is sent to all
37servers with names matching the given mask (for example '*', '*.example.com',
38'irc.example.com'). Those servers do not have to be directly connected.
39Targets cannot be SIDs.
40
41Propagation broadcast means the command is sent to all servers.
42
43Propagation one-to-one means the command is only sent to the target or the
44server the target is on.
45
46Propagation none means the command is never sent to another server if it is
47received.
48
49For some other commands, the propagation depends on the parameters and is
50described in text.
cdff8b70
JT
51
52services server: server mentioned in a service{} block. There are no services
53servers on EFnet.
54
55service: client with umode +S. This implies that it is on a services server.
56
aa12f64b
JT
57connection setup:
58The initiator sends the PASS, CAPAB and SERVER messages. Upon receiving the
59SERVER, the listener will check the information, and if it is valid, it will
60send its own PASS, CAPAB and SERVER messages, followed by SVINFO and the burst.
61Upon receiving the SERVER, the initiator will send SVINFO and the burst. If
62ziplinks are used, SVINFO is the first compressed message.
63
13d42555
JT
64The burst consists of SID and SERVER messages for all known servers, BAN
65messages for all propagated bans, UID or EUID messages for all known users
66(possibly followed by ENCAP REALHOST, ENCAP LOGIN and/or AWAY) and SJOIN
67messages for all known channels (possibly followed by BMASK and/or TB).
aa12f64b 68
cdff8b70
JT
69user modes:
70(all)
71+D (deaf: does not receive channel messages)
72+S (network service) (only settable on burst from a services server)
73+a (appears as server administrator)
74+i (invisible, see rfc1459)
75+o (IRC operator, see rfc1459)
76+w (wallops, see rfc1459) (always propagated for historical reasons)
77(charybdis TS6)
78+Q/+R/+g/+l/+s/+z (only locally effective)
79+Z (ssl user) (only settable on burst)
80possibly more added by modules
81
82channel modes:
83(all)
84statuses
85+o (prefix @) (ops)
86+v (prefix +) (voice)
87type A
88+b (ban)
4b58bbb2
JT
89+e (ban exception) (capab: EX)
90+I (invite exception) (capab: IE)
cdff8b70
JT
91type B
92+k (key: password required to join, <= 23 ascii chars, no : or , or whitespace)
93type C
94+l (limit: maximum number of members before further joins are disallowed)
95type D
96+m (moderated)
97+n (no external messages)
98+p (private: does not appear in /whois to non-members, no /knock allowed)
4b58bbb2 99+r (only registered users may join) (only if a services server exists) (capab: SERVICES)
cdff8b70
JT
100+s (secret)
101+t (only chanops may change topic)
102(charybdis TS6)
103type A
104+q (quiet)
105type C
106+f (forward: channel name <= 30 chars)
107+j (join throttle: N:T with integer N and T)
108type D
109+F (free target for +f)
110+L (large ban list)
111+P (permanent: does not disappear when empty)
112+Q (ignore forwards to this)
113+c (strip colours)
114+g (allow any member to /invite)
115+z (send messages blocked by +m to chanops)
116
a5c46d31
EM
117Nick TS rules:
118A server receiving a command that requires nick TS rules must check for a
119collision between an existing user, and the nick in the received message.
120(the "new user"). The collisions must obey the rules specified in Nick TS
121collisions.
122
123If the TS received is lower than the TS of the existing user the server will
124collide the existing user if the clients user@host are different, if the
125clients user@hosts are identical it will collide the new user.
126
127If the TS received is equal to the TS of the existing user both clients are
128collided.
129
130If the TS received is higher than the TS of the existing user, the server
131will collide the existing user if the user@hosts are identical, if the
132clients user@host are different it will collide the new user and drop the
133message.
134
135Nick TS collisions:
136If both users are to be collided, we must issue a KILL for the existing
137user to all servers. If the new user has a UID then we must also issue a
138KILL for that UID back to the server sending us data causing the collision.
139
140If only the existing user is being collided, we must issue a KILL for the
141existing user to all servers except the server sending us data. If the
142existing user has a UID and the server sending us data supports TS6 then
143we must also issue a KILL for the existing users UID to the server sending
144us data.
145
146If only the new user is being collided, we must issue a KILL for the new user
147back to the server sending us data if the new user has a UID.
148
149Channel TS rules:
150A server receiving a command that requires normal channel TS rules must
151apply the following rules to the command.
152
153If the TS received is lower than our TS of the channel a TS6 server must
154remove status modes (+ov etc) and channel modes (+nt etc). If the
155originating server is TS6 capable (ie, it has a SID), the server must
156also remove any ban modes (+b etc). The new modes and statuses are then
157accepted.
158
159If any bans are removed, the server must send to non-TS6, directly connected
160servers mode changes removing the bans after the command is propagated.
161This prevents desync with banlists, and has to be sent after as clients are
162still able to send mode changes before the triggering command arrives.
163
164If the TS received is equal to our TS of the channel the server should keep
165its current modes and accept the received modes and statuses.
166
167If the TS received is higher than our TS of the channel the server should keep
168its current modes and ignore the received modes and statuses. Any statuses
169given in the received message will be removed. A server must mark clients
170losing their op (+o) status who do not have a UID as 'deopped'. A server must
171ignore any "MODE" commands from a user marked as 'deopped'.
172
173Simple channel TS rules:
174
175A server receiving a command that requires simple channel TS rules must
176apply the following rules to the command.
177
178If the TS received is lower, or equal to our TS of the channel the modes are
179accepted. If the TS received is higher than our TS of the channel the modes
180are ignored and dropped.
181
182Simple channel TS rules do not affect current modes in the channel except
183for the modes we are accepting.
184
185
f8933d67
JT
186<numeric>
187source: server
188parameters: target, any...
189
190The command name should be three decimal ASCII digits.
191
192Propagates a "numeric" command reply, such as from a remote WHOIS request.
193
194If the first digit is 0 (indicating a reply about the local connection), it
195should be changed to 1 before propagation or sending to a user.
196
197Numerics to the local server may be sent to opers.
198
199To avoid infinite loops, servers should not send any replies to numerics.
200
201The target can be:
202- a client
203 propagation: one-to-one
204- a channel name
205 propagation: all servers with -D users on the channel
206
207Numerics to channels are broken in some older servers.
208
cdff8b70
JT
209ADMIN
210source: user
211parameters: hunted
212
213Remote ADMIN request.
214
215AWAY
216source: user
217propagation: broadcast
218parameters: opt. away reason
219
220If the away reason is empty or not present, mark the user as not away.
221Otherwise, mark the user as away.
222
223Changing away reason from one non-empty string to another non-empty string
224may not be propagated.
225
13d42555
JT
226BAN
227charybdis TS6
228capab: BAN
229source: any
230propagation: broadcast (restricted)
231parameters: type, user mask, host mask, creation TS, duration, lifetime, oper, reason
232
233Propagates a network wide ban.
234
a0ce140e
JT
235The type is K for K:lines, R for resvs and X for X:lines; other types are
236reserved. The user mask field is only used for K:lines; for resvs and X:lines
237the field is ignored in input and sent as an asterisk.
13d42555
JT
238
239The creation TS indicates when this ban was last modified. An incoming ban MUST
240be ignored and not propagated if the creation TS is older than the creation TS
241of the current ban. If the ban is identical, it SHOULD NOT be propagated to
242avoid unnecessary network traffic. (Two changes to bans that set the TS to the
243same value may cause desynchronization.)
244
245The duration is 0 for an unban and relative to the creation TS for a ban.
246When the duration has passed, the ban is no longer active but it may still
247be necessary to remember it.
248
249The lifetime is relative to the creation TS and indicates for how long this
250ban needs to be remembered and propagated. This MUST be at least the duration.
251Initially, it is usually set the same as the duration but when the ban is
252modified later, it SHOULD be set such that the modified ban is remembered at
253least as long as the original ban. This ensures that the original ban does not
254revive via split servers. This requirement is only a SHOULD to allow for
255implementations that only inject bans and do not remember any; implementations
256that remember and propagate bans MUST set the lifetime appropriately.
257
258The oper field indicates the oper that originally set the ban. If this message
259is the initial propagation of a change, it SHOULD be sent as * (an asterisk).
260
261The reason field indicates the reason for the ban. Any part after a | (vertical
262bar) MUST NOT be shown to normal users. The rest of the field and the creation
263TS and duration MAY be shown to normal users.
264
cdff8b70
JT
265BMASK
266source: server
267propagation: broadcast
268parameters: channelTS, channel, type, space separated masks
269
270If the channelTS in the message is greater (newer) than the current TS of
271the channel, drop the message and do not propagate it.
272
273Type is the mode letter of a ban-like mode. In efnet TS6 this is 'b', 'e' or
274'I'. In charybdis TS6 additionally 'q' is possible.
275
276Add all the masks to the given list of the channel.
277
278All ban-like modes must be bursted using this command, not using MODE or TMODE.
279
280CAPAB
281source: unregistered server
282propagation: none
283parameters: space separated capability list
284
d0c2fc82
JT
285Sends capabilities of the server. This must include QS and ENCAP, and for
286charybdis TS6 also EX and IE. It is also strongly recommended to include EX,
287CHW, IE and KNOCK, and for charybdis TS6 also SAVE and EUID. For use with
288services, SERVICES and RSFNC are strongly recommended.
aa12f64b
JT
289
290The capabilities may depend on the configuration for the server they are sent
291to.
cdff8b70
JT
292
293CHGHOST
294charybdis TS6
295source: any
296propagation: broadcast
297parameters: client, new hostname
298
299Changes the visible hostname of a client.
300
301Opers are notified unless the source is a server or a service.
302
303CONNECT
304source: any
305parameters: server to connect to, port, hunted
306
307Remote connect request. A server WALLOPS should be sent by the receiving
308server.
309
310The port can be 0 for the default port.
311
312DLINE
313charybdis TS6
314encap only
315source: user
316parameters: duration, mask, reason
317
318Sets a D:line (IP ban checked directly after accepting connection).
319
320The mask must be an IP address or CIDR mask.
321
322ENCAP
323source: any
324parameters: target server mask, subcommand, opt. parameters...
325
03204327
JT
326Sends a command to matching servers. Propagation is independent of
327understanding the subcommand.
cdff8b70 328
03204327 329Subcommands are listed elsewhere with "encap only".
cdff8b70
JT
330
331ERROR
332source: server or unregistered server
333propagation: none
334parameters: error message
335
336Reports a (usually fatal) error with the connection.
337
338Error messages may contain IP addresses and have a negative effect on server
339IP hiding.
340
a5de4ede
JT
341ETB
342capab: EOPMOD
343source: any
344propagation: broadcast
345parameters: channelTS, channel, topicTS, topic setter, opt. extensions, topic
346
347Propagates a channel topic change or propagates a channel topic as part of a
348burst.
349
350If the channel had no topic yet, the channelTS in the message is lower (older)
351than the current TS of the channel, or the channelTSes are equal and the
352topicTS in the message is newer than the topicTS of the current topic on the
353channel, set the topic with topicTS and topic setter, and propagate the
354message. Otherwise ignore the message and do not propagate it.
355
356Unlike a TB message, an ETB message can change the topicTS without changing
357the topic text. In this case, the message should be propagated to servers but
358local users should not be notified.
359
360Services can send a channelTS of 0 to force restoring an older topic (unless
361the channel's TS is 0). Therefore, the channelTS should be propagated as given
362and should not be replaced by the current TS of the channel.
363
364An ETB message with a newer channelTS can still set a topic on a channel
365without topic. This corresponds to SJOIN not clearing the topic when lowering
366TS on a channel.
367
368If ETB comes from a user, it can be propagated to non-EOPMOD servers using
369TOPIC, TB or a combination of TOPIC to clear the topic and TB to set a new
370topic with topicTS. However, this can be somewhat noisy. On the other hand, if
371ETB comes from a server, there is no way to force setting a newer topicTS. It
372is possible to set the topic text but the incorrect topicTS may lead to desync
373later on.
374
375This document does not document the optional extensions between topic setter
376and topic.
377
cdff8b70
JT
378ETRACE
379encap only
380encap target: single server
381source: oper
382parameters: client
383
384Remote ETRACE information request.
385
386EUID
387charybdis TS6
388capab: EUID
389source: server
390parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, real hostname, account name, gecos
391propagation: broadcast
392
393Introduces a client. The client is on the source server of this command.
394
755c144e
JT
395The IP address MUST be '0' (a zero) if the true address is not sent such as
396because of a spoof. Otherwise, and if there is no dynamic spoof (i.e. the
397visible and real hostname are equal), the IP address MAY be shown to normal
398users.
399
1e23af24 400The account name is '*' if the user is not logged in with services.
cdff8b70
JT
401
402Nick TS rules apply.
403
404EUID is similar to UID but includes the ENCAP REALHOST and ENCAP LOGIN
405information.
406
407GCAP
408encap only
409encap target: *
410source: server
411parameters: space separated capability list
412
413Capability list of remote server.
414
86aba27c
JT
415GLINE
416efnet TS6
417capab: GLN
418source: user
419parameters: user mask, host mask, reason
420propagation: broadcast
421
422Propagates a G:line vote. Once votes from three different opers (based on
423user@host mask) on three different servers have arrived, trigger the G:line.
424Pending G:lines expire after some time, usually ten minutes. Triggered G:lines
425expire after a configured time which may differ across servers.
426
427Requests from server connections must be propagated, unless they are found to
428be syntactically invalid (e.g. '!' in user mask). Therefore, disabling glines
429must not affect propagation, and too wide glines, double votes and glines that
430already exist locally must still be propagated.
431
432Of course, servers are free to reject gline requests from their own operators.
433
7e7004c4
JT
434GUNGLINE
435efnet TS6
436encap only
437encap target: *
438source: user
439parameters: user mask, host mask, reason
440propagation: broadcast
441
442Propagates a G:line removal vote. Once three votes have arrived (as with
443G:lines), remove the G:line. Pending G:lines removals expire after some time,
444usually ten minutes.
445
446Pending G:line removals do not interact with pending G:lines. Triggering a
447G:line does not affect a pending G:line removal. Triggering a G:line removal
448does not affect a pending G:line.
449
cdff8b70
JT
450INFO
451source: user
452parameters: hunted
453
454Remote INFO request.
455
456INVITE
457source: user
458parameters: target user, channel, opt. channelTS
459propagation: one-to-one
460
461Invites a user to a channel.
462
463If the channelTS is greater (newer) than the current TS of the channel, drop
464the message.
465
466Not sending the channelTS parameter is deprecated.
467
468JOIN
4691.
470source: user
471parameters: '0' (one ASCII zero)
472propagation: broadcast
473
474Parts the source user from all channels.
475
4762.
477source: user
478parameters: channelTS, channel, '+' (a plus sign)
479propagation: broadcast
480
481Joins the source user to the given channel. If the channel does not exist yet,
482it is created with the given channelTS and no modes. If the channel already
483exists and has a greater (newer) TS, wipe all simple modes and statuses and
484change the TS, notifying local users of this but not servers (note that
485ban-like modes remain intact; invites may or may not be cleared).
486
2d042188
JT
487A JOIN is propagated with the new TS of the channel.
488
22ab2e25
AC
489JUPE
490capab: JUPE
491source: any
492propagation: broadcast (restricted)
493parameters: target server mask, add or delete, server name, oper, reason
494
495Adds or removes a jupe for a server. If the server is presently connected,
496it MUST be SQUIT by the server's uplink when the jupe is applied.
497
498The oper field indicates the oper that originally set the jupe. If this message
499is the initial propagation of a removal, it SHOULD be sent as * (an asterisk).
500
501The reason field indicates the reason for the jupe. It SHOULD be displayed
502as the linking error message to the juped server if it tries to reconnect.
503
cdff8b70
JT
504KICK
505source: any
506parameters: channel, target user, opt. reason
507propagation: broadcast
508
509Kicks the target user from the given channel.
510
511Unless the channel's TS is 0, no check is done whether the source user has ops.
512
513Not sending the reason parameter is questionable.
514
515KILL
516source: any
517parameters: target user, path
518propagation: broadcast
519
520Removes the user from the network.
521
522The format of the path parameter is some sort of description of the source of
523the kill followed by a space and a parenthesized reason. To avoid overflow,
524it is recommended not to add anything to the path.
525
526KLINE
5271.
528encap only
529source: user
530parameters: duration, user mask, host mask, reason
531
532Sets a K:line (ban on user@host).
533
5342.
535capab: KLN
536source: user
537parameters: target server mask, duration, user mask, host mask, reason
538
539As form 1, deprecated.
540
541KNOCK
4b58bbb2 542capab: KNOCK
cdff8b70
JT
543source: user
544parameters: channel
545propagation: broadcast
546
547Requests an invite to a channel that is locked somehow (+ikl). Notifies all
548operators of the channel. (In charybdis, on +g channels all members are
549notified.)
550
551This is broadcast so that each server can store when KNOCK was used last on
552a channel.
553
554LINKS
555source: user
556parameters: hunted, server mask
557
558Remote LINKS request. The server mask limits which servers are listed.
559
3cadd0c4
JT
560LOCOPS
5611.
562encap only
563source: user
564parameters: text
565
566Sends a message to operators (with umode +l set). This is intended to be
567used for strict subsets of the network.
568
5692.
570capab: CLUSTER
571source: user
572parameters: target server mask, text
573
574As form 1, deprecated.
575
cdff8b70
JT
576LOGIN
577encap only
578source: user
579parameters: account name
580
581In a burst, states that the source user is logged in as the account.
582
583LUSERS
584source: user
585parameters: server mask, hunted
586
587Remote LUSERS request. Most servers ignore the server mask, treating it as '*'.
588
d09bb8ae
AC
589MLOCK
590charybdis TS6
591source: services server
73d83e6d 592parameters: channelTS, channel, mode letters
d09bb8ae
AC
593propagation: broadcast (restricted)
594
73d83e6d 595Propagates a channel mode lock change.
d09bb8ae
AC
596
597If the channelTS is greater (newer) than the current TS of the channel, drop
598the message.
599
73d83e6d
SB
600The final parameter is a list of mode letters that may not be changed by local
601users. This applies to setting or unsetting simple modes, and changing or
602removing mode parameters.
d09bb8ae
AC
603
604An MLOCK message with no modes disables the MLOCK, therefore the MLOCK message
605always contains the literal MLOCK for simplicity.
606
cdff8b70
JT
607MODE
6081.
609source: user
610parameters: client, umode changes
611propagation: broadcast
612
613Propagates a user mode change. The client parameter must refer to the same user
614as the source.
615
616Not all umodes are propagated to other servers.
617
6182.
619source: any
620parameters: channel, cmode changes, opt. cmode parameters...
621
622Propagates a channel mode change.
623
624This is deprecated because the channelTS is not included. If it is received,
625it should be propagated as TMODE.
626
627MOTD
628source: user
629parameters: hunted
630
631Remote MOTD request.
632
633NICK
6341.
635source: user
636parameters: new nickname, new nickTS
637propagation: broadcast
638
639Propagates a nick change.
640
6412.
642source: server
643parameters: nickname, hopcount, nickTS, umodes, username, hostname, server, gecos
644
645Historic TS5 user introduction. The user is on the server indicated by the
646server parameter; the source server is meaningless (local link).
647
648NICKDELAY
649charybdis TS6
650encap only
651encap target: *
652source: services server
653parameters: duration, nickname
654
655If duration is greater than 0, makes the given nickname unavailable for that
656time.
657
658If duration is 0, removes a nick delay entry for the given nickname.
659
660There may or may not be a client with the given nickname; this does not affect
661the operation.
662
663NOTICE
664source: any
665parameters: msgtarget, message
666
667As PRIVMSG, except NOTICE messages are sent out, server sources are permitted
668and most error messages are suppressed.
669
0749b751
JT
670Servers may not send '$$', '$#' and opers@server notices. Older servers may
671not allow servers to send to specific statuses on a channel.
672
cdff8b70
JT
673OPERSPY
674encap only
675encap target: *
676source: user
677parameters: command name, parameters
678
679Reports operspy usage.
680
681OPERWALL
682source: user
683parameters: message
684propagation: broadcast
685
686Sends a message to operators (with umode +z set).
687
688PART
689source: user
690parameters: comma separated channel list, message
691
692Parts the source user from the given channels.
693
694PASS
695source: unregistered server
696parameters: password, 'TS', TS version, SID
697
698Sends the server link password, TS version and SID.
699
700PING
701source: any
aa12f64b 702parameters: origin, opt. destination server
cdff8b70 703
aa12f64b
JT
704Sends a PING to the destination server, which will reply with a PONG. If the
705destination server parameter is not present, the server receiving the message
706must reply.
cdff8b70 707
aa12f64b
JT
708The origin field is not used in the server protocol. It is sent as the name
709(not UID/SID) of the source.
cdff8b70
JT
710
711Remote PINGs are used for end-of-burst detection, therefore all servers must
712implement them.
713
714PONG
715source: server
716parameters: origin, destination
717
718Routes a PONG back to the destination that originally sent the PING.
719
720PRIVMSG
721source: user
722parameters: msgtarget, message
723
724Sends a normal message (PRIVMSG) to the given target.
725
726The target can be:
727- a client
728 propagation: one-to-one
729- a channel name
730 propagation: all servers with -D users on the channel
731 (cmode +m/+n should be checked everywhere, bans should not be checked
732 remotely)
733- a status character ('@'/'+') followed by a channel name, to send to users
734 with that status or higher only.
1ba5ea0f 735 capab: CHW
cdff8b70 736 propagation: all servers with -D users with appropriate status
c4d2d014
JT
737- '=' followed by a channel name, to send to chanops only, for cmode +z.
738 capab: CHW and EOPMOD
739 propagation: all servers with -D chanops
cdff8b70
JT
740- a user@server message, to send to users on a specific server. The exact
741 meaning of the part before the '@' is not prescribed, except that "opers"
742 allows IRC operators to send to all IRC operators on the server in an
743 unspecified format.
744 propagation: one-to-one
745- a message to all users on server names matching a mask ('$$' followed by mask)
746 propagation: broadcast
0749b751 747 Only allowed to IRC operators.
cdff8b70
JT
748- a message to all users with hostnames matching a mask ('$#' followed by mask).
749 Note that this is often implemented poorly.
750 propagation: broadcast
0749b751
JT
751 Only allowed to IRC operators.
752
753In charybdis TS6, services may send to any channel and to statuses on any
754channel.
cdff8b70
JT
755
756PRIVS
757charybdis TS6
758encap only
759encap target: single server
760source: oper
761parameters: client
762
763Remote PRIVS information request.
764
765QUIT
766source: user
767parameters: comment
768
769Propagates quitting of a client. No QUIT should be sent for a client that
770has been removed as result of a KILL message.
771
772REALHOST
773charybdis TS6
774encap only
775encap target: *
776source: user
777parameters: real hostname
778
779In a burst, propagates the real host of a dynamically-spoofed user.
780
781REHASH
782charybdis TS6
783encap only
784source: user
785parameters: opt. rehash type
786
787Remote REHASH request. If the rehash type is omitted, it is equivalent to
788a regular /rehash, otherwise it is equivalent to /rehash <rehash type>.
789
790RESV
7911.
792encap only
793source: user
794parameters: duration, mask, reason
795
796Sets a RESV, making a nickname mask or exact channel unavailable.
797
7982.
799capab: CLUSTER
800source: user
801parameters: target server mask, duration, mask, reason
802
803As form 1, deprecated.
804
805RSFNC
806encap only
807capab: RSFNC
808encap target: single server
809source: services server
eda3590e 810parameters: target user, new nickname, new nickTS, old nickTS
cdff8b70
JT
811
812Forces a nickname change and propagates it.
813
814The command is ignored if the nick TS of the user is not equal to the old
815nickTS parameter. If the new nickname already exists (and is not the target
816user), it is killed first.
817
818SASL
819charybdis TS6
820encap only
8211.
822encap target: *
823source: server
824parameters: source uid, '*', 'S', sasl mechanism name
825
826Requests that a SASL agent (a service) initiate the authentication process.
827The source uid is that of an unregistered client. This is why it is not sent
828as the prefix.
829
8302.
831encap target: single server
832source: server
833parameters: source uid, target uid, mode, data
834
835Part of a SASL authentication exchange. The mode is 'C' to send some data
9337f5ce 836(base64 encoded), or 'D' to end the exchange (data indicates type of
cdff8b70
JT
837termination: 'A' for abort, 'F' for authentication failure, 'S' for
838authentication success).
839
840SAVE
841capab: SAVE
842source: server
843propagation: broadcast
844parameters: target uid, TS
845
846Resolve a nick collision by changing a nickname to the UID.
847
848The server should verify that the UID belongs to a registered user, the user
849does not already have their UID as their nick and the TS matches the user's
850nickTS. If not, drop the message.
851
852SAVE should be propagated as a regular NICK change to links without SAVE capab.
853present.
854
855SERVER
8561.
857source: unregistered server
858parameters: server name, hopcount, server description
859
860Registers the connection as a server. PASS and CAPAB must have been sent
861before, SVINFO should be sent afterwards.
862
863If there is no such server configured or authentication failed, the connection
864should be dropped.
865
866This is propagated as a SID message.
867
8682.
869source: server
870propagation: broadcast
871parameters: server name, hopcount, server description
872
873Introduces a new TS5 server, directly connected to the source of this command.
874This is only used for jupes as TS5 servers may do little else than existing.
875
876SID
877source: server
878propagation: broadcast
879parameters: server name, hopcount, sid, server description
880
881Introduces a new server, directly connected to the source of this command.
882
883SIGNON
884source: user
885propagation: broadcast
886parameters: new nickname, new username, new visible hostname, new nickTS, new login name
887
888Broadcasts a change of several user parameters at once.
889
890Currently only sent after an SVSLOGIN.
891
892SJOIN
893source: server
894propagation: broadcast
ef861b05 895parameters: channelTS, channel, simple modes, opt. mode parameters..., nicklist
cdff8b70
JT
896
897Broadcasts a channel creation or bursts a channel.
898
899The nicklist consists of users joining the channel, with status prefixes for
900their status ('@+', '@', '+' or ''), for example:
901'@+1JJAAAAAB +2JJAAAA4C 1JJAAAADS'. All users must be behind the source server
902so it is not possible to use this message to force users to join a channel.
903
904The interpretation depends on the channelTS and the current TS of the channel.
905If either is 0, set the channel's TS to 0 and accept all modes. Otherwise, if
906the incoming channelTS is greater (newer), ignore the incoming simple modes
907and statuses and join and propagate just the users. If the incoming channelTS
908is lower (older), wipe all modes and change the TS, notifying local users of
909this but not servers (invites may be cleared). In the latter case, kick on
910split riding may happen: if the key (+k) differs or the incoming simple modes
911include +i, kick all local users, sending KICK messages to servers.
912
2d042188
JT
913An SJOIN is propagated with the new TS and modes of the channel. The statuses
914are propagated if and only if they were accepted.
915
cdff8b70
JT
916SJOIN must be used to propagate channel creation and in netbursts. For regular
917users joining channels, JOIN must be used. Pseudoservers may use SJOIN to join
918a user with ops.
919
920SNOTE
921charybdis TS6
922encap only
923source: server
924parameters: snomask letter, text
925
926Sends the text as a server notice from the source server to opers with the
927given snomask set.
928
929SQUIT
930parameters: target server, comment
931
932Removes the target server and all servers and users behind it from the network.
933
934If the target server is the receiving server or the local link this came from,
935this is an announcement that the link is being closed.
936
937Otherwise, if the target server is locally connected, the server should send
938a WALLOPS announcing the SQUIT.
939
940STATS
941source: user
942parameters: stats letter, hunted
943
944Remote STATS request. Privileges are checked on the server executing the
945actual request.
946
947SU
948encap only
949encap target: *
950source: services server
951parameters: target user, new login name (optional)
952
953If the new login name is not present or empty, mark the target user as not
954logged in, otherwise mark the target user as logged in as the given account.
955
956SVINFO
957source: server
958propagation: none
959parameters: current TS version, minimum TS version, '0', current time
960
961Verifies TS protocol compatibility and clock. If anything is not in order,
962the link is dropped.
963
964The current TS version is the highest version supported by the source server
965and the minimum TS version is the lowest version supported.
966
967The current time is sent as a TS in the usual way.
968
969SVSLOGIN
970charybdis TS6
971encap only
972encap target: single server
973source: services server
974parameters: target, new nick, new username, new visible hostname, new login name
975
976Sent after successful SASL authentication.
977
978The target is a UID, typically an unregistered one.
979
980Any of the "new" parameters can be '*' to leave the corresponding field
981unchanged. The new login name can be '0' to log the user out.
982
983If the UID is registered on the network, a SIGNON with the changes will be
984broadcast, otherwise the changes will be stored, to be used when registration
985completes.
986
987TB
3e0bb80a 988capab: TB
cdff8b70
JT
989source: server
990propagation: broadcast
3e0bb80a
JT
991parameters: channel, topicTS, opt. topic setter, topic
992
993Propagates a channel topic as part of a burst.
994
995If the channel had no topic yet or the topicTS in the message is older than
996the topicTS of the current topic on the channel and the topics differ, set
997the topic with topicTS and topic setter, and propagate the message. Otherwise
998ignore the message and do not propagate it.
999
1000If the topic setter is not present, use a server name instead.
cdff8b70
JT
1001
1002TIME
1003source: user
1004parameters: hunted
1005
1006Remote TIME request.
1007
1008TMODE
1009source: any
1010parameters: channelTS, channel, cmode changes, opt. cmode parameters...
1011
1012Propagates a channel mode change.
1013
1014If the channelTS is greater (newer) than the current TS of the channel, drop
1015the message.
1016
1017On input, only the limit on parameters per line restricts how many cmode
1018parameters can be present. Apart from this, arbitrary modes shall be
1019processed. Redundant modes may be dropped. For example, +n-n may be applied and
1020propagated as +n-n, -n or (if the channel was already -n) nothing, but not as
1021+n.
1022
1023The parameter for mode -k (removing a key) shall be ignored.
1024
1025On output, at most ten cmode parameters should be sent; if there are more,
1026multiple TMODE messages should be sent.
1027
1028TOPIC
1029source: user
1030propagation: broadcast
3e0bb80a 1031parameters: channel, topic
cdff8b70
JT
1032
1033Propagates a channel topic change. The server may verify that the source has
1034ops in the channel.
1035
3e0bb80a
JT
1036The topicTS shall be set to the current time and the topic setter shall be
1037set indicating the source user. Note that this means that the topicTS of a
1038topic set with TOPIC is not necessarily consistent across the network.
1039
cdff8b70
JT
1040TRACE
1041source: user
10421.
1043parameters: hunted
1044
1045Performs a trace to the target, sending 200 numerics from each server passing
1046the message on. The target server sends a description of the target followed
1047by a 262 numeric.
1048
1049TRACE, STATS l and STATS L are the only commands using hunt_server that use the
1050hunted parameter for more than just determining which server the command
1051should be executed on.
1052
10532.
1054parameters: target name, hunted
1055
1056Executes a trace command on the target server. No 200 numerics are sent.
1057The target name is a name, not a UID, and should be on the target server.
1058
1059UID
1060source: server
1061propagation: broadcast
1062parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, gecos
1063propagation: broadcast
1064
1065Introduces a client. The client is on the source server of this command.
1066
755c144e
JT
1067The IP address MUST be '0' (a zero) if the true address is not sent such as
1068because of a spoof. Otherwise, and if there is no dynamic spoof (ENCAP
1069REALHOST, charybdis TS6 only), the IP address MAY be shown to normal users.
1070
cdff8b70
JT
1071Nick TS rules apply.
1072
1073UNDLINE
1074charybdis TS6
1075encap only
1076source: user
1077parameters: mask
1078
1079Removes a D:line (IP ban checked directly after accepting connection).
1080
1081The mask must be an IP address or CIDR mask.
1082
1083UNKLINE
10841.
1085encap only
1086source: user
1087parameters: user mask, host mask
1088
1089Removes a K:line (ban on user@host).
1090
10912.
1092capab: UNKLN
1093source: user
1094parameters: target server mask, user mask, host mask
1095
1096As form 1, deprecated.
1097
1098UNRESV
10991.
1100encap only
1101source: user
1102parameters: mask
1103
1104Removes a RESV.
1105
11062.
1107capab: CLUSTER
1108source: user
1109parameters: target server mask, mask
1110
1111As form 1, deprecated.
1112
1113UNXLINE
11141.
1115encap only
1116source: user
1117parameters: mask
1118
1119Removes an X:line (ban on realname).
1120
11212.
1122capab: CLUSTER
1123source: user
1124parameters: target server mask, mask
1125
1126As form 1, deprecated.
1127
1128USERS
1129source: user
1130parameters: hunted
1131
1132Remote USERS request.
1133
1134VERSION
1135source: any
1136parameters: hunted
1137
1138Remote VERSION request.
1139
1140WALLOPS
11411.
1142source: user
1143parameters: message
1144propagation: broadcast
1145
1146In efnet TS6, sends a message to operators (with umode +z set). This is a
1147deprecated equivalent to OPERWALL.
1148
1149In charybdis TS6, sends a message to local users with umode +w set (or possibly
1150another indication that WALLOPS messages should be sent), including non-opers.
1151
11522.
1153source: server
1154parameters: message
1155propagation: broadcast
1156
1157Sends a message to local users with umode +w set (or possibly another
1158indication that WALLOPS messages should be sent).
1159
1160In efnet TS6 this may include non-opers, in charybdis TS6 this may only be
1161sent to opers.
1162
1163WHOIS
1164source: user
1165parameters: hunted, target nick
1166
1167Remote WHOIS request.
1168
7a9a9000
JT
1169WHOWAS
1170source: user
1171parameters: nickname, limit, hunted
1172
1173Remote WHOWAS request. Not implemented in all servers.
1174
1175Different from a local WHOWAS request, the limit is mandatory and servers should
1176apply a maximum to it.
1177
cdff8b70
JT
1178XLINE
11791.
1180encap only
1181source: user
1182parameters: duration, mask, reason
1183
1184Sets an X:line (ban on realname).
1185
11862.
1187capab: CLUSTER
1188source: user
1189parameters: target server mask, duration, mask, reason
1190
1191As form 1, deprecated.
1192
1193Local only commands (charybdis 3.1):
1194
1195ACCEPT
1196AUTHENTICATE
1197CAP
1198CHALLENGE
1199CHANTRACE
1200CLOSE
cdff8b70
JT
1201DIE
1202GET
1203HELP
1204ISON
1205LIST
cdff8b70
JT
1206MAP
1207MASKTRACE
1208MODLIST
1209MODLOAD
1210MODRELOAD
1211MODRESTART
1212MODUNLOAD
1213MONITOR
1214NAMES
1215OPER
1216POST
1217PUT
1218RESTART
1219SCAN
1220SET
1221TESTGECOS
1222TESTLINE
1223TESTMASK
1224UHELP
1225UNREJECT
1226USER
1227USERHOST
1228WEBIRC
1229WHO
1230WHOWAS