]> jfr.im git - solanum.git/blame - doc/technical/ts6-protocol.txt
Add oper:privs
[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
ed3ca2ff
EK
673OPER
674source: user
675parameters: opername, privset
676
677Sets the source user's oper name and privset. Sent after the +o mode change, or
678during burst, to inform other servers of an oper's privileges.
679
cdff8b70
JT
680OPERSPY
681encap only
682encap target: *
683source: user
684parameters: command name, parameters
685
686Reports operspy usage.
687
688OPERWALL
689source: user
690parameters: message
691propagation: broadcast
692
693Sends a message to operators (with umode +z set).
694
695PART
696source: user
697parameters: comma separated channel list, message
698
699Parts the source user from the given channels.
700
701PASS
702source: unregistered server
703parameters: password, 'TS', TS version, SID
704
705Sends the server link password, TS version and SID.
706
707PING
708source: any
aa12f64b 709parameters: origin, opt. destination server
cdff8b70 710
aa12f64b
JT
711Sends a PING to the destination server, which will reply with a PONG. If the
712destination server parameter is not present, the server receiving the message
713must reply.
cdff8b70 714
aa12f64b
JT
715The origin field is not used in the server protocol. It is sent as the name
716(not UID/SID) of the source.
cdff8b70
JT
717
718Remote PINGs are used for end-of-burst detection, therefore all servers must
719implement them.
720
721PONG
722source: server
723parameters: origin, destination
724
725Routes a PONG back to the destination that originally sent the PING.
726
727PRIVMSG
728source: user
729parameters: msgtarget, message
730
731Sends a normal message (PRIVMSG) to the given target.
732
733The target can be:
734- a client
735 propagation: one-to-one
736- a channel name
737 propagation: all servers with -D users on the channel
738 (cmode +m/+n should be checked everywhere, bans should not be checked
739 remotely)
740- a status character ('@'/'+') followed by a channel name, to send to users
741 with that status or higher only.
1ba5ea0f 742 capab: CHW
cdff8b70 743 propagation: all servers with -D users with appropriate status
c4d2d014
JT
744- '=' followed by a channel name, to send to chanops only, for cmode +z.
745 capab: CHW and EOPMOD
746 propagation: all servers with -D chanops
cdff8b70
JT
747- a user@server message, to send to users on a specific server. The exact
748 meaning of the part before the '@' is not prescribed, except that "opers"
749 allows IRC operators to send to all IRC operators on the server in an
750 unspecified format.
751 propagation: one-to-one
752- a message to all users on server names matching a mask ('$$' followed by mask)
753 propagation: broadcast
0749b751 754 Only allowed to IRC operators.
cdff8b70
JT
755- a message to all users with hostnames matching a mask ('$#' followed by mask).
756 Note that this is often implemented poorly.
757 propagation: broadcast
0749b751
JT
758 Only allowed to IRC operators.
759
760In charybdis TS6, services may send to any channel and to statuses on any
761channel.
cdff8b70
JT
762
763PRIVS
764charybdis TS6
765encap only
766encap target: single server
767source: oper
768parameters: client
769
770Remote PRIVS information request.
771
772QUIT
773source: user
774parameters: comment
775
776Propagates quitting of a client. No QUIT should be sent for a client that
777has been removed as result of a KILL message.
778
779REALHOST
780charybdis TS6
781encap only
782encap target: *
783source: user
784parameters: real hostname
785
786In a burst, propagates the real host of a dynamically-spoofed user.
787
788REHASH
789charybdis TS6
790encap only
791source: user
792parameters: opt. rehash type
793
794Remote REHASH request. If the rehash type is omitted, it is equivalent to
795a regular /rehash, otherwise it is equivalent to /rehash <rehash type>.
796
797RESV
7981.
799encap only
800source: user
801parameters: duration, mask, reason
802
803Sets a RESV, making a nickname mask or exact channel unavailable.
804
8052.
806capab: CLUSTER
807source: user
808parameters: target server mask, duration, mask, reason
809
810As form 1, deprecated.
811
812RSFNC
813encap only
814capab: RSFNC
815encap target: single server
816source: services server
eda3590e 817parameters: target user, new nickname, new nickTS, old nickTS
cdff8b70
JT
818
819Forces a nickname change and propagates it.
820
821The command is ignored if the nick TS of the user is not equal to the old
822nickTS parameter. If the new nickname already exists (and is not the target
823user), it is killed first.
824
825SASL
826charybdis TS6
827encap only
8281.
829encap target: *
830source: server
831parameters: source uid, '*', 'S', sasl mechanism name
832
833Requests that a SASL agent (a service) initiate the authentication process.
834The source uid is that of an unregistered client. This is why it is not sent
835as the prefix.
836
8372.
838encap target: single server
839source: server
840parameters: source uid, target uid, mode, data
841
842Part of a SASL authentication exchange. The mode is 'C' to send some data
9337f5ce 843(base64 encoded), or 'D' to end the exchange (data indicates type of
cdff8b70
JT
844termination: 'A' for abort, 'F' for authentication failure, 'S' for
845authentication success).
846
0ee833da
SA
8473.
848encap target: *
849source: server
850parameters: source uid, '*', 'H', hostname, ip, tls
851
852Provides information on a client. The "tls" data is either 'P' for a
853plaintext connection or any other string for a TLS connection.
854The source uid is that of an unregistered client. This is why it is not sent
855as the prefix.
856
cdff8b70
JT
857SAVE
858capab: SAVE
859source: server
860propagation: broadcast
861parameters: target uid, TS
862
863Resolve a nick collision by changing a nickname to the UID.
864
865The server should verify that the UID belongs to a registered user, the user
866does not already have their UID as their nick and the TS matches the user's
867nickTS. If not, drop the message.
868
869SAVE should be propagated as a regular NICK change to links without SAVE capab.
870present.
871
872SERVER
8731.
874source: unregistered server
875parameters: server name, hopcount, server description
876
877Registers the connection as a server. PASS and CAPAB must have been sent
878before, SVINFO should be sent afterwards.
879
880If there is no such server configured or authentication failed, the connection
881should be dropped.
882
883This is propagated as a SID message.
884
8852.
886source: server
887propagation: broadcast
888parameters: server name, hopcount, server description
889
890Introduces a new TS5 server, directly connected to the source of this command.
891This is only used for jupes as TS5 servers may do little else than existing.
892
893SID
894source: server
895propagation: broadcast
896parameters: server name, hopcount, sid, server description
897
898Introduces a new server, directly connected to the source of this command.
899
900SIGNON
901source: user
902propagation: broadcast
903parameters: new nickname, new username, new visible hostname, new nickTS, new login name
904
905Broadcasts a change of several user parameters at once.
906
907Currently only sent after an SVSLOGIN.
908
909SJOIN
910source: server
911propagation: broadcast
ef861b05 912parameters: channelTS, channel, simple modes, opt. mode parameters..., nicklist
cdff8b70
JT
913
914Broadcasts a channel creation or bursts a channel.
915
916The nicklist consists of users joining the channel, with status prefixes for
917their status ('@+', '@', '+' or ''), for example:
918'@+1JJAAAAAB +2JJAAAA4C 1JJAAAADS'. All users must be behind the source server
919so it is not possible to use this message to force users to join a channel.
920
921The interpretation depends on the channelTS and the current TS of the channel.
922If either is 0, set the channel's TS to 0 and accept all modes. Otherwise, if
923the incoming channelTS is greater (newer), ignore the incoming simple modes
924and statuses and join and propagate just the users. If the incoming channelTS
925is lower (older), wipe all modes and change the TS, notifying local users of
926this but not servers (invites may be cleared). In the latter case, kick on
927split riding may happen: if the key (+k) differs or the incoming simple modes
928include +i, kick all local users, sending KICK messages to servers.
929
2d042188
JT
930An SJOIN is propagated with the new TS and modes of the channel. The statuses
931are propagated if and only if they were accepted.
932
cdff8b70
JT
933SJOIN must be used to propagate channel creation and in netbursts. For regular
934users joining channels, JOIN must be used. Pseudoservers may use SJOIN to join
935a user with ops.
936
937SNOTE
938charybdis TS6
939encap only
940source: server
941parameters: snomask letter, text
942
943Sends the text as a server notice from the source server to opers with the
944given snomask set.
945
946SQUIT
947parameters: target server, comment
948
949Removes the target server and all servers and users behind it from the network.
950
951If the target server is the receiving server or the local link this came from,
952this is an announcement that the link is being closed.
953
954Otherwise, if the target server is locally connected, the server should send
955a WALLOPS announcing the SQUIT.
956
957STATS
958source: user
959parameters: stats letter, hunted
960
961Remote STATS request. Privileges are checked on the server executing the
962actual request.
963
964SU
965encap only
966encap target: *
967source: services server
968parameters: target user, new login name (optional)
969
970If the new login name is not present or empty, mark the target user as not
971logged in, otherwise mark the target user as logged in as the given account.
972
973SVINFO
974source: server
975propagation: none
976parameters: current TS version, minimum TS version, '0', current time
977
978Verifies TS protocol compatibility and clock. If anything is not in order,
979the link is dropped.
980
981The current TS version is the highest version supported by the source server
982and the minimum TS version is the lowest version supported.
983
984The current time is sent as a TS in the usual way.
985
986SVSLOGIN
987charybdis TS6
988encap only
989encap target: single server
990source: services server
991parameters: target, new nick, new username, new visible hostname, new login name
992
993Sent after successful SASL authentication.
994
995The target is a UID, typically an unregistered one.
996
997Any of the "new" parameters can be '*' to leave the corresponding field
998unchanged. The new login name can be '0' to log the user out.
999
1000If the UID is registered on the network, a SIGNON with the changes will be
1001broadcast, otherwise the changes will be stored, to be used when registration
1002completes.
1003
1004TB
3e0bb80a 1005capab: TB
cdff8b70
JT
1006source: server
1007propagation: broadcast
3e0bb80a
JT
1008parameters: channel, topicTS, opt. topic setter, topic
1009
1010Propagates a channel topic as part of a burst.
1011
1012If the channel had no topic yet or the topicTS in the message is older than
1013the topicTS of the current topic on the channel and the topics differ, set
1014the topic with topicTS and topic setter, and propagate the message. Otherwise
1015ignore the message and do not propagate it.
1016
1017If the topic setter is not present, use a server name instead.
cdff8b70
JT
1018
1019TIME
1020source: user
1021parameters: hunted
1022
1023Remote TIME request.
1024
1025TMODE
1026source: any
1027parameters: channelTS, channel, cmode changes, opt. cmode parameters...
1028
1029Propagates a channel mode change.
1030
1031If the channelTS is greater (newer) than the current TS of the channel, drop
1032the message.
1033
1034On input, only the limit on parameters per line restricts how many cmode
1035parameters can be present. Apart from this, arbitrary modes shall be
1036processed. Redundant modes may be dropped. For example, +n-n may be applied and
1037propagated as +n-n, -n or (if the channel was already -n) nothing, but not as
1038+n.
1039
1040The parameter for mode -k (removing a key) shall be ignored.
1041
1042On output, at most ten cmode parameters should be sent; if there are more,
1043multiple TMODE messages should be sent.
1044
1045TOPIC
1046source: user
1047propagation: broadcast
3e0bb80a 1048parameters: channel, topic
cdff8b70
JT
1049
1050Propagates a channel topic change. The server may verify that the source has
1051ops in the channel.
1052
3e0bb80a
JT
1053The topicTS shall be set to the current time and the topic setter shall be
1054set indicating the source user. Note that this means that the topicTS of a
1055topic set with TOPIC is not necessarily consistent across the network.
1056
cdff8b70
JT
1057TRACE
1058source: user
10591.
1060parameters: hunted
1061
1062Performs a trace to the target, sending 200 numerics from each server passing
1063the message on. The target server sends a description of the target followed
1064by a 262 numeric.
1065
1066TRACE, STATS l and STATS L are the only commands using hunt_server that use the
1067hunted parameter for more than just determining which server the command
1068should be executed on.
1069
10702.
1071parameters: target name, hunted
1072
1073Executes a trace command on the target server. No 200 numerics are sent.
1074The target name is a name, not a UID, and should be on the target server.
1075
1076UID
1077source: server
1078propagation: broadcast
1079parameters: nickname, hopcount, nickTS, umodes, username, visible hostname, IP address, UID, gecos
1080propagation: broadcast
1081
1082Introduces a client. The client is on the source server of this command.
1083
755c144e
JT
1084The IP address MUST be '0' (a zero) if the true address is not sent such as
1085because of a spoof. Otherwise, and if there is no dynamic spoof (ENCAP
1086REALHOST, charybdis TS6 only), the IP address MAY be shown to normal users.
1087
cdff8b70
JT
1088Nick TS rules apply.
1089
1090UNDLINE
1091charybdis TS6
1092encap only
1093source: user
1094parameters: mask
1095
1096Removes a D:line (IP ban checked directly after accepting connection).
1097
1098The mask must be an IP address or CIDR mask.
1099
1100UNKLINE
11011.
1102encap only
1103source: user
1104parameters: user mask, host mask
1105
1106Removes a K:line (ban on user@host).
1107
11082.
1109capab: UNKLN
1110source: user
1111parameters: target server mask, user mask, host mask
1112
1113As form 1, deprecated.
1114
1115UNRESV
11161.
1117encap only
1118source: user
1119parameters: mask
1120
1121Removes a RESV.
1122
11232.
1124capab: CLUSTER
1125source: user
1126parameters: target server mask, mask
1127
1128As form 1, deprecated.
1129
1130UNXLINE
11311.
1132encap only
1133source: user
1134parameters: mask
1135
1136Removes an X:line (ban on realname).
1137
11382.
1139capab: CLUSTER
1140source: user
1141parameters: target server mask, mask
1142
1143As form 1, deprecated.
1144
1145USERS
1146source: user
1147parameters: hunted
1148
1149Remote USERS request.
1150
1151VERSION
1152source: any
1153parameters: hunted
1154
1155Remote VERSION request.
1156
1157WALLOPS
11581.
1159source: user
1160parameters: message
1161propagation: broadcast
1162
1163In efnet TS6, sends a message to operators (with umode +z set). This is a
1164deprecated equivalent to OPERWALL.
1165
1166In charybdis TS6, sends a message to local users with umode +w set (or possibly
1167another indication that WALLOPS messages should be sent), including non-opers.
1168
11692.
1170source: server
1171parameters: message
1172propagation: broadcast
1173
1174Sends a message to local users with umode +w set (or possibly another
1175indication that WALLOPS messages should be sent).
1176
1177In efnet TS6 this may include non-opers, in charybdis TS6 this may only be
1178sent to opers.
1179
1180WHOIS
1181source: user
1182parameters: hunted, target nick
1183
1184Remote WHOIS request.
1185
7a9a9000
JT
1186WHOWAS
1187source: user
1188parameters: nickname, limit, hunted
1189
1190Remote WHOWAS request. Not implemented in all servers.
1191
1192Different from a local WHOWAS request, the limit is mandatory and servers should
1193apply a maximum to it.
1194
cdff8b70
JT
1195XLINE
11961.
1197encap only
1198source: user
1199parameters: duration, mask, reason
1200
1201Sets an X:line (ban on realname).
1202
12032.
1204capab: CLUSTER
1205source: user
1206parameters: target server mask, duration, mask, reason
1207
1208As form 1, deprecated.
1209
1210Local only commands (charybdis 3.1):
1211
1212ACCEPT
1213AUTHENTICATE
1214CAP
1215CHALLENGE
1216CHANTRACE
1217CLOSE
cdff8b70
JT
1218DIE
1219GET
1220HELP
1221ISON
1222LIST
cdff8b70
JT
1223MAP
1224MASKTRACE
1225MODLIST
1226MODLOAD
1227MODRELOAD
1228MODRESTART
1229MODUNLOAD
1230MONITOR
1231NAMES
cdff8b70
JT
1232POST
1233PUT
1234RESTART
1235SCAN
1236SET
1237TESTGECOS
1238TESTLINE
1239TESTMASK
1240UHELP
1241UNREJECT
1242USER
1243USERHOST
1244WEBIRC
1245WHO
1246WHOWAS