]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - doc/technical/ts6-protocol.txt
Changed version to shadowircd 6.0.0-dev. Going to work on
[irc/rqf/shadowircd.git] / doc / technical / ts6-protocol.txt
index 2a7fbb5f560c8e76587ced68b41fdc1cf5dd04ac..d86e34c0266f182c71d0b9a2dfab5b90ece3a1f9 100644 (file)
@@ -21,13 +21,27 @@ the function hunt_server(). Any rate limiting should be done locally.
 duration: a parameter type used for ban durations. It is a duration in seconds.
 A value of 0 means a permanent ban.
 
-propagation: to which other servers the command is sent. For all commands
-with a hunted parameter, the propagation is determined by that, and not
-otherwise specified. Propagation broadcast means the command is sent to all
-servers. Propagation one-to-one means the command is only sent to the target
-or the server the target is on. Propagation none means the command is never
-sent to another server if it is received. For some other commands, the
-propagation depends on the parameters and is described in text.
+propagation: to which other servers the command is sent
+
+For all commands with a hunted parameter, the propagation is determined by
+that, and not otherwise specified.
+
+For all commands with a target server mask parameter, the propagation is
+determined by that, and not otherwise specified. The command is sent to all
+servers with names matching the given mask (for example '*', '*.example.com',
+'irc.example.com'). Those servers do not have to be directly connected.
+Targets cannot be SIDs.
+
+Propagation broadcast means the command is sent to all servers.
+
+Propagation one-to-one means the command is only sent to the target or the
+server the target is on.
+
+Propagation none means the command is never sent to another server if it is
+received.
+
+For some other commands, the propagation depends on the parameters and is
+described in text.
 
 services server: server mentioned in a service{} block. There are no services
 servers on EFnet.
@@ -66,8 +80,8 @@ statuses
 +v (prefix +) (voice)
 type A
 +b (ban)
-+e (ban exception)
-+I (invite exception)
++e (ban exception) (capab: EX)
++I (invite exception) (capab: IE)
 type B
 +k (key: password required to join, <= 23 ascii chars, no : or , or whitespace)
 type C
@@ -76,7 +90,7 @@ type D
 +m (moderated)
 +n (no external messages)
 +p (private: does not appear in /whois to non-members, no /knock allowed)
-+r (only registered users may join) (only if a services server exists)
++r (only registered users may join) (only if a services server exists) (capab: SERVICES)
 +s (secret)
 +t (only chanops may change topic)
 (charybdis TS6)
@@ -94,6 +108,29 @@ type D
 +g (allow any member to /invite)
 +z (send messages blocked by +m to chanops)
 
+<numeric>
+source: server
+parameters: target, any...
+
+The command name should be three decimal ASCII digits.
+
+Propagates a "numeric" command reply, such as from a remote WHOIS request.
+
+If the first digit is 0 (indicating a reply about the local connection), it
+should be changed to 1 before propagation or sending to a user.
+
+Numerics to the local server may be sent to opers.
+
+To avoid infinite loops, servers should not send any replies to numerics.
+
+The target can be:
+- a client
+  propagation: one-to-one
+- a channel name
+  propagation: all servers with -D users on the channel
+
+Numerics to channels are broken in some older servers.
+
 ADMIN
 source: user
 parameters: hunted
@@ -172,11 +209,10 @@ ENCAP
 source: any
 parameters: target server mask, subcommand, opt. parameters...
 
-Sends a command to all servers with names matching the given mask (for example
-'*', '*.example.com', 'irc.example.com'). Those servers do not have to be
-directly connected. Targets cannot be SIDs.
+Sends a command to matching servers. Propagation is independent of
+understanding the subcommand.
 
-Propagation is independent of understanding the subcommand.
+Subcommands are listed elsewhere with "encap only".
 
 ERROR
 source: server or unregistered server
@@ -220,6 +256,41 @@ parameters: space separated capability list
 
 Capability list of remote server.
 
