<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Satomi+Ahn</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Satomi+Ahn"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Satomi_Ahn"/>
	<updated>2026-06-04T23:35:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/Satomi%27s_Damn_Fast_Relay&amp;diff=1195845</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/Satomi&#039;s Damn Fast Relay</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/Satomi%27s_Damn_Fast_Relay&amp;diff=1195845"/>
		<updated>2015-03-17T09:07:08Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Satomi&amp;#039;s Damn Fast Relay */  (Did wiki syntax change?)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Restrained Love Open Relay Group TOC}}&lt;br /&gt;
&lt;br /&gt;
= Satomi&#039;s Damn Fast Relay =&lt;br /&gt;
&lt;br /&gt;
This is the shortest known implementation of an ORG compliant relay.&lt;br /&gt;
&lt;br /&gt;
This relay only makes the minimal verifications (no ask mode, no distance checks, ping on relog only but safe-word on touch). &lt;br /&gt;
&lt;br /&gt;
Code is under a BSD-style license, feel free to use in your own projects, provided you credit Satomi Ahn for the original script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//Damn Fast Relay, by Satomi Ahn&lt;br /&gt;
//&lt;br /&gt;
//This is a minimalist RLV Relay intended for laggy playgrounds, with the aim of making the answer to scan requests as fast as possible and decreasing the global lag.&lt;br /&gt;
//It only features the auto-accept mode but tries to fully comply to ORG 003 specifications.&lt;br /&gt;
//Touching the relay will make it release restrictions and reset (in other words: safewording).&lt;br /&gt;
//&lt;br /&gt;
//This script is provided as-is with mo guarrantee whatsoever.&lt;br /&gt;
//Feel free to use the code in anyway you want, provided you credit the original author, ie: myself, Satomi Ahn.&lt;br /&gt;
//(can be seen as a BSD-style license)&lt;br /&gt;
&lt;br /&gt;
integer rlvrc = -1812221819;&lt;br /&gt;
key source = NULL_KEY;&lt;br /&gt;
key wearer = NULL_KEY;&lt;br /&gt;
integer viewerlistener;&lt;br /&gt;
key sitid;&lt;br /&gt;
list restrictions = [];&lt;br /&gt;
&lt;br /&gt;
release(key id) {&lt;br /&gt;
    llOwnerSay(&amp;quot;@clear&amp;quot;);&lt;br /&gt;
    llRegionSayTo(id, rlvrc, &amp;quot;release,&amp;quot;+(string)id+&amp;quot;,!release,ok&amp;quot;);&lt;br /&gt;
    llResetScript();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default {&lt;br /&gt;
    state_entry() {&lt;br /&gt;
        wearer = llGetOwner();&lt;br /&gt;
        llListen(rlvrc,&amp;quot;&amp;quot;, NULL_KEY, &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number) {&lt;br /&gt;
        llOwnerSay(&amp;quot;Now safewording. Restrictions will be removed and the relay reset.&amp;quot;);&lt;br /&gt;
        release(source);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    listen(integer c, string w, key id, string msg) {&lt;br /&gt;
        if (c == 12345) {&lt;br /&gt;
            if (msg) sitid = (key) msg;&lt;br /&gt;
            llListenRemove(viewerlistener);&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if (source) { if (source != id) return; } // already grabbed by another device&lt;br /&gt;
        list args = llParseStringKeepNulls(msg,[&amp;quot;,&amp;quot;],[]);&lt;br /&gt;
        if (llGetListLength(args)!=3) return;&lt;br /&gt;
        if (llList2Key(args,1)!=wearer &amp;amp;&amp;amp; llList2Key(args, 1)!=(key)&amp;quot;ffffffff-ffff-ffff-ffff-ffffffffffff&amp;quot;) return;&lt;br /&gt;
        string ident = llList2String(args,0);&lt;br /&gt;
        list commands = llParseString2List(llList2String(args,2),[&amp;quot;|&amp;quot;],[]);&lt;br /&gt;
        integer i;&lt;br /&gt;
        string command;&lt;br /&gt;
        integer nc = llGetListLength(commands);&lt;br /&gt;
        for (i=0; i&amp;lt;nc; ++i) {&lt;br /&gt;
            command = llList2String(commands,i);&lt;br /&gt;
            if (llGetSubString(command,0,0)==&amp;quot;@&amp;quot;) {&lt;br /&gt;
                llOwnerSay(command);&lt;br /&gt;
                llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,&amp;quot;+command+&amp;quot;,ok&amp;quot;);&lt;br /&gt;
                list subargs = llParseString2List(command, [&amp;quot;=&amp;quot;], []);&lt;br /&gt;
                string behav = llGetSubString(llList2String(subargs, 0), 1, -1);&lt;br /&gt;
                integer index = llListFindList(restrictions, [behav]);&lt;br /&gt;
                string comtype = llList2String(subargs, 1);                &lt;br /&gt;
                if (comtype == &amp;quot;n&amp;quot; || comtype == &amp;quot;add&amp;quot;) {&lt;br /&gt;
                    if (index == -1) restrictions += [behav];&lt;br /&gt;
                    if (behav == &amp;quot;unsit&amp;quot; &amp;amp;&amp;amp; llGetAgentInfo(wearer) &amp;amp; AGENT_SITTING) {&lt;br /&gt;
                        viewerlistener = llListen(12345, &amp;quot;&amp;quot;, wearer, &amp;quot;&amp;quot;);&lt;br /&gt;
                        llOwnerSay(&amp;quot;@getsitid=12345&amp;quot;);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                else if (comtype==&amp;quot;y&amp;quot; || comtype == &amp;quot;rem&amp;quot;) {&lt;br /&gt;
                    if (index != -1) restrictions = llDeleteSubList(restrictions, index, index);&lt;br /&gt;
                    if (behav == &amp;quot;unsit&amp;quot;) sitid = NULL_KEY;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            else if (command==&amp;quot;!pong&amp;quot;) {&lt;br /&gt;
                    llOwnerSay(&amp;quot;@sit:&amp;quot;+(string)sitid+&amp;quot;=force,&amp;quot;+llDumpList2String(restrictions, &amp;quot;=n,&amp;quot;)+&amp;quot;=n&amp;quot;);&lt;br /&gt;
                    llSetTimerEvent(0);&lt;br /&gt;
            }&lt;br /&gt;
            else if (command==&amp;quot;!version&amp;quot;) llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,!version,1100&amp;quot;);&lt;br /&gt;
            else if (command==&amp;quot;!implversion&amp;quot;) llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,!implversion,ORG=0003/Satomi&#039;s Damn Fast Relay v2&amp;quot;);&lt;br /&gt;
            else if (command==&amp;quot;!x-orgversions&amp;quot;) llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,!x-orgversions,ORG=0003&amp;quot;);&lt;br /&gt;
            else if (command==&amp;quot;!release&amp;quot;) release(id);&lt;br /&gt;
            else llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,&amp;quot;+command+&amp;quot;,ko&amp;quot;);            &lt;br /&gt;
        }&lt;br /&gt;
        if (restrictions) { source = id; llOwnerSay(&amp;quot;@detach=n&amp;quot;); }&lt;br /&gt;
        else { llOwnerSay(&amp;quot;@clear&amp;quot;); llResetScript(); }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    changed(integer c) {&lt;br /&gt;
        if (c &amp;amp; CHANGED_OWNER) llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    on_rez(integer i) {&lt;br /&gt;
        if (source) {&lt;br /&gt;
            llSleep(30);&lt;br /&gt;
            llRegionSayTo(source, rlvrc, &amp;quot;ping,&amp;quot;+(string)source+&amp;quot;,ping,ping&amp;quot;);&lt;br /&gt;
            llSetTimerEvent(30);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    timer() {&lt;br /&gt;
        llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:Limits&amp;diff=1168492</id>
		<title>Talk:Limits</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:Limits&amp;diff=1168492"/>
		<updated>2012-06-06T11:32:49Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Description Not True UTF8? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Needs substantiation ==&lt;br /&gt;
Various items moved here to keep the main page clean. These require a source and confirmation.&lt;br /&gt;
&lt;br /&gt;
* Building above 768m can cause prim drift, distortion, misalignment, shifting and general weirdness. For small/precise builds, it&#039;s best to work at a lower level.&lt;br /&gt;
** &#039;&#039;I&#039;m familiar with some of this, but please provide a reference — like a reproducible bug on the [[Issue Tracker]]. Otherwise, it&#039;s unsubstantiated. &amp;lt;font color=&amp;quot;#ff0080&amp;quot;&amp;gt;&#039;&#039;&#039;- [[Image:Torley-favicon.png]] [[User:Torley Linden|Torley]] on 2009-05-06 @ 6:01 AM PST&#039;&#039;&#039;&amp;lt;/font&amp;gt;&#039;&#039;&lt;br /&gt;
*** This could be related to http://jira.secondlife.com/browse/SVC-1170, but this describes &amp;quot;prim drift&amp;quot; not based on height.&lt;br /&gt;
&lt;br /&gt;
* Estate (private island) terraformability is settable to a max of +/-100 m by the estate owner or managers.&lt;br /&gt;
** &#039;&#039;However, baking the land will allow it to be raised to at least 300 m. haven&#039;t tested any higher.--[[User:Liny Odell|Liny Odell]] 03:11, 6 May 2009 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;FPS as high as 120 and more have been observed, but FPS above 70 mostly seem to occur at times of network instability. --[[User:Bayru Jiagu|Bayru Jiagu]]&#039;&#039;&lt;br /&gt;
** This isn&#039;t a limit, since the upper absolute isn&#039;t defined. &amp;lt;font color=&amp;quot;#ff0080&amp;quot;&amp;gt;&#039;&#039;&#039;- [[Image:Torley-favicon.png]] [[User:Torley Linden|Torley]] on 2009-10-07 @ 10:49 AM PST&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Ban List Limit ==&lt;br /&gt;
This page says that the number of people in an estate ban list is limited to 500.  As far as I know, it&#039;s been 300 for a year or so.  Did this change recently, maybe in the RC client? [[User:Lex Neva|Lex Neva]] 10:31, 5 July 2008 (PDT)&lt;br /&gt;
:I&#039;m not a pro on this so it is just a guess, but I would tend to think that the limit change would be connected to new simulator software, rather then to a new client, since the sim stores the list of people who aren&#039;t allowed to enter. The client is just displaying it(?)&lt;br /&gt;
:That beeing said, please browse to {{Jira|SVC-747}} and watch for the comment made by [[User:Seraph Linden|Seraph Linden]] at 11/Jan/08 07:59 AM&lt;br /&gt;
:Because of the date, in case it was a client issue, then it should be at least fixed since 1.19&lt;br /&gt;
:Greetz, =) [[User:Zai Lynch|Zai Lynch]]&amp;lt;sup&amp;gt;([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])&amp;lt;/sup&amp;gt; 11:29, 5 July 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Ban Altitude Limits ==&lt;br /&gt;
It looks very much as if these limits on the effective altitude of a ban don&#039;t apply when the parcel is a complete region. Whether this is intentional, or a side effect of the parcel boundary being a region boundary, I don&#039;t know. Since you can&#039;t see a banline  from the other side of a region boundary, something odd could be happening. [[User:WolfBaginski Bearsfoot|WolfBaginski Bearsfoot]] 17:40, 27 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Prim Size Limits ==&lt;br /&gt;
&lt;br /&gt;
I once saw instructions on how to make a prim that&#039;s larger than 10x10 but that the system considers to be 10x10.  It isn&#039;t a megaprim and anyone can do it.  It&#039;s a flat diamond shape.  Does anyone know how? --[[User:Shadoe Landman|Shadoe Landman]] 13:04, 6 July 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
You can create &amp;gt;10m disks from tubes, rings, and torii. Set the twist Twist at: Begin: 90, End: 90, and Hole Size at: X: 1.00, Y: 0.05. --[[User:McCabe Maxsted|McCabe Maxsted]] 23:38, 8 July 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
for the one the OP was talking about, I believe what you do is flatten a box, then set shear in both axes to the max (I always forget the name fo the parameter, is it really shear? the one that kinda tilts the prim without rotating it). I could swear I knew another trick beside these 2, can&#039;t remember right now :/ I think it involved twist, or perhaps this one I siad also needs you to make twist begin and end be 45 degrees, I&#039;m not sure now...I think there also used to be another one I can&#039;t remember right now, where if one of the axes (probably the Z, can&#039;t rememeber for sure) wasn&#039;t made flat, the prim wouldn&#039;t stretch to the maximum size achieved with that specific torture, I can&#039;t remember, oh wait, yeah, twist 45 degrees, then flatten in X or Y axis, for cubes only I believe --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 11:54, 17 July 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Avatars per region limits==&lt;br /&gt;
The limits on the number of avatars per region are soft limits, I beliece... i.e., if you have more than that many avis on the sim, the server slows down and crashes.  Is the larger number listed for a private estate sim caused by the fact that there are (typically) a very small number of other sims which can see that sim?  [[User:Tammy Nowotny|Tammy Nowotny]] 11:43, 15 July 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Region Name and Parcel Name Length Limits ==&lt;br /&gt;
&lt;br /&gt;
Any way we can get both of these added to the limits list?  Not sure what they are. -- [[User:Kenn Nilsson|Kenn Nilsson]] at 10:41 AM February 6th, 2009&lt;br /&gt;
:I added the max. parcel name length (63 characters). Don&#039;t know about max Region name length tho... [[Image:Zai_signature.png|45px]] &#039;&#039;&#039;[[User:Zai Lynch|Lynch]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 18:47, 6 February 2009 (UTC)&lt;br /&gt;
::Found the Region name limits in the KB. Although it might not be a technical limit, it&#039;s at least a limit via guidelines, see [[Linden_Lab_Official:Guidelines for Private Region Naming|Guidelines for Private Region Naming]]. The bar in Admin → God Tools accepts 63 characters tho. Dunno If they would be successfully saved in case one had the [[God mode|needed abilities]]...&lt;br /&gt;
::[[Image:Zai_signature.png|45px]] &#039;&#039;&#039;[[User:Zai Lynch|Lynch]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 02:57, 13 February 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== SLurls and (probably) the effects of converting integers to floating point numbers and back (Also: NOR rule for this article???) ==&lt;br /&gt;
&lt;br /&gt;
I&#039;d like to add the following, after &amp;quot;Absolute height limit&amp;quot;&lt;br /&gt;
:::* &#039;&#039;&#039;Highest z-value of an [[SLurl]], that will still teleport you to a positive altitude&#039;&#039;&#039; -  2147483583&lt;br /&gt;
:::** This is lower than the &#039;&#039;Absolute height limit&#039;&#039; above probably because of precision issues. Any value higher than 2147483583 would be rounded up to something beyond 2147483647 and thus cause an [http://en.wikipedia.org/wiki/Arithmetic_overflow overflow], while 2147483583 will still be rounded down to 2147483520 (see below).&lt;br /&gt;
:::* &#039;&#039;&#039;Highest altitude you can teleport to with an SLurl&#039;&#039;&#039; - 2147483520&lt;br /&gt;
, but I don&#039;t have sources to cite, as I found these values by trail and error (or rather, by manual [http://en.wikipedia.org/wiki/Bisection_method bisection]). Does the header of this article imply a [http://en.wikipedia.org/wiki/Wikipedia:NOR no original research] rule? --[[User:Boroondas Gupte|Boroondas Gupte]] 23:06, 9 September 2009 (UTC)&lt;br /&gt;
:Most of the stuff added to the article is original research (like testing how many characters fit into a certain window), so I think that we don&#039;t enforce [http://en.wikipedia.org/wiki/Wikipedia:NOR NOR]. A source would probably be the KB counterpart of this page, but it was derived from the Wiki version, hence it doesn&#039;t state more than the Wiki does. As long as a limit is verifyable by others, it should be added, I think.&lt;br /&gt;
:--[[File:Zai_signature.png|45px|link=User:Zai Lynch]] &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 00:42, 10 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: [[Limits#Navigation|done]]. (I decided to start a new section for it.)&lt;br /&gt;
::--[[User:Boroondas Gupte|Boroondas Gupte]] 09:18, 10 September 2009 (UTC)&lt;br /&gt;
::: To prevent funny but not-really-useful trivia from squirreling in, I&#039;ve updated the disclaimer. We can make exceptions — related to the above, &amp;quot;What&#039;s the highest an avatar has flown?&amp;quot; is a historically popular question that more Residents wonder about than test. So this contribution is appreciated. :) &amp;lt;font color=&amp;quot;#ff0080&amp;quot;&amp;gt;&#039;&#039;&#039;- [[Image:Torley-favicon.png]] [[User:Torley Linden|Torley]] on 2009-10-07 @ 10:52 AM PST&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Textures ==&lt;br /&gt;
The page strongly recommends using the smallest textures you can due to resource limits. It should be pointed out that uploaded textures can always be scaled down automatically and delivered at whatever resolution resources will allow but those resource limits will only become less limiting in time but the texture quality can never scale up beyond the original image resolutions. In other words, there are long-term trade-offs involved in texture size choice in addition to the short-term considerations and it might be best to temper the current advice or at least call this out.&lt;br /&gt;
&lt;br /&gt;
== Object Contents ==&lt;br /&gt;
&lt;br /&gt;
Is there any hard and/or practical limit to the number of items an object can have in its contents? [[User:Siann Beck|Siann Beck]] 12:16, 21 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
There are hard limits but you are unlikely to ever hit them. On the other hand you are more likely to hit the practical limits. An object with a hundered plus items in it&#039;s inventory is hard to manage (updates due to adding or removing inventory can take a long time to complete). -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 22:39, 21 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Although it may be true that one is unlikely to ever hit a certain hard limit, it would still be useful to have it stated instead of referred to cryptically, hm?  [[User:Nemesis Greatrex|Nemesis Greatrex]] 13:22, 1 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Could be 2^31. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:49, 3 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Description Not True UTF8? ==&lt;br /&gt;
I remember playing with the description before and finding that it didn&#039;t accept/retain some characters, one of them being the pipe. Other text inputs handle it just fine. Might be something to look at. Also, I added hovertext and just used the standard formatting -- 254 bytes UTF8 string. I have no idea if it&#039;s a UTF8 string of 254 bytes, but I do know I shoved 254 characters into it and pulled them back out afterwards, even after a rerez. I recall the description losing half of its length after a rerez in the past. -[[User:Stickman Ingmann|Stickman]] 05:42, 30 March 2010 (UTC)&lt;br /&gt;
:Isn&#039;t the pipe (&amp;quot;|&amp;quot;) part of ASCII? --[[User:Boroondas Gupte|Boroondas Gupte]] 21:59, 30 March 2010 (UTC)&lt;br /&gt;
::[[LlSetObjectDesc#footnote_1|LlSetObjectDesc Footnote]] -&amp;gt; The pipe character historically has been used to separate fields in the serialized version of inventory. --[[User:Kuraiko Yoshikawa|Kuraiko Yoshikawa]] 22:23, 30 March 2010 (UTC)&lt;br /&gt;
:::When we had pipe support (when it was also being used to separate fields in the serialized inventory), while it was never possible to create fake inventory items (description length limits nixed that), it was however possible to create an object that could not be rezzed. Not very useful. That was about the same time someone figured out they could generate inventory items for uuids by forging notecard inventory. I miss the good old days sometimes. Anyway, that is why pipe support was removed. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 00:22, 1 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
It looks like only ASCII characters (and not all of them, see pipe for instance) can actually be used for prim names, prim descriptions and inventory names. So either this page about limits is plainly wrong, or there is an embarrassing bug. Since the bug would have been there for as long as I can remember (I was &amp;quot;born&amp;quot; in 2007), I guess the first explanation is the right one. Still, it would be nice being able to use accented characters and other unicode niceness. US English is not the only language around here! I am surprised I cannot find any JIRA reference about this. --[[User:Satomi Ahn|Satomi Ahn]] 04:32, 6 June 2012 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Profile Pictures ==&lt;br /&gt;
&lt;br /&gt;
Profile pictures in Viewer 2.2 seem to be back to 4:3, rather than 1:1.  Can anyone confirm this?  And get the official word on whether this is a permanent change or not? --[[User:Samm Florian|Samm Florian]] 05:23, 31 October 2010 (UTC)&lt;br /&gt;
: It will stay messy for a while. The new 2.5 web profiles use 1:1, but there will be 4:3ish presentations until all older viewers and the current world.secondlife.com eventually fade away. --[[User:Cerise Sorbet|Cerise Sorbet]] 10:51, 1 February 2011 (PST)&lt;br /&gt;
&lt;br /&gt;
:{{jira|VWR-21777}} is tagged &amp;quot;needs-design&amp;quot;, so I guess there was no decision made, yet. --[[User:Boroondas Gupte|Boroondas Gupte]] 03:42, 5 February 2011 (PST)&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/Satomi%27s_Damn_Fast_Relay&amp;diff=1148382</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/Satomi&#039;s Damn Fast Relay</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/Satomi%27s_Damn_Fast_Relay&amp;diff=1148382"/>
		<updated>2011-07-11T13:54:08Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: llParseListKeepNulls, as recommended in ORG 0004&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ ORG Restrained Life Relay Specs TOC }}&lt;br /&gt;
&lt;br /&gt;
= Satomi&#039;s Damn Fast Relay =&lt;br /&gt;
&lt;br /&gt;
This is the shortest known implementation of an ORG compliant relay.&lt;br /&gt;
&lt;br /&gt;
This relay only makes the minimal verifications (no ask mode, no distance checks, ping on relog only but safeword on touch). &lt;br /&gt;
&lt;br /&gt;
Code is under a BSD-style license, feel free to use in your own projects, provided you credit Satomi Ahn for the original script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//Damn Fast Relay, by Satomi Ahn&lt;br /&gt;
//&lt;br /&gt;
//This is a minimalist RLV Relay intended for laggy playgrounds, with the aim of making the answer to scan requests as fast as possible and decreasing the global lag.&lt;br /&gt;
//It only features the auto-accept mode but tries to fully comply to ORG 003 specifications.&lt;br /&gt;
//Touching the relay will make it release restrictions and reset (in other words: safewording).&lt;br /&gt;
//&lt;br /&gt;
//This script is provided as-is with mo guarrantee whatsoever.&lt;br /&gt;
//Feel free to use the code in anyway you want, provided you credit the original author, ie: myself, Satomi Ahn.&lt;br /&gt;
//(can be seen as a BSD-style license)&lt;br /&gt;
&lt;br /&gt;
integer rlvrc = -1812221819;&lt;br /&gt;
key source = NULL_KEY;&lt;br /&gt;
key wearer = NULL_KEY;&lt;br /&gt;
integer viewerlistener;&lt;br /&gt;
key sitid;&lt;br /&gt;
list restrictions = [];&lt;br /&gt;
&lt;br /&gt;
release(key id) {&lt;br /&gt;
    llOwnerSay(&amp;quot;@clear&amp;quot;);&lt;br /&gt;
    llRegionSayTo(id, rlvrc, &amp;quot;release,&amp;quot;+(string)id+&amp;quot;,!release,ok&amp;quot;);&lt;br /&gt;
    llResetScript();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default {&lt;br /&gt;
    state_entry() {&lt;br /&gt;
        wearer = llGetOwner();&lt;br /&gt;
        llListen(rlvrc,&amp;quot;&amp;quot;, NULL_KEY, &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number) {&lt;br /&gt;
        llOwnerSay(&amp;quot;Now safewording. Restrictions will be removed and the relay reset.&amp;quot;);&lt;br /&gt;
        release(source);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    listen(integer c, string w, key id, string msg) {&lt;br /&gt;
        if (c == 12345) {&lt;br /&gt;
            if (msg) sitid = (key) msg;&lt;br /&gt;
            llListenRemove(viewerlistener);&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if (source) { if (source != id) return; } // already grabbed by another device&lt;br /&gt;
        list args = llParseStringKeepNulls(msg,[&amp;quot;,&amp;quot;],[]);&lt;br /&gt;
        if (llGetListLength(args)!=3) return;&lt;br /&gt;
        if (llList2Key(args,1)!=wearer &amp;amp;&amp;amp; llList2Key(args, 1)!=(key)&amp;quot;ffffffff-ffff-ffff-ffff-ffffffffffff&amp;quot;) return;&lt;br /&gt;
        string ident = llList2String(args,0);&lt;br /&gt;
        list commands = llParseString2List(llList2String(args,2),[&amp;quot;|&amp;quot;],[]);&lt;br /&gt;
        integer i;&lt;br /&gt;
        string command;&lt;br /&gt;
        integer nc = llGetListLength(commands);&lt;br /&gt;
        for (i=0; i&amp;lt;nc; ++i) {&lt;br /&gt;
            command = llList2String(commands,i);&lt;br /&gt;
            if (llGetSubString(command,0,0)==&amp;quot;@&amp;quot;) {&lt;br /&gt;
                llOwnerSay(command);&lt;br /&gt;
                llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,&amp;quot;+command+&amp;quot;,ok&amp;quot;);&lt;br /&gt;
                list subargs = llParseString2List(command, [&amp;quot;=&amp;quot;], []);&lt;br /&gt;
                string behav = llGetSubString(llList2String(subargs, 0), 1, -1);&lt;br /&gt;
                integer index = llListFindList(restrictions, [behav]);&lt;br /&gt;
                string comtype = llList2String(subargs, 1);                &lt;br /&gt;
                if (comtype == &amp;quot;n&amp;quot; || comtype == &amp;quot;add&amp;quot;) {&lt;br /&gt;
                    if (index == -1) restrictions += [behav];&lt;br /&gt;
                    if (behav == &amp;quot;unsit&amp;quot; &amp;amp;&amp;amp; llGetAgentInfo(wearer) &amp;amp; AGENT_SITTING) {&lt;br /&gt;
                        viewerlistener = llListen(12345, &amp;quot;&amp;quot;, wearer, &amp;quot;&amp;quot;);&lt;br /&gt;
                        llOwnerSay(&amp;quot;@getsitid=12345&amp;quot;);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                else if (comtype==&amp;quot;y&amp;quot; || comtype == &amp;quot;rem&amp;quot;) {&lt;br /&gt;
                    if (index != -1) restrictions = llDeleteSubList(restrictions, index, index);&lt;br /&gt;
                    if (behav == &amp;quot;unsit&amp;quot;) sitid = NULL_KEY;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            else if (command==&amp;quot;!pong&amp;quot;) {&lt;br /&gt;
                    llOwnerSay(&amp;quot;@sit:&amp;quot;+(string)sitid+&amp;quot;=force,&amp;quot;+llDumpList2String(restrictions, &amp;quot;=n,&amp;quot;)+&amp;quot;=n&amp;quot;);&lt;br /&gt;
                    llSetTimerEvent(0);&lt;br /&gt;
            }&lt;br /&gt;
            else if (command==&amp;quot;!version&amp;quot;) llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,!version,1100&amp;quot;);&lt;br /&gt;
            else if (command==&amp;quot;!implversion&amp;quot;) llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,!implversion,ORG=0003/Satomi&#039;s Damn Fast Relay v2&amp;quot;);&lt;br /&gt;
            else if (command==&amp;quot;!x-orgversions&amp;quot;) llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,!x-orgversions,ORG=0003&amp;quot;);&lt;br /&gt;
            else if (command==&amp;quot;!release&amp;quot;) release(id);&lt;br /&gt;
            else llRegionSayTo(id, rlvrc, ident+&amp;quot;,&amp;quot;+(string)id+&amp;quot;,&amp;quot;+command+&amp;quot;,ko&amp;quot;);            &lt;br /&gt;
        }&lt;br /&gt;
        if (restrictions) { source = id; llOwnerSay(&amp;quot;@detach=n&amp;quot;); }&lt;br /&gt;
        else { llOwnerSay(&amp;quot;@clear&amp;quot;); llResetScript(); }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    changed(integer c) {&lt;br /&gt;
        if (c &amp;amp; CHANGED_OWNER) llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    on_rez(integer i) {&lt;br /&gt;
        if (source) {&lt;br /&gt;
            llSleep(30);&lt;br /&gt;
            llRegionSayTo(source, rlvrc, &amp;quot;ping,&amp;quot;+(string)source+&amp;quot;,ping,ping&amp;quot;);&lt;br /&gt;
            llSetTimerEvent(30);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    timer() {&lt;br /&gt;
        llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Protocol/Restrained_Love_Relay/Specification&amp;diff=1148381</id>
		<title>Talk:LSL Protocol/Restrained Love Relay/Specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Protocol/Restrained_Love_Relay/Specification&amp;diff=1148381"/>
		<updated>2011-07-11T13:51:54Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* llRegionSayTo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Script name requirement ==&lt;br /&gt;
&lt;br /&gt;
The current version of the spec contains rules for the name of the relay script.  The problem is, the rules seem to preclude the possibility of updating using llRemoteLoadScriptPin, which requires a stable name for the target script in order to properly replace it.  If the script is changed to support a new version, the spec requires the script be renamed, but that&#039;s impractical for a script subject to automatic updating.  I&#039;m also unsure if there&#039;s any point to this rule.  In the case of the product I&#039;m currently working on, the relay script is buried in a child prim (to prevent relayed rules interfering with its own rules), which makes attempting to check its name a pretty unfriendly way for the end user to determine version information.  Having version information easily available to the end user is a good idea, but requiring the script be named a particular way doesn&#039;t provide that, it just interferes with auto-update functionality without apparent benefit.  Is there some other reason for saying a script must be named a particular way (e.g. the viewer checks the script name for this info), or can that rule be safely ignored (despite the &amp;quot;must&amp;quot; in the spec)?  If there&#039;s a technical reason for the naming requirement, can it be changed so that the prim containing the script is required to be named a particular way, rather than the script itself?&lt;br /&gt;
--[[User:Galatea Gynoid|Galatea Gynoid]] 17:48, 19 August 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
: I think there is no technical reason. --[[User:Maike Short|Maike Short]] 12:26, 22 August 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
: There is no technical reason indeed, and I think that naming rule may be lifted in the near future, especially if it is a problem for people to update their stuff... however the user &#039;must&#039; be able to check the version one way or another. --[[User:Marine Kelley|Marine Kelley]] 11:44, 1 September 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
::Fair enough -- I&#039;m using a &amp;quot;Version...&amp;quot; command in my menus that prints:&lt;br /&gt;
::* Implant Version 0.7&lt;br /&gt;
::* Compatibility:&lt;br /&gt;
::* Restrained Life Viewer: 1.12.2 +&lt;br /&gt;
::* Relay Specification: 1.014&lt;br /&gt;
::iz gud?  --[[User:Galatea Gynoid|Galatea Gynoid]] 23:44, 1 September 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== !release command from relay ==&lt;br /&gt;
&lt;br /&gt;
Really just for clarification. But it&#039;s mentioned several times that a relay should issue a !release metacommand to force a session to end, however this isn&#039;t very clear. I&#039;m assuming that the relay, for whatever reason, chooses to clear an object&#039;s commands, and sends a !release command to the object such as &amp;lt;code&amp;gt;CmdName,&amp;lt;object uuid&amp;gt;,!release,ok&amp;lt;/code&amp;gt;. Should CmdName be something specific in this case? If not does that require in-world objects to recognise arbitrary command names other than those that it produced itself? This could do with some clarification and/or examples under the !release heading to avoid confusion, as I&#039;m assuming objects should be aware of !release so that they know they no longer have control over an avatar.&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Haravikk_Mistral|Haravikk]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 20:11, 24 October 2010 (UTC)&lt;br /&gt;
:I saw a few devices who send a !pong answer with another CmdName than ping, although the specification says it has to be ping. So... even if the specification was clear for !release, I would not be surprised if some relays still sent another CmdName string. So careful anyway ;-). --[[User:Satomi Ahn|Satomi Ahn]] 14:56, 27 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== [[llRegionSayTo]] ==&lt;br /&gt;
&lt;br /&gt;
This new LSL command is a godsend for RLV relays and furniture. Its purpose is to send channel chat to one target key in the region only. If the key is that of an avatar, then all their attachments (including their RLV relay) will receive the message and no other object. Conversely, the relay can send acknowledgements back to the trap/furniture key, and no other object will hear them and even less process them with LSL.&lt;br /&gt;
&lt;br /&gt;
In short, this new command helps easing on sim lag, and does not create backward compatibility issues for RLV devices who start using it.&lt;br /&gt;
&lt;br /&gt;
Maybe this should be stated as an explicit recommendation in the RLV Relay protocol main page?&lt;br /&gt;
&lt;br /&gt;
--[[User:Satomi Ahn|Satomi Ahn]] 09:21, 1 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
I strongly support this! I am currently doing an application where I am getting crazy by some relays answering on llSay, some on llShout, some on llWhisper... and I need the responses!&lt;br /&gt;
&lt;br /&gt;
--[[User:Unya Tigerfish|Unya Tigerfish]] 03:11, 7 July 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
Just a few caveats for llRegionSayTo:&lt;br /&gt;
* I haven&#039;t met any furniture that would not work with a relay using llRegionSayTo, but I can see a possible scenario where it would fail. Imagine the furniture listens and speaks from two different prims. Then if the relay uses llRegionSayTo to speak to the primitive who spoke to it, then the furniture won&#039;t be able to hear the message. If this becomes an official recommendation, then it should also be recommended that the same prim is used for communication both ways.&lt;br /&gt;
* On the furniture side, the relay should obviously send the llRegionSayTo message to the avatar UUID, since the relay UUID is not known first. llRegionSayTo works in such a way that if an avatar UUID is given (and channel is not 0), then the message will be heard by all their attachments.&lt;br /&gt;
--[[User:Satomi Ahn|Satomi Ahn]] 06:51, 11 July 2011 (PDT)&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1148016</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1148016"/>
		<updated>2011-07-04T12:06:03Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters;&lt;br /&gt;
* ORG devices support wildcards for easy and low lag relay scanning and mass effects;&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to [[#!x-orgversions|a new query meta-command]].&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications (in both directions),&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol and meta-commands described in sections below, along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Remarks:&lt;br /&gt;
* An x-tension can constrain the core specification (this document) even more, but cannot alter its requirements or make them less constraining by the mere fact of being there.&lt;br /&gt;
* However requirements may be altered as the result of executing a meta-command belonging to an x-tension.&lt;br /&gt;
* Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the core requirements until the controller knowingly asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
If a device is ORG compliant, it may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]]. ORG device makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]], minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard)&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it. If llRegionSayTo is used, then the first parameter will also be the uuid of the relay wearer.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller (more accurately: the uuid of the primitive sending the &amp;lt;c_msg&amp;gt;&#039;s), this will also be used as the first parameter of llRegionSayTo.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remark&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
IDENT and ARG can be empty, relay makers must take care of properly handling messages with empty IDENT or ARG (use [[llParseStringKeepNulls]] instead of [[llParseString2List]]). However, due to the fact many existing relays do not properly handle them, controllers should avoid using empty IDENTS.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|x-tensions]]&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147717</id>
		<title>Talk:LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147717"/>
		<updated>2011-06-28T09:57:44Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* What should 0004 change? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=What should 0004 change?=&lt;br /&gt;
(discussion moved from the ORG Requirements talk page)&lt;br /&gt;
&lt;br /&gt;
To add:&lt;br /&gt;
* llRegionSayTo recommended (except for wildcards)&lt;br /&gt;
* !implversion reply prefixed by ORG/&lt;br /&gt;
* make clear what commands are restricting/secondarily restricting/... and how they affect the relay state and when and how they should be accepted or not&lt;br /&gt;
* !x-clear/&amp;amp;lt;string&amp;amp;gt;: clears all meta-restrictions having the string&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Definitions of types of commands:&lt;br /&gt;
# (primarily) restricting: any command which once executed produces a lasting effect restricting possible behaviors of the wearer until explicitly released. Example: all the RLV @xxx=n/add commands, !vision, !follow, !freeze, ...&lt;br /&gt;
# secondarily restricting: any command which has a lasting effect (and requires some global variable to store its state) but whose point is moot if there is no (primary) restriction: !x-email, !x-channel, !x-key, !x-ack, !x-noping, !x-autoforward...&lt;br /&gt;
# actions: commands having immediate concrete effect: RLV @xxx=force commands&lt;br /&gt;
# queries: commands querying the relay or avatar for data: RLV @xxx=channel commands, !version, !implversion, !x-orgversions, !x-fwd&lt;br /&gt;
# releasing: commands removing a restriction: @clear, @clear=xxx, !release, !x-xxxx/clear, @xxxx=y/rem. &lt;br /&gt;
&lt;br /&gt;
Particular cases:&lt;br /&gt;
* !x-delay: should be seen as primarily restricting since the &amp;quot;timeout&amp;quot; is not at the discretion of the implementation and no currently effective restrictions needs to exist for !x-delay to make sense. On the other hand, no explicit release command is needed.&lt;br /&gt;
* For !x-takeover, there are 2 possible points of view&lt;br /&gt;
:* either releasing (never refused), but with the secondary effect that an open session will be transfered if the key was valid&lt;br /&gt;
:* or secondarily restricting... but then one must consider that the choice accept vs reject was based on a new criterion: the validity of the session key&lt;br /&gt;
:In either case, it must be clear that !x-takeover cannot ever open a new session or trigger an interactive dialog.&lt;br /&gt;
* !x-handover: a choice must be made. The most natural would be secondarily restricting, I believe. It can trigger an ask dialog. If accepted, then trust can be transfered over. If there is no actual restriction in the session, there is no point in keeping it open longer than the reasonable life of the auth token !x-handover creates.&lt;br /&gt;
&lt;br /&gt;
Relay states (with respect to one controller):&lt;br /&gt;
# (disabled)&lt;br /&gt;
# free&lt;br /&gt;
# transient session&lt;br /&gt;
# persistent session&lt;br /&gt;
&lt;br /&gt;
In my view:&lt;br /&gt;
* releasing and queries commands should be accepted without question in every relay state&lt;br /&gt;
* restrictions (primary and secondary) and actions are accepted without question within a session&lt;br /&gt;
* otherwise the income depends on relay settings: commands can be automatically rejected or accepted according to some criteria, or the wearer can be asked.&lt;br /&gt;
&lt;br /&gt;
* accepting a secondary restriction or an action while free opens a transient session&lt;br /&gt;
* accepting a primary restriction while free or in a transient session opens a permanent session (or makes the session permanent)&lt;br /&gt;
* releasing *all* primary restrictions makes the session transient&lt;br /&gt;
* a transient session is always automatically closed after a reasonable timeout&lt;br /&gt;
&lt;br /&gt;
* when no session (relative to a controller) is open, all sessions variables are forgotten, which includes various authentifications tokens and other communication preferences.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Does that make sense?&lt;br /&gt;
&lt;br /&gt;
--[[User:Satomi Ahn|Satomi Ahn]] 09:32, 9 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
Transient sessions may look like a useless complication, but from the point of view of trap scripters, it makes stuff much easier not having to explicitly open a session only to send @xxx=force commands. Consider the sheer amount of strip walls or forced teleportation traps (and who does want to answer 10 consecutive dialogs for each piece of clothing that will be stripped?). So we need transient sessions in practice anyway (my relays use them, and I believe other relays also do under some form).&lt;br /&gt;
&lt;br /&gt;
Now coming back to commands such as !x-email, !x-channel, !x-key, !x-ack, !x-noping, !x-autoforward... &lt;br /&gt;
These set a lasting behavior which thus needs a session to be open at least for the duration of the effect. Also let&#039;s keep in mind that no session can be opened without authentification, so these commands need auth to have an effect.&lt;br /&gt;
&lt;br /&gt;
The question is whether one of these effects alone (with no true restriction) justify keeping a session open until an explicit release. My feeling was that the answer was no, which makes these commands of a different nature than either instant effects and permanent restrictions.&lt;br /&gt;
&lt;br /&gt;
If the answer is no, there is still one point that needs to be specified: the behavior when sent outside of an authed session&lt;br /&gt;
* should the command be ignored? (ko)&lt;br /&gt;
* or should the command be authed and open a (transient) session?&lt;br /&gt;
If the answer was yes, then these commands should add restrictions and be handled exactly like @xxx=n commands (and in this case, we must check that every of these commands has a corresponding command for releasing them).&lt;br /&gt;
&lt;br /&gt;
--[[User:Satomi Ahn|Satomi Ahn]] 00:24, 10 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
On a close topic, 004 should also make a clear statement about @xxx=channel commands. Do we consider them as a privacy risk? Are they acceptable for just &amp;quot;scanning&amp;quot; relays?&lt;br /&gt;
&lt;br /&gt;
On the pros side:&lt;br /&gt;
* getting an actual answer from the viewer is something more reliable than answer from the relay (the controller knows that both relay and RLV work)&lt;br /&gt;
* it makes it possible to spare a few messages by asking directly what you need before attempting to grab (or not... if the answer is not satisfying)&lt;br /&gt;
* information the viewer can leak has pretty limited impact (and could be requested later on, after grabbing, anyway)&lt;br /&gt;
&lt;br /&gt;
On the cons side:&lt;br /&gt;
* letting @xxx=channel commands get through makes it possible for the viewer to leak some potentially private information&lt;br /&gt;
* using several messages for scanning and requesting information is not as bad as it used to be, thanks to llRegionSayTo&lt;br /&gt;
&lt;br /&gt;
Anyway, considering there is a demand for privacy protection, I don&#039;t think it is reasonable to require that relays should automatically accept @xxx=channel commands.&lt;br /&gt;
&lt;br /&gt;
To mitigate with annoying ask dialogs, maybe we could propose the following extensions/commands:&lt;br /&gt;
* either something like !x-dontask, which would tell the relay not to interactively prompt the user (and refuse all subsequent commands if auth would have been required)&lt;br /&gt;
* or the !x-modeinfo command, already proposed before, which tells the controller what mode the relay is currently operating (in particular whether it is interactive... and maybe some more information like: &amp;quot;interactive, but channel commands go through&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Of course, !x-orgversions only can tell whether these x-tensions are supported. Fortunately !x-orgversions triggers no interactive dialog in any relay I know of.&lt;br /&gt;
&lt;br /&gt;
--[[User:Satomi Ahn|Satomi Ahn]] 08:24, 20 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
OK, I&#039;m in a strange situation replying to this, since I represent 3 types of RLV scripter and I switch between those roles (furniture maker, wearable maker, relay maker) frequently. My answer to at leasr part of the discussion you&#039;ve raised is from the furniture maker point of view.&lt;br /&gt;
&lt;br /&gt;
I help make toys that have a force sitter embedded in them and I try my best to provide the toy operator the best possible information with respect to who can be forcibly sat. Now, there are three choices:&lt;br /&gt;
1) run a sensor for avs and present a list of people around the toy and hope that they have an active relay&lt;br /&gt;
2) run a sensor for avs and test them with !version to see if they have a relay that responds&lt;br /&gt;
3) run a sensor for avs and get their restrictions, eliminating anyone who cannot be forcibly sat on the toy.&lt;br /&gt;
&lt;br /&gt;
We often got questions of &amp;quot;why can&#039;t the force sitter sit this or that av&amp;quot; when we used choice #2 and now the commonest question (after adopting #3) is &amp;quot;why can&#039;t I force sit myself&amp;quot;.  Which is for completely different reasons.&lt;br /&gt;
&lt;br /&gt;
As a furniture maker with a force sitter, I don&#039;t care if an av is wearing a relay, I care if they can be forcibly sat. So, I want to know the av&#039;s status. For example, they may be sitting with an @unsit restriction, or they may be standing with an @sit restriction, or they may be leashed and have an @sittp restriction (OK, if they&#039;re within 1.5m they can be forcibly sat, but they might well not be when their name is selected even if they are when I test). All of these cases stop an av from being forcibly sat and therefore lead me to drop anyone with those conditions from the list I present to the operator.&lt;br /&gt;
&lt;br /&gt;
So, if we require !version to know if someone is wearing a relay, fine, I&#039;ll do that, and then test their status and they&#039;ll get asked. Yes, it&#039;s different to use @getstatusall and not !version or @versionnew, but different isn&#039;t wrong, it is just different. From the point of view of a furniture maker I want to present the best information to the operator and the only way to do that is through @getstatusall.&lt;br /&gt;
&lt;br /&gt;
If people are worried about privacy? Don&#039;t wear a relay, or wear a relay that is set on an ultra paranoid setting and queries the wearer on every @get.&lt;br /&gt;
&lt;br /&gt;
[[User:Chloe1982 Constantine|Chloe1982 Constantine]] 21:02, 23 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
I think it is a really good idea to have some concept of different levels of command, your definitions up top are fine. But, as a furniture maker, I don&#039;t think it is up to the relay to decide what a toy should or should not emit as a first command, so that leaves me with the view of use multiple levels, and then the question is how many should there be?&lt;br /&gt;
&lt;br /&gt;
Marine&#039;s original (and current spec) leaves that wide open and I am comfortable with that both as a furniture maker, a relay maker, and a user. Of course, as a user I choose the relay I like the best and as a relay maker the relay I wear behaves in accord with my desires.&lt;br /&gt;
&lt;br /&gt;
If ORG really wants to decide levels of command then I think that primarily, secondarily, actions, queries, and releases is a good definition of the levels. However, as a relay maker  and a user I don&#039;t want too many levels and am very comfortable leaving it up to the relay maker to determine the levels they like and then the user to choose which relay they like.&lt;br /&gt;
&lt;br /&gt;
This seems to me to be an area that *doesn&#039;t* need standardizing and allows for good variation in the community. I&#039;ll go with an ORG decision on standard levels, though I would like to be free to choose to combine levels.&lt;br /&gt;
&lt;br /&gt;
Marine&#039;s relay spec originally used 3 levels, off, ask, auto. But that wasn&#039;t mandatory, just advisory. The current spec still makes it advisory to have a reasonable number of levels of protection, but doesn&#039;t say what those should be. This is an area best left to each relay maker to decide for themselves. For example, we think it&#039;s a good idea to introduce the concept of untrusted devices (ones that are not in the land group). In the tk PBA auto mode, you will get asked if an untrusted device is trying to control your relay (which gives some small protection against griefing). Should everyone adopt this strategy? I don&#039;t think so, should the PBA be stopped from adopting this strategy? I don&#039;t think so either.&lt;br /&gt;
&lt;br /&gt;
With the definition of the levels, we can point people to that and it gives a common terminology, but after that it should be up to the relay makers to decide what they want to do. Particularly as there are oddities, like !x-vision which I consider to be a primary restricting command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;My vote (until persuaded by further discussion) is not to standardize on levels, I don&#039;t see the need.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[User:Chloe1982 Constantine|Chloe1982 Constantine]] 21:29, 23 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Chloe, I am afraid you answered to the early comments instead of the current version of the draft. In current draft, there is not real definition of levels, but only only 2 boolean variables associated to a session.&lt;br /&gt;
:# a variable that says that the relay will never again bother the user with an ask dialog (that&#039;s the &#039;&#039;&#039;Authed&#039;&#039;&#039; session state)&lt;br /&gt;
:# a variable that says that current session is &#039;&#039;&#039;Locked&#039;&#039;&#039;, meaning it won&#039;t time out on its own and will be released only if asked by the source, or if the source becomes unreachable, or on safeword.&lt;br /&gt;
:My purpose in writing it this way was to minimize unpredictibility (such that questions like &amp;quot;if I scan with @getstatusall, will relay wearers be spammed with blue dialogs?&amp;quot; or &amp;quot;If I send !x-who|@sit:xxxxx=force, will the relay still be grabbed in 2 hours?&amp;quot; may be answered), while still keeping a lot open to implementation (in particular, actual relay modes).&lt;br /&gt;
:&amp;quot;Primary&amp;quot; and &amp;quot;Secondary&amp;quot; restrictions were my first attempt at formalizing my thoughts. Where the equivalent to &amp;quot;Primary&amp;quot; in current draft would be just a restriction (a command that Locks a session), and where Secondary would be any other command that stores some token in session memory, without locking it. Note that a command that can trigger an ask dialog can make the relay store an authentification token and could in some sense be considered as a secondary restriction... but anyway, I removed these definitions from the draft.&lt;br /&gt;
:Another important contribution of this draft was the formalization of the notion of &#039;&#039;&#039;session&#039;&#039;&#039;, as fundamental to the relay protocol (I believe it was already implicitly there in most relays, although completely absent from Marine&#039;s specification, which made it unpredictible). This was necessary to specify more precisely how long stuff (like authentification state and tokens stored by various x-tensions) should be remembered. Moreover it made it easier to define what the session key (as defined in the Key x-tension) should apply to.&lt;br /&gt;
:Coming back to your point. It is now time to decide whether @getxxxx=channel commands should require Auth or not, as if the answer is yes, then you won&#039;t have to worry about your furniture spamming ORG relays with blue dialogs. If the answer is no, you will have to either scan with !version or accept that some relays may pop up dialogs (which will still be a minority I think... but the possibility will exist).&lt;br /&gt;
:--[[User:Satomi Ahn|Satomi Ahn]] 23:52, 23 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
Speaking as a relay maker, the reason I resonated with the levels is that I have been thinking along these lines for the generation 2.0 of the tk PBA. Right now I have 3 levels named, nerdishly 0, 1, and 2. I&#039;ve been assuming that level 0 is a pass through and is where I put most of the metacommands and also the @get&#039;s, then level 1 is all the non-restricting commands (all the =force) and level 2 is the restricting commands. Given that I have these three levels it made sense to allow authorization up to a defined level. So, a relay in ask mode would, on receiving a series of @get and or =force commands ask the wearer for authorization. The wearer might reply with an authorize to this level or authorize all. If the former, then the relay would pass through any level 0 or level 1 commands but would require a reauthorization if it received a level 2 command. If the latter, all commands would be accepted.&lt;br /&gt;
&lt;br /&gt;
With this scheme in mind, if we split the @get commands into ones that need authorization, I would increase to 4 the number of levels in the relay, bumping my existing levels 1 and 2 up to 2 and 3 and then splitting my level 0 into the metacommands (still level 0) and the @get and @findfolder commands into level 1.&lt;br /&gt;
&lt;br /&gt;
I still like the concept of authorization to a level with a need for reauthorization if a command in the incoming stream exceeds the existing auhtorization.&lt;br /&gt;
&lt;br /&gt;
Speaking as a furniture maker, the concepts of &#039;&#039;&#039;Locked&#039;&#039;&#039; and &#039;&#039;&#039;Auth&#039;&#039;&#039; and &#039;&#039;&#039;Session&#039;&#039;&#039; are good, but I am not sure how important it is to standardize when they should be applied. I am much motivated by a long conversation I had yesterday by an individual who seemed to want me to change either the TK toys or the tk PBA or both to suit the individual&#039;s tastes. (The original discussion focused on @get.) I talked with one of the TK owners who thought that we should continue to use @getstatusall as the basis for our force sitter (I believe the other owner will also agree, but I&#039;ve pointed her to this discussion to weigh in as she feels fit). Given this position, I&#039;d like to see @get commands treated as a pass through, but I wouldn&#039;t require it. If someone wants to make a relay that raises a dialog box (I can&#039;t say blue since mine are all black) that&#039;s fine with me, they can make such a relay; I will choose not to use such a relay.&lt;br /&gt;
&lt;br /&gt;
I guess my bottom line is this, I think it is really neat that the spec is underspecified with respect to concepts of &#039;&#039;&#039;Locked&#039;&#039;&#039;, &#039;&#039;&#039;Auth&#039;&#039;&#039;, and &#039;&#039;&#039;Session&#039;&#039;&#039;, this allows for variation and allows wearers to choose the style that best suits them. This looseness extends to safeword interpretation; the spec used to say something about it being a good idea for the relay maker to specify a safeword. We agreed and had a way of doing so, and then I saw what Toy was doing in her relay which I thought to be a really neat idea. At that stage I asked her if she minded me borrowing the concept and with her blessing I implemented both Easy Out and Real World safewords. Yes, I know this is a side issue but is indicative of my general feeling of wanting some looseness so that we can have innovation. &lt;br /&gt;
&lt;br /&gt;
[[User:Chloe1982 Constantine|Chloe1982 Constantine]] 05:38, 24 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
A remark about !implversion; I cannot change the string sent by my relay as acknowledgment since this string is the first step for some objects to detect the presence of my relay (and not another one), so I cannot add &amp;quot;ORG=0004/&amp;quot;; I actually do not see the interest to change this definition of !implversion (which is actually only a recommendation) since !x-orgversions already contains the information. --[[User:Dahlia Orfan|Dahlia Orfan]] 02:48, 28 June 2011 (PDT)&lt;br /&gt;
:It&#039;s just one more place to have the information, moreover, in a command that is also supported by non-ORG devices, which can be convenient. Also this helpes advertising ORG.&lt;br /&gt;
:As for your devices who check !implversion, wouldn&#039;t it be better to that purpose to rely on !x-orgversion? (maybe adding proprietary x-tensions, if you are using stuff no ORG x-tension proposes?) --[[User:Satomi Ahn|Satomi Ahn]] 02:57, 28 June 2011 (PDT)&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147692</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147692"/>
		<updated>2011-06-27T19:39:24Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Consolidated RLVR protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters;&lt;br /&gt;
* ORG devices support wildcards for easy and low lag relay scanning and mass effects;&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to [[#!x-orgversions|a new query meta-command]].&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications (in both directions),&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol and meta-commands described in sections below, along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Remarks:&lt;br /&gt;
* An x-tension can constrain the core specification (this document) even more, but cannot alter its requirements or make them less constraining by the mere fact of being there.&lt;br /&gt;
* However requirements may be altered as the result of executing a meta-command belonging to an x-tension.&lt;br /&gt;
* Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the core requirements until the controller knowingly asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
If a device is ORG compliant, it may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]]. ORG device makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]], minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard)&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it. If llRegionSayTo is used, then the first parameter will also be the uuid of the relay wearer.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller (more accurately: the uuid of the primitive sending the &amp;lt;c_msg&amp;gt;&#039;s), this will also be used as the first parameter of llRegionSayTo.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|x-tensions]]&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147678</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147678"/>
		<updated>2011-06-27T18:06:51Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Definition of an ORG device */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters;&lt;br /&gt;
* ORG devices support wildcards for easy and low lag relay scanning and mass effects;&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to [[#!x-orgversions|a new query meta-command]].&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications (in both directions),&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol and meta-commands described in sections below, along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Remarks:&lt;br /&gt;
* An x-tension can constrain the core specification (this document) even more, but cannot alter its requirements or make them less constraining by the mere fact of being there.&lt;br /&gt;
* However requirements may be altered as the result of executing a meta-command belonging to an x-tension.&lt;br /&gt;
* Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the core requirements until the controller knowingly asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
If a device is ORG compliant, it may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]]. ORG device makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]], minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|x-tensions]]&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147676</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147676"/>
		<updated>2011-06-27T17:54:32Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters;&lt;br /&gt;
* ORG devices support wildcards for easy and low lag relay scanning and mass effects;&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to [[#!x-orgversions|a new query meta-command]].&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications (in both directions),&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol and meta-commands described in sections below, along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Remarks:&lt;br /&gt;
* An x-tension can constrain the core specification (this document) even more, but cannot alter its requirements or make them less constraining if not as a result of the relay executing a meta-command from this x-tension.&lt;br /&gt;
* Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the core requirements until the controller knowingly asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
If a device is ORG compliant, it may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]]. ORG device makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]], minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|x-tensions]]&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147675</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147675"/>
		<updated>2011-06-27T16:42:51Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Other meta-commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters;&lt;br /&gt;
* ORG devices support wildcards for easy and low lag relay scanning and mass effects;&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to [[#!x-orgversions|a new query meta-command]].&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol and meta-commands described in sections below, along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Remarks:&lt;br /&gt;
* An x-tension can constrain the core specification (this document) even more, but cannot alter its requirements or make them less constraining if not as a result of the relay executing a meta-command from this x-tension.&lt;br /&gt;
* Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the core requirements until the controller knowingly asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
If a device is ORG compliant, it may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]]. ORG device makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]], minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|x-tensions]]&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147674</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147674"/>
		<updated>2011-06-27T16:40:48Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters;&lt;br /&gt;
* ORG devices support wildcards for easy and low lag relay scanning and mass effects;&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to [[#!x-orgversions|a new query meta-command]].&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol and meta-commands described in sections below, along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Remarks:&lt;br /&gt;
* An x-tension can constrain the core specification (this document) even more, but cannot alter its requirements or make them less constraining if not as a result of the relay executing a meta-command from this x-tension.&lt;br /&gt;
* Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the core requirements until the controller knowingly asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
If a device is ORG compliant, it may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]]. ORG device makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]], minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147673</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147673"/>
		<updated>2011-06-27T16:38:19Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Definition of an ORG device */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters;&lt;br /&gt;
