]> jfr.im git - solanum.git/blame - doc/technical/ts6-protocol.txt
Resolve shfit/reduce conflict in timespec production (#54)
[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
cbc31cce
EK
322ECHO
323source: user
324parameters: "P"/"N", target, text
325
326As PRIVMSG, but delivers an echo-message echo to the target; they will see
327a PRIVMSG or NOTICE from themselves to the source.
328
cdff8b70
JT
329ENCAP
330source: any
331parameters: target server mask, subcommand, opt. parameters...
332
03204327
JT
333Sends a command to matching servers. Propagation is independent of
334understanding the subcommand.
cdff8b70 335
03204327 336Subcommands are listed elsewhere with "encap only".
cdff8b70
JT
337
338ERROR
339source: server or unregistered server
340propagation: none
341parameters: error message
342
343Reports a (usually fatal) error with the connection.
344
345Error messages may contain IP addresses and have a negative effect on server
346IP hiding.
347
a5de4ede
JT
348ETB
349capab: EOPMOD
350source: any
351propagation: broadcast
352parameters: channelTS, channel, topicTS, topic setter, opt. extensions, topic
353
354Propagates a channel topic change or propagates a channel topic as part of a
355burst.
356
357If the channel had no topic yet, the channelTS in the message is lower (older)
358than the current TS of the channel, or the channelTSes are equal and the
359topicTS in the message is newer than the topicTS of the current topic on the
360channel, set the topic with topicTS and topic setter, and propagate the
361message. Otherwise ignore the message and do not propagate it.
362
363Unlike a TB message, an ETB message can change the topicTS without changing
364the topic text. In this case, the message should be propagated to servers but
365local users should not be notified.
366
367Services can send a channelTS of 0 to force restoring an older topic (unless
368the channel's TS is 0). Therefore, the channelTS should be propagated as given
369and should not be replaced by the current TS of the channel.
370
371An ETB message with a newer channelTS can still set a topic on a channel
372without topic. This corresponds to SJOIN not clearing the topic when lowering
373TS on a channel.
374
375If ETB comes from a user, it can be propagated to non-EOPMOD servers using
376TOPIC, TB or a combination of TOPIC to clear the topic and TB to set a new
377topic with topicTS. However, this can be somewhat noisy. On the other hand, if
378ETB comes from a server, there is no way to force setting a newer topicTS. It
379is possible to set the topic text but the incorrect topicTS may lead to desync
380later on.
381
382This document does not document the optional extensions between topic setter
383and topic.
384
cdff8b70
JT
385ETRACE
386encap only
387encap target: single server
388source: oper
389parameters: client
390
391Remote ETRACE information request.
392
393EUID
394charybdis TS6
395capab: EUID
396source: server
397parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, real hostname, account name, gecos
398propagation: broadcast
399
400Introduces a client. The client is on the source server of this command.
401
755c144e
JT
402The IP address MUST be '0' (a zero) if the true address is not sent such as
403because of a spoof. Otherwise, and if there is no dynamic spoof (i.e. the
404visible and real hostname are equal), the IP address MAY be shown to normal
405users.
406
1e23af24 407The account name is '*' if the user is not logged in with services.
cdff8b70
JT
408
409Nick TS rules apply.
410
411EUID is similar to UID but includes the ENCAP REALHOST and ENCAP LOGIN
412information.
413
414GCAP
415encap only
416encap target: *
417source: server
418parameters: space separated capability list
419
420Capability list of remote server.
421
86aba27c
JT
422GLINE
423efnet TS6
424capab: GLN
425source: user
426parameters: user mask, host mask, reason
427propagation: broadcast
428
429Propagates a G:line vote. Once votes from three different opers (based on
430user@host mask) on three different servers have arrived, trigger the G:line.
431Pending G:lines expire after some time, usually ten minutes. Triggered G:lines
432expire after a configured time which may differ across servers.
433
434Requests from server connections must be propagated, unless they are found to
435be syntactically invalid (e.g. '!' in user mask). Therefore, disabling glines
436must not affect propagation, and too wide glines, double votes and glines that
437already exist locally must still be propagated.
438
439Of course, servers are free to reject gline requests from their own operators.
440
7e7004c4
JT
441GUNGLINE
442efnet TS6
443encap only
444encap target: *
445source: user
446parameters: user mask, host mask, reason
447propagation: broadcast
448
449Propagates a G:line removal vote. Once three votes have arrived (as with
450G:lines), remove the G:line. Pending G:lines removals expire after some time,
451usually ten minutes.
452
453Pending G:line removals do not interact with pending G:lines. Triggering a
454G:line does not affect a pending G:line removal. Triggering a G:line removal
455does not affect a pending G:line.
456
cdff8b70
JT
457INFO
458source: user
459parameters: hunted
460
461Remote INFO request.
462
463INVITE
464source: user
465parameters: target user, channel, opt. channelTS
466propagation: one-to-one
467
468Invites a user to a channel.
469
470If the channelTS is greater (newer) than the current TS of the channel, drop
471the message.
472
473Not sending the channelTS parameter is deprecated.
474
475JOIN
4761.
477source: user
478parameters: '0' (one ASCII zero)
479propagation: broadcast
480
481Parts the source user from all channels.
482
4832.
484source: user
485parameters: channelTS, channel, '+' (a plus sign)
486propagation: broadcast
487
488Joins the source user to the given channel. If the channel does not exist yet,
489it is created with the given channelTS and no modes. If the channel already
490exists and has a greater (newer) TS, wipe all simple modes and statuses and
491change the TS, notifying local users of this but not servers (note that
492ban-like modes remain intact; invites may or may not be cleared).
493
2d042188
JT
494A JOIN is propagated with the new TS of the channel.
495
22ab2e25
AC
496JUPE
497capab: JUPE
498source: any
499propagation: broadcast (restricted)
500parameters: target server mask, add or delete, server name, oper, reason
501
502Adds or removes a jupe for a server. If the server is presently connected,
503it MUST be SQUIT by the server's uplink when the jupe is applied.
504
505The oper field indicates the oper that originally set the jupe. If this message
506is the initial propagation of a removal, it SHOULD be sent as * (an asterisk).
507
508The reason field indicates the reason for the jupe. It SHOULD be displayed
509as the linking error message to the juped server if it tries to reconnect.
510
cdff8b70
JT
511KICK
512source: any
513parameters: channel, target user, opt. reason
514propagation: broadcast
515
516Kicks the target user from the given channel.
517
518Unless the channel's TS is 0, no check is done whether the source user has ops.
519
520Not sending the reason parameter is questionable.
521
522KILL
523source: any
524parameters: target user, path
525propagation: broadcast
526
527Removes the user from the network.
528
529The format of the path parameter is some sort of description of the source of
530the kill followed by a space and a parenthesized reason. To avoid overflow,
531it is recommended not to add anything to the path.
532
533KLINE
5341.
535encap only
536source: user
537parameters: duration, user mask, host mask, reason
538
539Sets a K:line (ban on user@host).
540
5412.
542capab: KLN
543source: user
544parameters: target server mask, duration, user mask, host mask, reason
545
546As form 1, deprecated.
547
548KNOCK
4b58bbb2 549capab: KNOCK
cdff8b70
JT
550source: user
551parameters: channel
552propagation: broadcast
553
554Requests an invite to a channel that is locked somehow (+ikl). Notifies all
555operators of the channel. (In charybdis, on +g channels all members are
556notified.)
557
558This is broadcast so that each server can store when KNOCK was used last on
559a channel.
560
561LINKS
562source: user
563parameters: hunted, server mask
564
565Remote LINKS request. The server mask limits which servers are listed.
566
3cadd0c4
JT
567LOCOPS
5681.
569encap only
570source: user
571parameters: text
572
573Sends a message to operators (with umode +l set). This is intended to be
574used for strict subsets of the network.
575
5762.
577capab: CLUSTER
578source: user
579parameters: target server mask, text
580
581As form 1, deprecated.
582
cdff8b70
JT
583LOGIN
584encap only
585source: user
586parameters: account name
587
588In a burst, states that the source user is logged in as the account.
589
590LUSERS
591source: user
592parameters: server mask, hunted
593
594Remote LUSERS request. Most servers ignore the server mask, treating it as '*'.
595
d09bb8ae
AC
596MLOCK
597charybdis TS6
598source: services server
73d83e6d 599parameters: channelTS, channel, mode letters
d09bb8ae
AC
600propagation: broadcast (restricted)
601
73d83e6d 602Propagates a channel mode lock change.
d09bb8ae
AC
603
604If the channelTS is greater (newer) than the current TS of the channel, drop
605the message.
606
73d83e6d
SB
607The final parameter is a list of mode letters that may not be changed by local
608users. This applies to setting or unsetting simple modes, and changing or
609removing mode parameters.
d09bb8ae
AC
610
611An MLOCK message with no modes disables the MLOCK, therefore the MLOCK message
612always contains the literal MLOCK for simplicity.
613
cdff8b70
JT
614MODE
6151.
616source: user
617parameters: client, umode changes
618propagation: broadcast
619
620Propagates a user mode change. The client parameter must refer to the same user
621as the source.
622
623Not all umodes are propagated to other servers.
624
6252.
626source: any
627parameters: channel, cmode changes, opt. cmode parameters...
628
629Propagates a channel mode change.
630
631This is deprecated because the channelTS is not included. If it is received,
632it should be propagated as TMODE.
633
634MOTD
635source: user
636parameters: hunted
637
638Remote MOTD request.
639
640NICK
6411.
642source: user
643parameters: new nickname, new nickTS
644propagation: broadcast
645
646Propagates a nick change.
647
6482.
649source: server
650parameters: nickname, hopcount, nickTS, umodes, username, hostname, server, gecos
651
652Historic TS5 user introduction. The user is on the server indicated by the
653server parameter; the source server is meaningless (local link).
654
655NICKDELAY
656charybdis TS6
657encap only
658encap target: *
659source: services server
660parameters: duration, nickname
661
662If duration is greater than 0, makes the given nickname unavailable for that
663time.
664
665If duration is 0, removes a nick delay entry for the given nickname.
666
667There may or may not be a client with the given nickname; this does not affect
668the operation.
669
670NOTICE
671source: any
672parameters: msgtarget, message
673
674As PRIVMSG, except NOTICE messages are sent out, server sources are permitted
675and most error messages are suppressed.
676
0749b751
JT
677Servers may not send '$$', '$#' and opers@server notices. Older servers may
678not allow servers to send to specific statuses on a channel.
679
ed3ca2ff
EK
680OPER
681source: user
682parameters: opername, privset
683
684Sets the source user's oper name and privset. Sent after the +o mode change, or
685during burst, to inform other servers of an oper's privileges.
686
cdff8b70
JT
687OPERSPY
688encap only
689encap target: *
690source: user
691parameters: command name, parameters
692
693Reports operspy usage.
694
695OPERWALL
696source: user
697parameters: message
698propagation: broadcast
699
700Sends a message to operators (with umode +z set).
701
702PART
703source: user
704parameters: comma separated channel list, message
705
706Parts the source user from the given channels.
707
708PASS
709source: unregistered server
710parameters: password, 'TS', TS version, SID
711
712Sends the server link password, TS version and SID.
713
714PING
715source: any
aa12f64b 716parameters: origin, opt. destination server
cdff8b70 717
aa12f64b
JT
718Sends a PING to the destination server, which will reply with a PONG. If the
719destination server parameter is not present, the server receiving the message
720must reply.
cdff8b70 721
aa12f64b
JT
722The origin field is not used in the server protocol. It is sent as the name
723(not UID/SID) of the source.
cdff8b70
JT
724
725Remote PINGs are used for end-of-burst detection, therefore all servers must
726implement them.
727
728PONG
729source: server
730parameters: origin, destination
731
732Routes a PONG back to the destination that originally sent the PING.
733
734PRIVMSG
735source: user
736parameters: msgtarget, message
737
738Sends a normal message (PRIVMSG) to the given target.
739
740The target can be:
741- a client
742 propagation: one-to-one
743- a channel name
744 propagation: all servers with -D users on the channel
745 (cmode +m/+n should be checked everywhere, bans should not be checked
746 remotely)
747- a status character ('@'/'+') followed by a channel name, to send to users
748 with that status or higher only.
1ba5ea0f 749 capab: CHW
cdff8b70 750 propagation: all servers with -D users with appropriate status
c4d2d014
JT
751- '=' followed by a channel name, to send to chanops only, for cmode +z.
752 capab: CHW and EOPMOD
753 propagation: all servers with -D chanops
cdff8b70
JT
754- a user@server message, to send to users on a specific server. The exact
755 meaning of the part before the '@' is not prescribed, except that "opers"
756 allows IRC operators to send to all IRC operators on the server in an
757 unspecified format.
758 propagation: one-to-one
759- a message to all users on server names matching a mask ('$$' followed by mask)
760 propagation: broadcast
0749b751 761 Only allowed to IRC operators.
cdff8b70
JT
762- a message to all users with hostnames matching a mask ('$#' followed by mask).
763 Note that this is often implemented poorly.
764 propagation: broadcast
0749b751
JT
765 Only allowed to IRC operators.
766
767In charybdis TS6, services may send to any channel and to statuses on any
768channel.
cdff8b70
JT
769
770PRIVS
771charybdis TS6
772encap only
773encap target: single server
774source: oper
775parameters: client
776
777Remote PRIVS information request.
778
779QUIT
780source: user
781parameters: comment
782
783Propagates quitting of a client. No QUIT should be sent for a client that
784has been removed as result of a KILL message.
785
786REALHOST
787charybdis TS6
788encap only
789encap target: *
790source: user
791parameters: real hostname
792
793In a burst, propagates the real host of a dynamically-spoofed user.
794
795REHASH
796charybdis TS6
797encap only
798source: user
799parameters: opt. rehash type
800
801Remote REHASH request. If the rehash type is omitted, it is equivalent to
802a regular /rehash, otherwise it is equivalent to /rehash <rehash type>.
803
804RESV
8051.
806encap only
807source: user
808parameters: duration, mask, reason
809
810Sets a RESV, making a nickname mask or exact channel unavailable.
811
8122.
813capab: CLUSTER
814source: user
815parameters: target server mask, duration, mask, reason
816
817As form 1, deprecated.
818
819RSFNC
820encap only
821capab: RSFNC
822encap target: single server
823source: services server
eda3590e 824parameters: target user, new nickname, new nickTS, old nickTS
cdff8b70
JT
825
826Forces a nickname change and propagates it.
827
828The command is ignored if the nick TS of the user is not equal to the old
829nickTS parameter. If the new nickname already exists (and is not the target
830user), it is killed first.
831
832SASL
833charybdis TS6
834encap only
8351.
836encap target: *
837source: server
838parameters: source uid, '*', 'S', sasl mechanism name
839
840Requests that a SASL agent (a service) initiate the authentication process.
841The source uid is that of an unregistered client. This is why it is not sent
842as the prefix.
843
8442.
845encap target: single server
846source: server
847parameters: source uid, target uid, mode, data
848
849Part of a SASL authentication exchange. The mode is 'C' to send some data
9337f5ce 850(base64 encoded), or 'D' to end the exchange (data indicates type of
cdff8b70
JT
851termination: 'A' for abort, 'F' for authentication failure, 'S' for
852authentication success).
853
0ee833da
SA
8543.
855encap target: *
856source: server
857parameters: source uid, '*', 'H', hostname, ip, tls
858
859Provides information on a client. The "tls" data is either 'P' for a
860plaintext connection or any other string for a TLS connection.
861The source uid is that of an unregistered client. This is why it is not sent
862as the prefix.
863
cdff8b70
JT
864SAVE
865capab: SAVE
866source: server
867propagation: broadcast
868parameters: target uid, TS
869
870Resolve a nick collision by changing a nickname to the UID.
871
872The server should verify that the UID belongs to a registered user, the user
873does not already have their UID as their nick and the TS matches the user's
874nickTS. If not, drop the message.
875
876SAVE should be propagated as a regular NICK change to links without SAVE capab.
877present.
878
879SERVER
8801.
881source: unregistered server
882parameters: server name, hopcount, server description
883
884Registers the connection as a server. PASS and CAPAB must have been sent
885before, SVINFO should be sent afterwards.
886
887If there is no such server configured or authentication failed, the connection
888should be dropped.
889
890This is propagated as a SID message.
891
8922.
893source: server
894propagation: broadcast
895parameters: server name, hopcount, server description
896
897Introduces a new TS5 server, directly connected to the source of this command.
898This is only used for jupes as TS5 servers may do little else than existing.
899
900SID
901source: server
902propagation: broadcast
903parameters: server name, hopcount, sid, server description
904
905Introduces a new server, directly connected to the source of this command.
906
907SIGNON
908source: user
909propagation: broadcast
910parameters: new nickname, new username, new visible hostname, new nickTS, new login name
911
912Broadcasts a change of several user parameters at once.
913
914Currently only sent after an SVSLOGIN.
915
916SJOIN
917source: server
918propagation: broadcast
ef861b05 919parameters: channelTS, channel, simple modes, opt. mode parameters..., nicklist
cdff8b70
JT
920
921Broadcasts a channel creation or bursts a channel.
922
923The nicklist consists of users joining the channel, with status prefixes for
924their status ('@+', '@', '+' or ''), for example:
925'@+1JJAAAAAB +2JJAAAA4C 1JJAAAADS'. All users must be behind the source server
926so it is not possible to use this message to force users to join a channel.
927
928The interpretation depends on the channelTS and the current TS of the channel.
929If either is 0, set the channel's TS to 0 and accept all modes. Otherwise, if
930the incoming channelTS is greater (newer), ignore the incoming simple modes
931and statuses and join and propagate just the users. If the incoming channelTS
932is lower (older), wipe all modes and change the TS, notifying local users of
933this but not servers (invites may be cleared). In the latter case, kick on
934split riding may happen: if the key (+k) differs or the incoming simple modes
935include +i, kick all local users, sending KICK messages to servers.
936
2d042188
JT
937An SJOIN is propagated with the new TS and modes of the channel. The statuses
938are propagated if and only if they were accepted.
939
cdff8b70
JT
940SJOIN must be used to propagate channel creation and in netbursts. For regular
941users joining channels, JOIN must be used. Pseudoservers may use SJOIN to join
942a user with ops.
943
944SNOTE
945charybdis TS6
946encap only
947source: server
948parameters: snomask letter, text
949
950Sends the text as a server notice from the source server to opers with the
951given snomask set.
952
953SQUIT
954parameters: target server, comment
955
956Removes the target server and all servers and users behind it from the network.
957
958If the target server is the receiving server or the local link this came from,
959this is an announcement that the link is being closed.
960
961Otherwise, if the target server is locally connected, the server should send
962a WALLOPS announcing the SQUIT.
963
964STATS
965source: user
966parameters: stats letter, hunted
967
968Remote STATS request. Privileges are checked on the server executing the
969actual request.
970
971SU
972encap only
973encap target: *
974source: services server
975parameters: target user, new login name (optional)
976
977If the new login name is not present or empty, mark the target user as not
978logged in, otherwise mark the target user as logged in as the given account.
979
980SVINFO
981source: server
982propagation: none
983parameters: current TS version, minimum TS version, '0', current time
984
985Verifies TS protocol compatibility and clock. If anything is not in order,
986the link is dropped.
987
988The current TS version is the highest version supported by the source server
989and the minimum TS version is the lowest version supported.
990
991The current time is sent as a TS in the usual way.
992
993SVSLOGIN
994charybdis TS6
995encap only
996encap target: single server
997source: services server
998parameters: target, new nick, new username, new visible hostname, new login name
999
1000Sent after successful SASL authentication.
1001
1002The target is a UID, typically an unregistered one.
1003
1004Any of the "new" parameters can be '*' to leave the corresponding field
1005unchanged. The new login name can be '0' to log the user out.
1006
1007If the UID is registered on the network, a SIGNON with the changes will be
1008broadcast, otherwise the changes will be stored, to be used when registration
1009completes.
1010
1011TB
3e0bb80a 1012capab: TB
cdff8b70
JT
1013source: server
1014propagation: broadcast
3e0bb80a
JT
1015parameters: channel, topicTS, opt. topic setter, topic
1016
1017Propagates a channel topic as part of a burst.
1018
1019If the channel had no topic yet or the topicTS in the message is older than
1020the topicTS of the current topic on the channel and the topics differ, set
1021the topic with topicTS and topic setter, and propagate the message. Otherwise
1022ignore the message and do not propagate it.
1023
1024If the topic setter is not present, use a server name instead.
cdff8b70
JT
1025
1026TIME
1027source: user
1028parameters: hunted
1029
1030Remote TIME request.
1031
1032TMODE
1033source: any
1034parameters: channelTS, channel, cmode changes, opt. cmode parameters...
1035
1036Propagates a channel mode change.
1037
1038If the channelTS is greater (newer) than the current TS of the channel, drop
1039the message.
1040
1041On input, only the limit on parameters per line restricts how many cmode
1042parameters can be present. Apart from this, arbitrary modes shall be
1043processed. Redundant modes may be dropped. For example, +n-n may be applied and
1044propagated as +n-n, -n or (if the channel was already -n) nothing, but not as
1045+n.
1046
1047The parameter for mode -k (removing a key) shall be ignored.
1048
1049On output, at most ten cmode parameters should be sent; if there are more,
1050multiple TMODE messages should be sent.
1051
1052TOPIC
1053source: user
1054propagation: broadcast
3e0bb80a 1055parameters: channel, topic
cdff8b70
JT
1056
1057Propagates a channel topic change. The server may verify that the source has
1058ops in the channel.
1059
3e0bb80a
JT
1060The topicTS shall be set to the current time and the topic setter shall be
1061set indicating the source user. Note that this means that the topicTS of a
1062topic set with TOPIC is not necessarily consistent across the network.
1063
cdff8b70
JT
1064TRACE
1065source: user
10661.
1067parameters: hunted
1068
1069Performs a trace to the target, sending 200 numerics from each server passing
1070the message on. The target server sends a description of the target followed
1071by a 262 numeric.
1072
1073TRACE, STATS l and STATS L are the only commands using hunt_server that use the
1074hunted parameter for more than just determining which server the command
1075should be executed on.
1076
10772.
1078parameters: target name, hunted
1079
1080Executes a trace command on the target server. No 200 numerics are sent.
1081The target name is a name, not a UID, and should be on the target server.
1082
1083UID
1084source: server
1085propagation: broadcast
1086parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, gecos
1087propagation: broadcast
1088
1089Introduces a client. The client is on the source server of this command.
1090
755c144e
JT
1091The IP address MUST be '0' (a zero) if the true address is not sent such as
1092because of a spoof. Otherwise, and if there is no dynamic spoof (ENCAP
1093REALHOST, charybdis TS6 only), the IP address MAY be shown to normal users.
1094
cdff8b70
JT
1095Nick TS rules apply.
1096
1097UNDLINE
1098charybdis TS6
1099encap only
1100source: user
1101parameters: mask
1102
1103Removes a D:line (IP ban checked directly after accepting connection).
1104
1105The mask must be an IP address or CIDR mask.
1106
1107UNKLINE
11081.
1109encap only
1110source: user
1111parameters: user mask, host mask
1112
1113Removes a K:line (ban on user@host).
1114
11152.
1116capab: UNKLN
1117source: user
1118parameters: target server mask, user mask, host mask
1119
1120As form 1, deprecated.
1121
1122UNRESV
11231.
1124encap only
1125source: user
1126parameters: mask
1127
1128Removes a RESV.
1129
11302.
1131capab: CLUSTER
1132source: user
1133parameters: target server mask, mask
1134
1135As form 1, deprecated.
1136
1137UNXLINE
11381.
1139encap only
1140source: user
1141parameters: mask
1142
1143Removes an X:line (ban on realname).
1144
11452.
1146capab: CLUSTER
1147source: user
1148parameters: target server mask, mask
1149
1150As form 1, deprecated.
1151
1152USERS
1153source: user
1154parameters: hunted
1155
1156Remote USERS request.
1157
1158VERSION
1159source: any
1160parameters: hunted
1161
1162Remote VERSION request.
1163
1164WALLOPS
11651.
1166source: user
1167parameters: message
1168propagation: broadcast
1169
1170In efnet TS6, sends a message to operators (with umode +z set). This is a
1171deprecated equivalent to OPERWALL.
1172
1173In charybdis TS6, sends a message to local users with umode +w set (or possibly
1174another indication that WALLOPS messages should be sent), including non-opers.
1175
11762.
1177source: server
1178parameters: message
1179propagation: broadcast
1180
1181Sends a message to local users with umode +w set (or possibly another
1182indication that WALLOPS messages should be sent).
1183
1184In efnet TS6 this may include non-opers, in charybdis TS6 this may only be
1185sent to opers.
1186
1187WHOIS
1188source: user
1189parameters: hunted, target nick
1190
1191Remote WHOIS request.
1192
7a9a9000
JT
1193WHOWAS
1194source: user
1195parameters: nickname, limit, hunted
1196
1197Remote WHOWAS request. Not implemented in all servers.
1198
1199Different from a local WHOWAS request, the limit is mandatory and servers should
1200apply a maximum to it.
1201
cdff8b70
JT
1202XLINE
12031.
1204encap only
1205source: user
1206parameters: duration, mask, reason
1207
1208Sets an X:line (ban on realname).
1209
12102.
1211capab: CLUSTER
1212source: user
1213parameters: target server mask, duration, mask, reason
1214
1215As form 1, deprecated.
1216
1217Local only commands (charybdis 3.1):
1218
1219ACCEPT
1220AUTHENTICATE
1221CAP
1222CHALLENGE
1223CHANTRACE
1224CLOSE
cdff8b70
JT
1225DIE
1226GET
1227HELP
1228ISON
1229LIST
cdff8b70
JT
1230MAP
1231MASKTRACE
1232MODLIST
1233MODLOAD
1234MODRELOAD
1235MODRESTART
1236MODUNLOAD
1237MONITOR
1238NAMES
cdff8b70
JT
1239POST
1240PUT
1241RESTART
1242SCAN
1243SET
1244TESTGECOS
1245TESTLINE
1246TESTMASK
1247UHELP
1248UNREJECT
1249USER
1250USERHOST
1251WEBIRC
1252WHO
1253WHOWAS