]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - doc/technical/ts6-protocol.txt
Allow the final parameter of MLOCK to be empty, to remove an existing mlock
[irc/rqf/shadowircd.git] / doc / technical / ts6-protocol.txt
index 4883420159c032a99c2e107e9a239167eff3bfbd..64beadbb1e9f1ff5c526e829149d8eb75e1375fd 100644 (file)
@@ -55,10 +55,10 @@ send its own PASS, CAPAB and SERVER messages, followed by SVINFO and the burst.
 Upon receiving the SERVER, the initiator will send SVINFO and the burst. If
 ziplinks are used, SVINFO is the first compressed message.
 
-The burst consists of SID and SERVER messages for all known servers, UID or
-EUID messages for all known users (possibly followed by ENCAP REALHOST, ENCAP
-LOGIN and/or AWAY) and SJOIN messages for all known channels (possibly followed
-by BMASK and/or TB).
+The burst consists of SID and SERVER messages for all known servers, BAN
+messages for all propagated bans, UID or EUID messages for all known users
+(possibly followed by ENCAP REALHOST, ENCAP LOGIN and/or AWAY) and SJOIN
+messages for all known channels (possibly followed by BMASK and/or TB).
 
 user modes:
 (all)
@@ -80,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
@@ -90,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)
@@ -148,6 +148,45 @@ Otherwise, mark the user as away.
 Changing away reason from one non-empty string to another non-empty string
 may not be propagated.
 
+BAN
+charybdis TS6
+capab: BAN
+source: any
+propagation: broadcast (restricted)
+parameters: type, user mask, host mask, creation TS, duration, lifetime, oper, reason
+
+Propagates a network wide ban.
+
+The type is K for K:lines, R for resvs and X for X:lines; other types are
+reserved. The user mask field is only used for K:lines; for resvs and X:lines
+the field is ignored in input and sent as an asterisk.
+
+The creation TS indicates when this ban was last modified. An incoming ban MUST
+be ignored and not propagated if the creation TS is older than the creation TS
+of the current ban. If the ban is identical, it SHOULD NOT be propagated to
+avoid unnecessary network traffic. (Two changes to bans that set the TS to the
+same value may cause desynchronization.)
+
+The duration is 0 for an unban and relative to the creation TS for a ban.
+When the duration has passed, the ban is no longer active but it may still
+be necessary to remember it.
+
+The lifetime is relative to the creation TS and indicates for how long this
+ban needs to be remembered and propagated. This MUST be at least the duration.
+Initially, it is usually set the same as the duration but when the ban is
+modified later, it SHOULD be set such that the modified ban is remembered at
+least as long as the original ban. This ensures that the original ban does not
+revive via split servers. This requirement is only a SHOULD to allow for
+implementations that only inject bans and do not remember any; implementations
+that remember and propagate bans MUST set the lifetime appropriately.
+
+The oper field indicates the oper that originally set the ban. If this message
+is the initial propagation of a change, it SHOULD be sent as * (an asterisk).
+
+The reason field indicates the reason for the ban. Any part after a | (vertical
+bar) MUST NOT be shown to normal users. The rest of the field and the creation
+TS and duration MAY be shown to normal users.
+
 BMASK
 source: server
 propagation: broadcast
@@ -368,6 +407,7 @@ parameters: target server mask, duration, user mask, host mask, reason
 As form 1, deprecated.
 
 KNOCK
+capab: KNOCK
 source: user
 parameters: channel
 propagation: broadcast
@@ -414,6 +454,28 @@ parameters: server mask, hunted
 
 Remote LUSERS request. Most servers ignore the server mask, treating it as '*'.
 
+MLOCK
+charybdis TS6
+source: services server
+parameters: channelTS, channel, cmode changes, opt. cmode parameters...
+propagation: broadcast (restricted)
+
+Propagates a channel mode lock change.  
+
+If the channelTS is greater (newer) than the current TS of the channel, drop
+the message.
+
+On input, only the limit on parameters per line restricts how many cmode
+parameters can be present. Apart from this, arbitrary modes shall be
+processed. Redundant modes may be dropped. For example, +n-n may be applied and
+propagated as +n-n, -n or (if the channel was already -n) nothing, but not as
++n.
+
+The parameter for mode -k (removing a key) shall be ignored.
+
+An MLOCK message with no modes disables the MLOCK, therefore the MLOCK message
+always contains the literal MLOCK for simplicity.
+
 MODE
 1.
 source: user
@@ -795,9 +857,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
@@ -828,10 +900,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.