* ORG devices support wildcards for easy and low lag relay scanning and mass effects;&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to a new query meta-command.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol and meta-commands described in sections below, along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Remarks:&lt;br /&gt;
* An x-tension can constrain the core specification (this document) even more, but cannot alter its requirements or make them less constraining if not as a result of the relay executing a meta-command from this x-tension.&lt;br /&gt;
* Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the core requirements until the controller knowingly asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
If a device is ORG compliant, it may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]]. ORG device makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]], minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147672</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147672"/>
		<updated>2011-06-27T16:35:37Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters;&lt;br /&gt;
* ORG devices support wildcards for easy and low lag relay scanning and mass effects;&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to a new query meta-command.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol and meta-commands described in sections below, along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Remarks:&lt;br /&gt;
* Supported x-tensions can constrain the core specification (this document) even more, but cannot alter its requirements or make them less constraining if not as a result of the relay executing a meta-command of this x-tension sent by the controller.&lt;br /&gt;
* Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until the controller knowingly asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
If a device is ORG compliant, it may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]]. ORG device makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]], minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147671</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147671"/>
		<updated>2011-06-27T16:35:02Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters;&lt;br /&gt;
* ORG devices support wildcards for easy and low lag mass effects;&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to a new query meta-command.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol and meta-commands described in sections below, along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Remarks:&lt;br /&gt;
* Supported x-tensions can constrain the core specification (this document) even more, but cannot alter its requirements or make them less constraining if not as a result of the relay executing a meta-command of this x-tension sent by the controller.&lt;br /&gt;
* Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until the controller knowingly asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
If a device is ORG compliant, it may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]]. ORG device makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]], minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147670</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147670"/>
		<updated>2011-06-27T16:27:17Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;.&lt;br /&gt;
