]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - doc/technical/ts6.txt
Mention that @#chan/+#chan requires CHW capab.
[irc/rqf/shadowircd.git] / doc / technical / ts6.txt
index 516d3730585fa7033dfc835de977034055ac9960..7f82df513c701bcbe35e326d5c595a770d3232eb 100644 (file)
@@ -1,11 +1,35 @@
-$Id: ts6.txt 6 2005-09-10 01:02:21Z nenolod $
+$Id: ts6.txt 3211 2007-02-20 00:34:28Z jilles $
 
-TS6 Proposal (v7)
+TS6 Proposal (v8)
 Written by Lee H <lee@leeh.co.uk>
 Ideas borrowed heavily from ircnet (Beeth, jv, Q)
 
-Introduction
-------------
+- Changes between v7 and v8 -
+-----------------------------
+
+In the v7 specification, the JOIN command included the channel modes of a
+channel, and acted on them following TS rules.  In the v8 specification,
+JOIN will never send modes.
+
+Desyncs can occur both when they are sent and when they are not.  If they
+are sent, then you can have a situation where a user on one side of the
+network issues "MODE #channel -l", and a user on another side of the network
+issues "JOIN #channel" whilst the +l still exists.  As the JOIN string sent 
+server<->server includes the full modes at the time of the user joining, 
+this will propagate the +l, but there is a -l crossing in the other
+direction.  Desync will occur beyond where they intersect.
+
+If the modes are not sent, then a lower TS JOIN command, or a JOIN command
+that creates a channel will cause a desync.
+
+It is judged that the desync with sending the modes is worse than the desync
+by not sending them, as such the v8 specification dictates modes are not
+sent with a JOIN command server<->server.
+
+The v8 specification also clarifies that servers may issue TMODE.
+
+- Introduction -
+----------------
 
 This document aims to fix some of the flaws that are still present in the
 current TS system.
@@ -28,8 +52,8 @@ issue a mode during a netburst and the mode will be set on the server
 we are bursting to.
 
 
-Definitions
------------
+- Definitions -
+---------------
 
 Throughout this document, the following terms are used:
 
@@ -43,8 +67,8 @@ UID     - An ID concateneted to a SID.  This forms the clients UID.
 TS6     - The TS version 6.
 
 
-Support
--------
+- Support -
+-----------
 
 Support for this document is given by the TS version 6.
 
@@ -60,8 +84,8 @@ http://www.leeh.co.uk/ircd/encap.txt
 The TS6 protocol does not supports masked entities.
 
 
-Nick TS rules
--------------
+- Nick TS rules -
+-----------------
 
 A server receiving a command that requires nick TS rules must check for a
 collision between an existing user, and the nick in the received message.
@@ -81,8 +105,8 @@ clients user@host are different it will collide the new user and drop the
 message.
 
 
-Nick TS collisions
-------------------
+- Nick TS collisions -
+----------------------
 
 If both users are to be collided, we must issue a KILL for the existing 
 user to all servers.  If the new user has a UID then we must also issue a 
@@ -98,8 +122,8 @@ If only the new user is being collided, we must issue a KILL for the new user
 back to the server sending us data if the new user has a UID.
 
 
-Channel TS rules
-----------------
+- Channel TS rules -
+--------------------
 
 A server receiving a command that requires normal channel TS rules must 
 apply the following rules to the command.
@@ -125,8 +149,8 @@ losing their op (+o) status who do not have a UID as 'deopped'.  A server must
 ignore any "MODE" commands from a user marked as 'deopped'.
 
 
-Simple channel TS rules
------------------------
+- Simple channel TS rules -
+---------------------------
 
 A server receiving a command that requires simple channel TS rules must
 apply the following rules to the command.
@@ -139,11 +163,11 @@ Simple channel TS rules do not affect current modes in the channel except
 for the modes we are accepting.
 
 
-The following commands are defined here as the TS6 protocol
------------------------------------------------------------
+- The following commands are defined here as the TS6 protocol -
+---------------------------------------------------------------
 
-PASS:
-PASS <PASSWORD> TS <TS_CURRENT> :<SID>
+- PASS -
+       PASS <PASSWORD> TS <TS_CURRENT> :<SID>
 
 This command is used for password verification with the server we are
 connecting to.