+GLINE
+efnet TS6
+capab: GLN
+source: user
+parameters: user mask, host mask, reason
+propagation: broadcast
+
+Propagates a G:line vote. Once votes from three different opers (based on
+user@host mask) on three different servers have arrived, trigger the G:line.
+Pending G:lines expire after some time, usually ten minutes. Triggered G:lines
+expire after a configured time which may differ across servers.
+
+Requests from server connections must be propagated, unless they are found to
+be syntactically invalid (e.g. '!' in user mask). Therefore, disabling glines
+must not affect propagation, and too wide glines, double votes and glines that
+already exist locally must still be propagated.
+
+Of course, servers are free to reject gline requests from their own operators.
+
+GUNGLINE
+efnet TS6
+encap only
+encap target: *
+source: user
+parameters: user mask, host mask, reason
+propagation: broadcast
+
+Propagates a G:line removal vote. Once three votes have arrived (as with
+G:lines), remove the G:line. Pending G:lines removals expire after some time,
+usually ten minutes.
+
+Pending G:line removals do not interact with pending G:lines. Triggering a
+G:line does not affect a pending G:line removal. Triggering a G:line removal
+does not affect a pending G:line.
+
 INFO
 source: user
 parameters: hunted
@@ -257,6 +328,8 @@ exists and has a greater (newer) TS, wipe all simple modes and statuses and
 change the TS, notifying local users of this but not servers (note that
 ban-like modes remain intact; invites may or may not be cleared).
 
+A JOIN is propagated with the new TS of the channel.
+
 KICK
 source: any
 parameters: channel, target user, opt. reason
@@ -295,6 +368,7 @@ parameters: target server mask, duration, user mask, host mask, reason
 As form 1, deprecated.
 
 KNOCK
+capab: KNOCK
 source: user
 parameters: channel
 propagation: broadcast
@@ -404,6 +478,9 @@ parameters: msgtarget, message
 As PRIVMSG, except NOTICE messages are sent out, server sources are permitted
 and most error messages are suppressed.
 
+Servers may not send '$$', '$#' and opers@server notices. Older servers may
+not allow servers to send to specific statuses on a channel.
+
 OPERSPY
 encap only
 encap target: *
@@ -466,7 +543,11 @@ The target can be:
   remotely)
 - a status character ('@'/'+') followed by a channel name, to send to users
   with that status or higher only.
+  capab: CHW
   propagation: all servers with -D users with appropriate status
+- '=' followed by a channel name, to send to chanops only, for cmode +z.
+  capab: CHW and EOPMOD
+  propagation: all servers with -D chanops
 - a user@server message, to send to users on a specific server. The exact
   meaning of the part before the '@' is not prescribed, except that "opers"
   allows IRC operators to send to all IRC operators on the server in an
@@ -474,9 +555,14 @@ The target can be:
   propagation: one-to-one
 - a message to all users on server names matching a mask ('$$' followed by mask)
   propagation: broadcast
+  Only allowed to IRC operators.
 - a message to all users with hostnames matching a mask ('$#' followed by mask).
   Note that this is often implemented poorly.
   propagation: broadcast
+  Only allowed to IRC operators.
+
+In charybdis TS6, services may send to any channel and to statuses on any
+channel.
 
 PRIVS
 charybdis TS6
@@ -635,6 +721,9 @@ this but not servers (invites may be cleared). In the latter case, kick on
 split riding may happen: if the key (+k) differs or the incoming simple modes
 include +i, kick all local users, sending KICK messages to servers.
 
+An SJOIN is propagated with the new TS and modes of the channel. The statuses
+are propagated if and only if they were accepted.
+
 SJOIN must be used to propagate channel creation and in netbursts. For regular
 users joining channels, JOIN must be used. Pseudoservers may use SJOIN to join
 a user with ops.
@@ -707,9 +796,19 @@ broadcast, otherwise the changes will be stored, to be used when registration
 completes.
 
 TB
+capab: TB
 source: server
 propagation: broadcast
-parameters:
+parameters: channel, topicTS, opt. topic setter, topic
+
+Propagates a channel topic as part of a burst.
+
+If the channel had no topic yet or the topicTS in the message is older than
+the topicTS of the current topic on the channel and the topics differ, set
+the topic with topicTS and topic setter, and propagate the message. Otherwise
+ignore the message and do not propagate it.
+
+If the topic setter is not present, use a server name instead.
 
 TIME
 source: user
@@ -740,10 +839,15 @@ multiple TMODE messages should be sent.
 TOPIC
 source: user
 propagation: broadcast
+parameters: channel, topic
 
 Propagates a channel topic change. The server may verify that the source has
 ops in the channel.
 
+The topicTS shall be set to the current time and the topic setter shall be
+set indicating the source user. Note that this means that the topicTS of a
+topic set with TOPIC is not necessarily consistent across the network.
+
 TRACE
 source: user
 1.