Main advantages of an ORG compliant device over a classic RLVR devices are the following:&lt;br /&gt;
* ORG devices follow a stricter specification (while keeping compatibility), thus making the experience more predictible for scripters&lt;br /&gt;
* ORG devices can support optional x-tensions for more fun. Supported x-tensions can easily be discovered thanks to a new query meta-command.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages using wildcards (sent to all relays within range)&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional command, for a controller to query for optional x-tensions the relay supports.&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as the original RLVR protocol, minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147669</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147669"/>
		<updated>2011-06-27T16:23:07Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;. Main features of an ORG compliant device compared to a classic RLVR device are the support of an additional meta-command, for querying compatibility with optional x-tensions, and adherence to stricter specifications while preserving full compatibility with Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original RLVR specification]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original RLVR specification and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages using wildcards (sent to all relays within range)&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional command, for a controller to query for optional x-tensions the relay supports.&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as the original RLVR protocol, minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147668</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147668"/>
		<updated>2011-06-27T16:21:34Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page lists requirements that make a RLV relay or a RLVR controller &amp;quot;ORG compliant&amp;quot;. Main features of an ORG compliant device compared to a classic RLVR device are the support of an additional meta-command, for querying compatibility with optional x-tensions, and adherence to stricter specifications while preserving full compatibility with Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages using wildcards (sent to all relays within range)&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional command, for a controller to query for optional x-tensions the relay supports.&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as the original RLVR protocol, minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147667</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147667"/>
		<updated>2011-06-27T16:16:01Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. Main features of an ORG device are the support for an ORG-centered informational meta-command and adherence to a stricter specification than Marine Kelley&#039;s original RLVR protocol while preserving full compatibility with it.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of the RLVR protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages using wildcards (sent to all relays within range)&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional command, for a controller to query for optional x-tensions the relay supports.&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as the original RLVR protocol, minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147666</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147666"/>
		<updated>2011-06-27T16:11:50Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages using wildcards (sent to all relays within range)&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional command, for a controller to query for optional x-tensions the relay supports.&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as the original RLVR protocol, minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147665</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147665"/>
		<updated>2011-06-27T16:07:24Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* !release */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages using wildcards (sent to all relays within range)&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional command, for a controller to query for optional x-tensions the relay supports.&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as the original RLVR protocol, minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close, !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147664</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147664"/>
		<updated>2011-06-27T16:05:55Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Consolidated RLVR protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages using wildcards (sent to all relays within range)&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional command, for a controller to query for optional x-tensions the relay supports.&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