@@ -156,8 +180,8 @@ The <PASSWORD> field is the password we have stored for this server,
 <TS_CURRENT> is our current TS version.  If this field is not present then
 the server does not support TS6.  <SID> is the SID of the server.
 
-UID:
-:<SID> UID <NICK> <HOPS> <TS> +<UMODE> <USERNAME> <HOSTNAME> <IP> <UID> :<GECOS>
+- UID -
+       :<SID> UID <NICK> <HOPS> <TS> +<UMODE> <USERNAME> <HOSTNAME> <IP> <UID> :<GECOS>
 
 This command is used for introducing clients to the network.
 
@@ -176,8 +200,8 @@ clients UID.  The <GECOS> field is the clients gecos.
 
 A server receiving a UID command must apply nick TS rules to the nick.
 
-SID:
-:<SID> SID <SERVERNAME> <HOPS> <SID> :<GECOS>
+- SID -
+       :<SID> SID <SERVERNAME> <HOPS> <SID> :<GECOS>
 
 This command is used for introducing servers to the network.
 
@@ -196,8 +220,8 @@ connected server through which the command was received.
 Client and servers which do not have a UID/SID must be introduced by old
 methods.
 
-SJOIN:
-:<SID> SJOIN <TS> <CHANNAME> +<CHANMODES> :<UIDS>
+- SJOIN -
+       :<SID> SJOIN <TS> <CHANNAME> +<CHANMODES> :<UIDS>
 
 This command is used for introducing users to channels.
 
@@ -216,23 +240,28 @@ to introduce a single user to an existing channel.  It must instead
 use the "JOIN" command defined in this specification.  A TS6 server must
 still use SJOIN for creating channels.
 
-JOIN:
-:<UID> JOIN <TS> <CHANNAME> +<CHANMODES>
+- JOIN -
+       :<UID> JOIN <TS> <CHANNAME> +
 
 This command is used for introducing one user unopped to an existing channel.
 
 The <UID> field is the UID of the client joining the channel.  The
 <TS> field is the channels current TS, <CHANNAME> is the channels
-current name, <CHANMODES> are the channels current modes.
+current name.
 
 A server receiving a JOIN must apply normal channel TS rules to the JOIN.
 
+No channel modes are sent with the JOIN command.  In previous versions of
+this specification, the "+" parameter contained the channels current modes.
+A server following this version of the specification must not interpret this
+argument and must not propagate any value other than "+" for this parameter.
+
 It should be noted that whilst JOIN would not normally create a 
-channel, during specific race conditions it can.  This can create
-a ban desync that this specification does not rectify.
+channel or lower the timestamp, during specific conditions it can.  This 
+can create a desync that this specification does not rectify.
 
-BMASK:
-:<SID> BMASK <TS> <CHANNAME> <TYPE> :<MASKS>
+- BMASK -
+       :<SID> BMASK <TS> <CHANNAME> <TYPE> :<MASKS>
 
 This command is used for bursting channel bans to a network.
 
@@ -253,17 +282,18 @@ It should be noted however, that a BMASK with a lower TS should
 not be possible without a desync, due to it being sent after
 SJOIN.
 
-TMODE:
-:<UID> TMODE <TS> <CHANNAME> <MODESTRING>
+- TMODE -
+       :<SID|UID> TMODE <TS> <CHANNAME> <MODESTRING>
 
 This command is used for clients issuing modes on a channel.
 
-<UID> is the UID of the client setting the mode.  <TS> is the
-current TS of the channel, <CHANNAME> is the channels name.
-<MODESTRING> is the raw mode the client is setting.
+<SID|UID> is either the UID of the client setting the mode, or the SID of
+the server setting the mode.  <TS> is the current TS of the channel, 
+<CHANNAME> is the channels name. <MODESTRING> is the raw mode the client is 
+setting.
 
 A server receiving a TMODE must apply simple channel TS rules to the TMODE.
 
-A TS6 server must translate MODEs issued by a local client into TMODE 
-to send to other TS6 capable servers.
+A TS6 server must translate MODEs issued by a local client, or received from
+a server into TMODE to send to other TS6 capable servers.