This consolidated RLVR protocol is roughly the same as the original RLVR protocol, minus a few embarassing loose ends.&lt;br /&gt;
&lt;br /&gt;
Main differences are highlighted at the beginning of each subsection.&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147663</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147663"/>
		<updated>2011-06-27T15:54:32Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages using wildcards (sent to all relays within range)&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional command, for a controller to query for optional x-tensions the relay supports.&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]] (except for &amp;lt;c_msg&amp;gt;&#039;s using a wildcard),&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147662</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147662"/>
		<updated>2011-06-27T15:53:12Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Definition of an ORG device */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages using wildcards (sent to all relays within range)&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional command, for a controller to query for optional x-tensions the relay supports.&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147661</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147661"/>
		<updated>2011-06-27T15:50:33Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* !x-orgversions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;br /&gt;
&lt;br /&gt;
===Other meta-commands===&lt;br /&gt;
&lt;br /&gt;
Commands not listed here can belong to one of the following categories:&lt;br /&gt;
# (unlikely) commands from a future revision of Marine Kelley&#039;s original RLVR protocol.&lt;br /&gt;
# (more likely but not that much!) core commands from a future revision of ORG&lt;br /&gt;
# (very likely) commands from optional x-tensions&lt;br /&gt;
# proprietary commands&lt;br /&gt;
&lt;br /&gt;
ORG intends for its successive versions to be backward compatible. Therefore ORG relays handle all unknown meta-commands.&lt;br /&gt;
&lt;br /&gt;
We also intend for future versions of ORG consolidated protocol to include last version of original RLVR protocol, hence the prefix &amp;quot;!x-&amp;quot; for all meta-commands comming from ORG, which ensures there will be reasonably no collision.&lt;br /&gt;
&lt;br /&gt;
For the same reason, we require that proprietary commands use an obvious prefix such as &amp;quot;!a-&amp;quot; or &amp;quot;!b-&amp;quot;, and so on. Not doing so would prevent ensuring backward compatibility, hence a relay or controller who would use proprietary commands with wrong prefixes are not ORG compliant.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147660</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147660"/>
		<updated>2011-06-27T15:29:42Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* !x-orgversions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command&#039;s purpose is to make it possible for the controller to have detailed informations on the protocol the relay supports. First the version of the ORG consolidated protocol, second the list of supported optional x-tensions, also with their version numbers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
* By announcing an x-tension, the relay commits itself to comply to all requirements of its specification.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;br /&gt;
* x-tensions do not have to be standards defined by ORG but can also be proprietary. We recommend that the x-tension name then contains the name of the brand who proposes it.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147657</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147657"/>
		<updated>2011-06-27T15:21:02Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Core meta-commands and associated mechanisms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
New in ORG compared to RLVR: !x-orgversions&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147655</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147655"/>
		<updated>2011-06-27T15:19:01Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Protocol session */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* it is now clear when a session starts and stops (and what a session is!)&lt;br /&gt;
* it is clear when to expect interactive dialogs (and how to avoid spamming relay wearers with blue dialogs)&lt;br /&gt;
* no session for unreachable controllers (answer to ping is mandatory to ensure session persistence)&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147652</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147652"/>
		<updated>2011-06-27T15:15:50Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* On executing commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* explanation on how to handle meta-commands with variable number of parameters,&lt;br /&gt;
* the relay knows commands in both core specification and x-tensions,&lt;br /&gt;
* clarification on multi-controller relays.&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147651</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147651"/>
		<updated>2011-06-27T15:11:51Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Protocol Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
Summary of differences with original RLVR:&lt;br /&gt;
* we force use of llRegionSayTo, &lt;br /&gt;
* we explicitly forbid incorrect syntax on the relay channel&lt;br /&gt;
* the relay is supposed to ignore bad commands&lt;br /&gt;
* wildcards are supported&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147650</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147650"/>
		<updated>2011-06-27T15:00:32Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===On executing commands===&lt;br /&gt;
====Relay side====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
* The controller can send any command within allowed syntax.&lt;br /&gt;
* Only commands described in this specification and commands belonging to x-tensions announced by the relay are guaranteed to be understood by the relay. If not understood, the relay will just answer &amp;quot;ko&amp;quot;, do nothing and skip to the next command.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147648</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147648"/>
		<updated>2011-06-27T14:55:48Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Protocol session */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering [[#ping/!pong|ping]] requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller (by default: chat messages sent on RLVR channel by llRegionSayTo). X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
On closing sessions:&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all restrictions relative to that session. This MUST happen on the following events and no other:&lt;br /&gt;
:*on executing !release (received from the controller, or relay-triggered as in a safeword, see [[#!release]])&lt;br /&gt;
:*on noticing the controller is not reachable&lt;br /&gt;
:*on timeout, if the session is not Locked&lt;br /&gt;
*Sessions that are not locked MUST be closed after a reasonable timeout.&lt;br /&gt;
&lt;br /&gt;
On interactive Auth:&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless the command requires an Authed session and the session is not already Authed.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s of the form @xxx=force, @xxx=add and @xxx=n, and for meta-commands whose specifications say it is allowed.&lt;br /&gt;
*Other RLV commands MUST automatically accepted or rejected by any relay.&lt;br /&gt;
&lt;br /&gt;
On removing and adding restrictions:&lt;br /&gt;
* Commands that remove restrictions are always accepted (RLV @...=&amp;lt;channel_number&amp;gt;, @clear[=...] and @...=y/rem commands, !release, and !x-.../clear[/...] meta-commands).&lt;br /&gt;
* No restriction can be released unless as the result of one of the above commands, or of closing a session.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some meta-commands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
&lt;br /&gt;
Reachability:&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
&lt;br /&gt;
====Controller side requirements====&lt;br /&gt;
* A controller MUST eventually close any Locked session using the meta-command !release.&lt;br /&gt;
&lt;br /&gt;
In particular, non-portable controllers should not let a Locked relay wearer run free out of reach. Moreover, any controller should either react to some kind of event that is bound to happen (timer expiration being the most common) or provide a user interface for closing the session. It should be clear at least to the person who set the trap how the victim will be released.&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147647</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147647"/>
		<updated>2011-06-27T14:14:44Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* On the relay side only */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* when the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147646</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147646"/>
		<updated>2011-06-27T14:13:42Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* On the relay side only */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send back to the controller a &amp;lt;r_msg&amp;gt; (see above) such that:&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed,&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*and ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* when the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147645</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147645"/>
		<updated>2011-06-27T14:09:36Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Definitions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039;, attachment worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* when the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147644</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147644"/>
		<updated>2011-06-27T14:08:49Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Consolidated RLVR protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a [[#Protocol session|session]])&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===Protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* when the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147643</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147643"/>
		<updated>2011-06-27T14:06:41Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Protocol Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
====Requirements====&lt;br /&gt;
RLVR protocol consists of messages exchanged between relay and controller&lt;br /&gt;
* on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;),&lt;br /&gt;
* using the LSL function [[llRegionSayTo]],&lt;br /&gt;
* all sent from the same prim of the controller or relay (within a session)&lt;br /&gt;
* and having the following syntax (non-terminal &amp;lt;c_msg&amp;gt; for controller messages/&#039;&#039;&#039;command messages&#039;&#039;&#039; and &amp;lt;r_msg&amp;gt; for relay messages/&#039;&#039;&#039;acknowledgement messages&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of the relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff (&#039;&#039;&#039;wildcard&#039;&#039;&#039;) if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===The RLVR protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* when the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147641</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147641"/>
		<updated>2011-06-27T13:55:20Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Requirements on both sides */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
More precisely:&lt;br /&gt;
&lt;br /&gt;
* RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
* A controller sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A relay sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Requirements on both sides====&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* In &amp;lt;c_msg&amp;gt;, KEY is always either the uuid of relay wearer or ffffffff-ffff-ffff-ffff-ffffffffffff if it is a message intended for all relays who can hear it.&lt;br /&gt;
* In &amp;lt;r_msg&amp;gt;, KEY is always the uuid of the controller.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===The RLVR protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* when the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147640</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147640"/>
		<updated>2011-06-27T13:52:58Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Consolidated RLVR protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== Protocol Syntax ===&lt;br /&gt;
&lt;br /&gt;
==== Definitions ====&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
More precisely:&lt;br /&gt;
&lt;br /&gt;
* RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
* A controller sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A relay sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Requirements on both sides====&lt;br /&gt;
* Relays can only send &amp;lt;r_msg&amp;gt;&#039;s, and controllers &amp;lt;c_msg&amp;gt;&#039;s. Nothing else is allowed on RLVR channel.&lt;br /&gt;
* KEY is always the uuid of the recipient of the message, or ffffffff-ffff-ffff-ffff-ffffffffffff if it is a message from a controller intended for all relays who can hear it.&lt;br /&gt;
&lt;br /&gt;
====On the relay side only====&lt;br /&gt;
&#039;&#039;&#039;Further requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
===The RLVR protocol session===&lt;br /&gt;
&lt;br /&gt;
====Definitions====&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* when the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
====Relay side requirements====&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147637</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147637"/>
		<updated>2011-06-27T13:38:36Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Syntactical considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
* RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
* A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
* No other message should be exchanged on this channel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel which is not a &amp;lt;c_msg&amp;gt; with KEY being either the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
Then, for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147636</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147636"/>
		<updated>2011-06-27T13:35:43Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Syntactical considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
* RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
* A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
* No other message should be exchanged on this channel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147635</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147635"/>
		<updated>2011-06-27T13:34:28Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Reminder of the protocol syntax and related notations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
* RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
* A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
* No other message should be exchanged on this channel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147634</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147634"/>
		<updated>2011-06-27T13:32:10Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Command handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Reminder of the protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;. A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in [[LSL_Protocol/Restrained_Love_Relay/Comparison|x-tensions]] announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147633</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147633"/>
		<updated>2011-06-27T13:31:05Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Command handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Reminder of the protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;. A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* A relays knows the following meta-command definitions:&lt;br /&gt;
:*[[#Core meta-commands and associated mechanisms|definitions listed in the core requirements]]&lt;br /&gt;
:*all definitions included in x-tensions announced by the relay.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147632</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147632"/>
		<updated>2011-06-27T13:26:27Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* !x-orgversions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Reminder of the protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;. A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147631</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147631"/>
		<updated>2011-06-27T13:25:27Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* !x-orgversions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Reminder of the protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;. A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports and, second, similarily to !version, !x-orgversions can be used to know what version of ORG the relay complies to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
* !x-orgversions should always be accepted with no Auth required, it does not open a session or Lock one.&lt;br /&gt;
* The acknowledgement value in a reply to !x-orgversions is a &amp;quot;/&amp;quot;-list of items of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first &amp;lt;package&amp;gt; is always &amp;quot;ORG&amp;quot; (representing the core specification package of ORG relays), its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names, whose version string is 3 digits.&lt;br /&gt;
* If several incompatible versions of a same x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, only the last version should be reported.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* In a controller, it is however recommended to use !x-orgversions as soon as possible in order to avoid sending unsupported and useless metacommands later on.&lt;br /&gt;
* In the acknowledgement message, x-tension names are listed, not meta-command names (as one x-tension can have several meta-commands). Thus listed names do not include the prefix &amp;quot;!x-&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147630</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147630"/>
		<updated>2011-06-27T13:17:24Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Controller side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Reminder of the protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;. A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
Note controller don&#039;t have to poll for relay presence to resume a session but should just listen for ping messages instead. The relay should have stored all restrictions and handle sitting back to whatever furniture the relay wearer was tied up to.&lt;br /&gt;
&lt;br /&gt;
Concerning the second bullet: for instance, if the controller is a furniture which is already in use by another relay wearer, it would be cause dysfunctions to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports, second it is similar to !version in RLVR protocol, as its reply gives the versions of the ORG core specification and ORG x-tensions that are implemented in the relay.&lt;br /&gt;
&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
The acknowledgement string of the relay is a list separated by &amp;quot;/&amp;quot; whose items are of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first package is &amp;quot;ORG&amp;quot;, the core specification of ORG relays, its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names (not meta-command names, as one x-tension can require several metacommands, thus the name does not include the prefix &amp;quot;!x-&amp;quot;), whose version string is 3 digits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a relay:&#039;&#039;&lt;br /&gt;
* The support of this metacommand is mandatory for an ORG relay.&lt;br /&gt;
* It is also required that the list of packages in the !x-orgversions reply includes the package &amp;quot;ORG&amp;quot; and the exact list of supported optional x-tensions.&lt;br /&gt;
* If several incompatible versions of an x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, it is necessary to report only the last one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a controlling device:&#039;&#039; None. It is however recommended to use !x-orgversions when it makes sense for avoiding sending unsupported and useless metacommands later.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147629</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147629"/>
		<updated>2011-06-27T13:14:03Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Relay side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Reminder of the protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;. A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
Note that the relay is responsible for storing restrictions and the key of the sit target across sessions, not the controller.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
For instance, if the controller is a furniture which is already in use by another relay wearer, it would be inconsistant to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports, second it is similar to !version in RLVR protocol, as its reply gives the versions of the ORG core specification and ORG x-tensions that are implemented in the relay.&lt;br /&gt;
&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
The acknowledgement string of the relay is a list separated by &amp;quot;/&amp;quot; whose items are of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first package is &amp;quot;ORG&amp;quot;, the core specification of ORG relays, its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names (not meta-command names, as one x-tension can require several metacommands, thus the name does not include the prefix &amp;quot;!x-&amp;quot;), whose version string is 3 digits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a relay:&#039;&#039;&lt;br /&gt;
* The support of this metacommand is mandatory for an ORG relay.&lt;br /&gt;
* It is also required that the list of packages in the !x-orgversions reply includes the package &amp;quot;ORG&amp;quot; and the exact list of supported optional x-tensions.&lt;br /&gt;
* If several incompatible versions of an x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, it is necessary to report only the last one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a controlling device:&#039;&#039; None. It is however recommended to use !x-orgversions when it makes sense for avoiding sending unsupported and useless metacommands later.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147628</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147628"/>
		<updated>2011-06-27T13:12:35Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Relay side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Reminder of the protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;. A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller.&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
For instance, if the controller is a furniture which is already in use by another relay wearer, it would be inconsistant to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports, second it is similar to !version in RLVR protocol, as its reply gives the versions of the ORG core specification and ORG x-tensions that are implemented in the relay.&lt;br /&gt;
&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
The acknowledgement string of the relay is a list separated by &amp;quot;/&amp;quot; whose items are of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first package is &amp;quot;ORG&amp;quot;, the core specification of ORG relays, its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names (not meta-command names, as one x-tension can require several metacommands, thus the name does not include the prefix &amp;quot;!x-&amp;quot;), whose version string is 3 digits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a relay:&#039;&#039;&lt;br /&gt;
* The support of this metacommand is mandatory for an ORG relay.&lt;br /&gt;
* It is also required that the list of packages in the !x-orgversions reply includes the package &amp;quot;ORG&amp;quot; and the exact list of supported optional x-tensions.&lt;br /&gt;
* If several incompatible versions of an x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, it is necessary to report only the last one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a controlling device:&#039;&#039; None. It is however recommended to use !x-orgversions when it makes sense for avoiding sending unsupported and useless metacommands later.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147627</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147627"/>
		<updated>2011-06-27T13:11:44Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Core meta-commands and associated mechanisms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Reminder of the protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;. A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG device MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller (in contrary to other acknowlegement messages that are always replies to controller commands).&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
For instance, if the controller is a furniture which is already in use by another relay wearer, it would be inconsistant to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports, second it is similar to !version in RLVR protocol, as its reply gives the versions of the ORG core specification and ORG x-tensions that are implemented in the relay.&lt;br /&gt;
&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
The acknowledgement string of the relay is a list separated by &amp;quot;/&amp;quot; whose items are of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first package is &amp;quot;ORG&amp;quot;, the core specification of ORG relays, its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names (not meta-command names, as one x-tension can require several metacommands, thus the name does not include the prefix &amp;quot;!x-&amp;quot;), whose version string is 3 digits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a relay:&#039;&#039;&lt;br /&gt;
* The support of this metacommand is mandatory for an ORG relay.&lt;br /&gt;
* It is also required that the list of packages in the !x-orgversions reply includes the package &amp;quot;ORG&amp;quot; and the exact list of supported optional x-tensions.&lt;br /&gt;
* If several incompatible versions of an x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, it is necessary to report only the last one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a controlling device:&#039;&#039; None. It is however recommended to use !x-orgversions when it makes sense for avoiding sending unsupported and useless metacommands later.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147626</id>
		<title>LSL Protocol/Restrained Love Open Relay Group/ORG Requirements/0004 draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Requirements/0004_draft&amp;diff=1147626"/>
		<updated>2011-06-27T13:10:44Z</updated>

		<summary type="html">&lt;p&gt;Satomi Ahn: /* Core meta-commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORG_Restrained_Life_Relay_Specs_TOC}}&lt;br /&gt;
STATUS: draft&lt;br /&gt;
&lt;br /&gt;
VERSION: 0004&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This page is a list of requirements for a relay or an in-world device to have the right to be called &amp;quot;ORG compliant&amp;quot;. It is mostly about adding support for an ORG-centered informational metacommand and specifying Marine Kelley&#039;s RLVR protocol a bit more that it is now, while of course preserving full compatibility.&lt;br /&gt;
&lt;br /&gt;
For a quick overview of the motivations and general working of this protocol and a few examples, we refer the reader to [[LSL_Protocol/Restrained_Love_Relay/Specification|the original specification page by Marine Kelley]].&lt;br /&gt;
&lt;br /&gt;
If you are making furniture, traps, or other RLVR controllers and you are not interested in what [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] can offer, then you can stick with the original specification by Marine Kelley and still be compatible with [[LSL_Protocol/Restrained_Love_Relay/Comparison|ORG relays]]. However, to have the right to call your controller &amp;quot;ORG compatible&amp;quot;, there are still a few light additional requirements such as:&lt;br /&gt;
* using only [[llRegionSayTo]] for communications with the relay,&lt;br /&gt;
* not spamming the RLVR channel with messages that do not belong to the protocol,&lt;br /&gt;
* and remain responsive to ping messages at every time if you want the session to remain locked.&lt;br /&gt;
&lt;br /&gt;
If you are interested in [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|ORG x-tensions]], then you should also read the part about [[#!x-orgversions|!x-orgversions]].&lt;br /&gt;
&lt;br /&gt;
If you are making a relay, sorry we are afraid you will have to read all this page.&lt;br /&gt;
&lt;br /&gt;
==Definition of an ORG device==&lt;br /&gt;
&lt;br /&gt;
A RLVR device is compliant with ORG specifications if it implements the consolidated RLVR protocol described below along with the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/x-tensions|optional ORG x-tensions]] it announces supporting.&lt;br /&gt;
&lt;br /&gt;
Note in particular that&lt;br /&gt;
* the consolidated protocol is backward compatible with [[LSL_Protocol/Restrained_Love_Relay/Specification|Marine Kelley&#039;s RLVR protocol version 1.100]] but resolves most loose ends of that document;&lt;br /&gt;
* ORG relays handle controller messages whose second field is ffffffff-ffff-ffff-ffff-ffffffffffff exactly the same as if it was the key of the wearer (NULL_KEY is a wildcard);&lt;br /&gt;
* one-to-one chat messages (not using a wildcard) are sent by using [[llRegionSayTo]] LSL function;&lt;br /&gt;
* there is an additional meta-command, !x-orgversions for a relay to announce supported x-tensions;&lt;br /&gt;
* each supported x-tension can imply other supported metacommands, ORG x-tensions meta-command all having names starting with prefix &amp;quot;!x-&amp;quot;;&lt;br /&gt;
* other proprietary metacommands with prefix &amp;quot;!_-&amp;quot; (replace &amp;quot;_&amp;quot; by any letter that is not &amp;quot;x&amp;quot;) can be supported;&lt;br /&gt;
&lt;br /&gt;
Supported x-tensions can constrain the core specification (this document) even more, but cannot alter it or make it less constraining unless as a result of the relay executing a meta-command of this x-tension sent by the controller. Thus, although the protocol is extensible, a controller can always rely on the fact an ORG relay abides by the requirements in this document until it asks the relay to do otherwise.&lt;br /&gt;
&lt;br /&gt;
ORG devices may be advertised by the use of the [[LSL_Protocol/Restrained_Love_Open_Relay_Group/ORG_Logo|ORG logo]] for advertising compliance with ORG requirements. ORG devices makers are encouraged to do so.&lt;br /&gt;
&lt;br /&gt;
==Consolidated RLVR protocol==&lt;br /&gt;
&lt;br /&gt;
=== A few definitions ===&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Restrained Love Relay (RLVR) protocol&#039;&#039;&#039; implies two partners (SL objects): the &#039;&#039;&#039;relay&#039;&#039;&#039; worn by the avatar commands are intended for, and a &#039;&#039;&#039;controller&#039;&#039;&#039;, which sends commands to the relay. &lt;br /&gt;
&lt;br /&gt;
* During an execution of the RLVR protocol, a relay and a controller establish a &#039;&#039;&#039;session&#039;&#039;&#039; together. A relay may manage several sessions with several controllers. Likewise, a controller could establish sessions with several relays.&lt;br /&gt;
&lt;br /&gt;
* The goal of the protocol is to force the relay wearer to make perform actions and to toggle restrictions on their behavior. Both actions and restrictions can be enforced either through use of viewer hooks ([[LSL_Protocol/RestrainedLoveAPI|Restrained Love API]], or RLV) or through LSL scripting.&lt;br /&gt;
&lt;br /&gt;
* Hence we distinguish between &amp;quot;&#039;&#039;&#039;RLV commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;@&amp;quot;, which are commands following the syntax of the RLV API and which will ultimately be forwarded to the viewer, and &amp;quot;&#039;&#039;&#039;meta-commands&#039;&#039;&#039;&amp;quot;, starting with &amp;quot;!&amp;quot;, which are meant to be interpreted by LSL functions.&lt;br /&gt;
&lt;br /&gt;
* Restrictions on a relay wearer are relative to a session. So are most other variables (authorization state, key of the controller, ... ).&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Opened&#039;&#039;&#039; whenever the relay accepts a RLVR command from a controller.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Closed&#039;&#039;&#039; (or &#039;&#039;&#039;released&#039;&#039;&#039;) as soon as the relay forgets every variables and releases all restrictions pertaining to that session.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Locked&#039;&#039;&#039; whenever it holds active restrictions.&lt;br /&gt;
&lt;br /&gt;
* A session is &#039;&#039;&#039;Authed&#039;&#039;&#039; if the controller has been allowed to control the relay (not only store some variables with no consequence). Once authed, no interactive &amp;quot;ask&amp;quot; dialog should pop up anymore concerning this session. Most commands should now normally be accepted (and maybe a few automatically rejected).&lt;br /&gt;
&lt;br /&gt;
* A controller is called &#039;&#039;&#039;reachable&#039;&#039;&#039; if it can receive messages from the relay and can prove it by answering ping requests from the relay. By &amp;quot;can&amp;quot;, it is meant by the method of communication agreed upon by the relay and controller. By default the communication method is chat messages sent by llRegionSayTo. X-tensions such as email and delay can modify what is meant by reachable.&lt;br /&gt;
&lt;br /&gt;
===Reminder of the protocol syntax and related notations===&lt;br /&gt;
&lt;br /&gt;
RLVR protocol consists of messages exchanged on channel -1812221819 (called &#039;&#039;&#039;RLVR channel&#039;&#039;&#039;) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
A controller only sends messages (commands) whose syntax is described by the non-terminal &amp;lt;c_msg&amp;gt;. A relay only sends messages (acknowledgements) whose syntax is described by the non-terminal &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;c_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;r_msg&amp;gt; ::= IDENT &amp;quot;,&amp;quot; KEY &amp;quot;,&amp;quot; &amp;lt;command&amp;gt; &amp;quot;,&amp;quot; ACK&lt;br /&gt;
 &amp;lt;commands&amp;gt; ::= &amp;lt;command&amp;gt; | &amp;lt;command&amp;gt; &amp;quot;|&amp;quot; &amp;lt;commands&amp;gt;&lt;br /&gt;
 &amp;lt;command&amp;gt; ::= &amp;lt;rlvcommand&amp;gt; | &amp;lt;metacommand&amp;gt;&lt;br /&gt;
 &amp;lt;rlvcommand&amp;gt; ::= &amp;quot;@&amp;quot; RLVCOMMAND&lt;br /&gt;
 &amp;lt;metacommand&amp;gt; ::= &amp;quot;!&amp;quot; METACOMMANDNAME &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
 &amp;lt;metacommandarguments&amp;gt; ::= &amp;quot;&amp;quot; | &amp;quot;/&amp;quot; ARG &amp;lt;metacommandarguments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we explicit the different terminal tokens:&lt;br /&gt;
 IDENT: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 KEY: any UUID&lt;br /&gt;
 ACK: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 RLVCOMMAND: any string without &amp;quot;,&amp;quot;&lt;br /&gt;
 METACOMMANDNAME: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
 ARG: any string without &amp;quot;/&amp;quot; and &amp;quot;,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Relay requirements===&lt;br /&gt;
These requirements do apply by default but the behavior of the relay may be modified as a result of having executed some metacommand defined in an optional x-tension.&lt;br /&gt;
&lt;br /&gt;
====Syntactical considerations====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
*A relay MUST NOT send anything on RLVR channel that is not a valid &amp;lt;r_msg&amp;gt;.&lt;br /&gt;
*A relay MUST ignore any message on RLVR channel that is not a &amp;quot;,&amp;quot;-list of 3 items and whose second item is not the key of the avatar wearing the relay or ffffffff-ffff-ffff-ffff-ffffffffffff.&lt;br /&gt;
When the relay receives a message meeting the above conditions and considering the 3rd item of the &amp;quot;,&amp;quot;-list as a &amp;quot;|&amp;quot;-list of &amp;lt;command&amp;gt;s, then for every &amp;lt;command&amp;gt;:&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is neither a valid &amp;lt;rlvcommand&amp;gt; or &amp;lt;metacommand&amp;gt;, the relay must ignore it and process the next &amp;lt;command&amp;gt;&#039;s;&lt;br /&gt;
* if the &amp;lt;command&amp;gt; is a &amp;lt;rlvcommand&amp;gt; or a &amp;lt;metacommand&amp;gt;, the relay MUST send an acknowledgement message back to the controller.&lt;br /&gt;
* an acknowledgement message is a &amp;lt;r_msg&amp;gt; (see above) such that&lt;br /&gt;
:*IDENT is the same as IDENT in the &amp;lt;c_msg&amp;gt; being processed&lt;br /&gt;
:*KEY is the key of the controller who sent the &amp;lt;c_msg&amp;gt;&lt;br /&gt;
:*&amp;lt;command&amp;gt; is the subcommand being processed&lt;br /&gt;
:*ACK is a string called &#039;&#039;acknowledgement value&#039;&#039;. By default the acknowledgement value is &amp;quot;ok&amp;quot; if the relay will execute the &amp;lt;command &amp;gt;, &amp;quot;ko&amp;quot; otherwise;&lt;br /&gt;
* every acknowledgement or message sent by the relay to one given controlling device must be issued by the same prim (so that the controlling device can restrict its listener to one source key) using the LSL function [[llRegionSayTo]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* Many meta-commands may have other acknowledgements than &amp;quot;ok&amp;quot; or &amp;quot;ko&amp;quot; (or none, for !pong). Their definitions supersede this specification.&lt;br /&gt;
* Note that unknown meta-commands cannot be executed and thus wil be acknowledged by &amp;quot;ko&amp;quot;.&lt;br /&gt;
* Known meta-commands which are sent with not enough parameters or parameters with types incompatible with those in the definition known by the relay also cannot be executed and will also be acknowledged by &amp;quot;ko&amp;quot;. (ex: the relay knows !x-who/key, but receives !x-who/integer/string).&lt;br /&gt;
&lt;br /&gt;
====Command handling====&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
* If a &amp;lt;rlvcommand&amp;gt; is acknowledged with value &amp;quot;ok&amp;quot;, the relay ensures the viewer is affected the same way as if the LSL instruction llOwnerSay(&amp;lt;rlvcommand&amp;gt;) was executed by a script in a primitive that handles only one controller.&lt;br /&gt;
* When processing a &amp;lt;metacommand&amp;gt;, if the relay knows at least one definition of &#039;!&#039;+METACOMMANDNAME for which the received &amp;lt;metacommandarguments&amp;gt; provide enough parameters, then it will be handled according to the definition handling the most parameters among the latter. Extra parameters are ignored.&lt;br /&gt;
* When acknowledging a &amp;lt;metacommand&amp;gt; by anything else than &amp;quot;ko&amp;quot;, the relay commits itself to execute it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks:&#039;&#039;&#039;&lt;br /&gt;
* For first requirement, it must be understood that the reference behavior is that the relay would have if it had one controller per prim. However handling several controllers from one unique prim is possible but requires taking care that different controllers do not interfere with each other, releasing each other&#039;s restrictions, for instance.&lt;br /&gt;
* For the second requirement, the word &amp;quot;handled&amp;quot; means that if the meta-command with these parameters is known, then requirements in known definition cannot be ignored. Sometimes, this can imply that the meta-command cannot be refused, for instance.&lt;br /&gt;
&lt;br /&gt;
====Session related requirements:====&lt;br /&gt;
*Closing a session clears all RLV restrictions that belong only to that session, clears all session variables and disables all behaviors relative to that session.&lt;br /&gt;
*Sessions that are not locked MUST be released after a reasonable timeout.&lt;br /&gt;
*Relay implementations MAY require an authed session for all &amp;lt;rlvcommand&amp;gt;&#039;s, except @xxx=&amp;lt;channel_number&amp;gt;, @clear[=xxx] and @xxx=y/rem commands, which MUST always be accepted.&lt;br /&gt;
*@xxx=n/add &amp;lt;rlvcommand&amp;gt;&#039;s, after being accepted, add a restriction and therefore Lock the session.&lt;br /&gt;
*Some metacommands described in x-tensions can also add restrictions and therefore Lock the session.&lt;br /&gt;
*!release, !version, !implversion, !x-orgversions and !x-.../clear[/...] commands are always accepted.&lt;br /&gt;
*!pong reactivates an existing session but never requires further auth, provided it is sent by the device to which ping was sent. The relay MUST resend to the viewer all stored restrictions belonging to the controlling device if they are not already active.&lt;br /&gt;
*Unless specified otherwise (see !x-who), no command can trigger an interactive dialog unless&lt;br /&gt;
:* they require an Authed session&lt;br /&gt;
:* and no session is currently open or it is open but not Authed yet.&lt;br /&gt;
*When releasing a Locked session, a relay MUST release all restrictions belonging to the device controlling the session.&lt;br /&gt;
*On the following events, a relay MUST release a locked session:&lt;br /&gt;
:* when the relay notices the controller has become unreachable,&lt;br /&gt;
:* wren the relay sends &amp;quot;release,&amp;lt;controller_key&amp;gt;,!release,ok&amp;quot; (due to acknowledging !release sent by the controller, or due to safewording triggered from the relay side).&lt;br /&gt;
*A relay MUST provide a mechanism for checking that every controlling device is reachable. It is not specified whether this checking process should be automatic or manually triggered.&lt;br /&gt;
*The absence of active restriction unlocks the session (and eventually releases it).&lt;br /&gt;
*A relay MUST remove restrictions from a session when (and only in these cases): &lt;br /&gt;
:* either the session controller specifically asks for the restriction to be released (&amp;quot;@restriction=y&amp;quot; &amp;quot;@restriction=rem&amp;quot;, &amp;quot;@clear=restriction&amp;quot; for RLV restrictions, and &amp;quot;!x-restriction/clear/...&amp;quot; for LSL restrictions),&lt;br /&gt;
:* or the session closed (for instance !release coming from the device, or safeword).&lt;br /&gt;
&lt;br /&gt;
===Controller requirements===&lt;br /&gt;
* A controller MUST not send anything on RLVR channel that is not a valid &amp;lt;c_msg&amp;gt;.&lt;br /&gt;
* A controller MUST, for each Locked session it controls, provide a mechanism that will unlock it in bounded time. (i.e.: either there is a menu that will release the victim, or there is a timer, or a menu should be able to start such a timer). At least one person MUST know what this mechanism is, and if it requires an action from someone else, be able to tell that other person what s/he has to do.&lt;br /&gt;
&lt;br /&gt;
==Core meta-commands and associated mechanisms==&lt;br /&gt;
&lt;br /&gt;
An ORG relay MUST at least support the meta-commands !release, !pong, !version, !implversion and !x-orgversions described below and implement their associated mechanisms.&lt;br /&gt;
&lt;br /&gt;
Particular meta-commands definitions and mechanisms may override general requirements above.&lt;br /&gt;
&lt;br /&gt;
===!release===&lt;br /&gt;
Sent by a controller, this command closes the session.&lt;br /&gt;
&lt;br /&gt;
* !release obviously opens no session, requires no Auth and is not Locking.&lt;br /&gt;
* If there is an actual session to close !release MUST be accepted by the relay and acknowledeged by &amp;quot;ok&amp;quot;.&lt;br /&gt;
* On accepting !release, the relay erases all data pertaining to the session and disables all restrictions of the session.&lt;br /&gt;
* When a relay decides to close a session on its own (user safeword, for instance) and it is not due to the controller being unreachable, the relay must send the following acknowledgement message:&lt;br /&gt;
       release,&amp;lt;controller_key&amp;gt;,!release,ok&lt;br /&gt;
&lt;br /&gt;
When receiving the latter message, the controller should act accordingly, for instance by resetting itself and making itself ready for the next session.&lt;br /&gt;
&lt;br /&gt;
Note that !release is not the same as @clear. @clear is interpreted by the relay as a RLV command and, as such, can only clear RLV restrictions. If RLV restrictions were the only restrictions of the session, then the session will be closed, but some x-tensions also define pure LSL based restrictions.&lt;br /&gt;
&lt;br /&gt;
===ping/!pong===&lt;br /&gt;
&lt;br /&gt;
The ping/!pong mechanism exists so that relays can check presence and responsiveness of a controller. This was primarily meant to be used on relay wearer relog, in order to reactivate all restrictions so that sessions persist on relog if the controller still exists and is ready to continue the session.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!pong&#039;&#039; cannot require auth and does not lock a session&lt;br /&gt;
&lt;br /&gt;
We call &#039;&#039;ping message&#039;&#039; a message from the relay, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;controller_key&amp;gt;,ping,ping&lt;br /&gt;
We call &#039;&#039;!pong message&#039;&#039; a message from the controller, having the following syntax:&lt;br /&gt;
 ping,&amp;lt;relay_key&amp;gt;,!pong&lt;br /&gt;
&lt;br /&gt;
====Relay side====&lt;br /&gt;
*A relay SHOULD NOT send an acknowledgement in response to &#039;&#039;!pong&#039;&#039;.&lt;br /&gt;
*A ping message can be sent any time by the relay to a known controller (in contrary to other acknowlegement messages that are always replies to controller commands).&lt;br /&gt;
*On wearer relog, for each existing Locked session, the relay must send a ping message to the session controller.&lt;br /&gt;
*When a !pong message is received from a controller, if it was a reply to a previous ping message:&lt;br /&gt;
:#if the session RLV restrictions contain unsit and the avatar was sitting on some object when the restriction was applied, then the relay MUST force the avatar to sit back on the same object (if still existing);&lt;br /&gt;
:#the relay MUST make sure all restrictions belonging to the session are made active again.&lt;br /&gt;
*If a ping message is sent and is not answered by the controller, then the relay closes the session.&lt;br /&gt;
&lt;br /&gt;
====Controller side====&lt;br /&gt;
*Unless it does not matter that the relay could close the session (or for another reason, the controller knows the relay will not close it), a controller SHOULD listen to ping messages and answer any ping message with a !pong message.&lt;br /&gt;
*A controller should ignore ping requests from relays it is not ready to handle.&lt;br /&gt;
&lt;br /&gt;
For instance, if the controller is a furniture which is already in use by another relay wearer, it would be inconsistant to let the pinging relay restore the restrictions without letting its wearer sit on the furniture. Or if the controller is not stateless and the state for the pinging relay has not been saved before, resuming the session from the initial state might be inconsistant.&lt;br /&gt;
&lt;br /&gt;
===!version===&lt;br /&gt;
The purpose of this meta-command is to query the version of the RLVR protocol supported by a relay.&lt;br /&gt;
&lt;br /&gt;
* !version opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !version with the version number of the RLVR protocol it supports (&amp;quot;1100&amp;quot; here, since ORG 0004 includes RLVR 1.100).&lt;br /&gt;
&lt;br /&gt;
Note this is the most common command for a controller to scan for nearby relays, as non-ORG relays also accept this command and answer it the way described above.&lt;br /&gt;
&lt;br /&gt;
===!implversion===&lt;br /&gt;
The purpose of this meta-command is to query the name and version of the relay implementation.&lt;br /&gt;
&lt;br /&gt;
* !implversion opens no session (and requires no auth, neither can lock a session)&lt;br /&gt;
* A relay MUST always acknowledge !implversion with its implementation version string... which can be any string.&lt;br /&gt;
&lt;br /&gt;
It is recommended this string includes the following elements:&lt;br /&gt;
* the relay name/brand/identifier,&lt;br /&gt;
* the version number of that relay name/brand/identifier,&lt;br /&gt;
* at the beginning, the string prefix &amp;quot;ORG=0004/&amp;quot;&lt;br /&gt;
The latter is convenient for checking for ORG compatibility using a command even non-ORG relay should understand.&lt;br /&gt;
&lt;br /&gt;
===!x-orgversions===&lt;br /&gt;
&lt;br /&gt;
This meta-command purpose it two-fold. First it allows a controlling device to ask a relay for the list of ORG x-tensions it supports, second it is similar to !version in RLVR protocol, as its reply gives the versions of the ORG core specification and ORG x-tensions that are implemented in the relay.&lt;br /&gt;
&lt;br /&gt;
 C&amp;lt;-&amp;gt;R&lt;br /&gt;
   -&amp;gt;   query,rUUID,!x-orgversions&lt;br /&gt;
  &amp;lt;-    query,cUUID,!x-orgversions,ORG=0004/who=002/email=006&lt;br /&gt;
&lt;br /&gt;
The acknowledgement string of the relay is a list separated by &amp;quot;/&amp;quot; whose items are of the form &amp;lt;package&amp;gt;=&amp;lt;version&amp;gt;. The first package is &amp;quot;ORG&amp;quot;, the core specification of ORG relays, its version string is the version of the specification (4 digits).  The other packages are ORG x-tension names (not meta-command names, as one x-tension can require several metacommands, thus the name does not include the prefix &amp;quot;!x-&amp;quot;), whose version string is 3 digits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a relay:&#039;&#039;&lt;br /&gt;
* The support of this metacommand is mandatory for an ORG relay.&lt;br /&gt;
* It is also required that the list of packages in the !x-orgversions reply includes the package &amp;quot;ORG&amp;quot; and the exact list of supported optional x-tensions.&lt;br /&gt;
* If several incompatible versions of an x-tension are supported, they must be listed ordered by version number. Ex: ORG=0004/who=002/email=005/email=006. If versions are backward compatible, it is necessary to report only the last one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Requirements for a controlling device:&#039;&#039; None. It is however recommended to use !x-orgversions when it makes sense for avoiding sending unsupported and useless metacommands later.&lt;/div&gt;</summary>
		<author><name>Satomi Ahn</name></author>
	</entry>
</feed>