Difference between revisions of "User:Toy Wylie/RLV Documentation/rediremote"

From Second Life Wiki
Jump to navigation Jump to search
m (usage fix)
 
Line 1: Line 1:
{{Template:RLV_Documentation/Command
{{Template:RLV_Documentation/Command
|command=@rediremote|type=Exception
|command=@rediremote|type=Exception
|usage=@rediremote:<channel number>=add
|usage=@rediremote:<channel number>=<add/rem>
 
@rediremote:<channel number>=rem
|purpose=When active (@rediremote:11223344=add), this restriction redirects whatever emote the user says on the public channel ("/0") to the private channel provided in the option field. If several redirections are issued, the emote will be redirected to each channel.
|purpose=When active (@rediremote:11223344=add), this restriction redirects whatever emote the user says on the public channel ("/0") to the private channel provided in the option field. If several redirections are issued, the emote will be redirected to each channel.
|version=1.19
|version=1.19
|seealso=redirchat
|seealso=redirchat
|example=<lsl>integer     listenHandle;
|example=<lsl>integer listenHandle;
integer     redirect = FALSE;
integer redirect = FALSE;
   
   
default
default

Latest revision as of 08:46, 7 July 2010


@rediremote

Type

Exception

Implemented

Implemented since RLV version 1.19

Usage

@rediremote:<channel number>=<add/rem>

Purpose

When active (@rediremote:11223344=add), this restriction redirects whatever emote the user says on the public channel ("/0") to the private channel provided in the option field. If several redirections are issued, the emote will be redirected to each channel.


See Also

Example

<lsl>integer listenHandle;

integer redirect = FALSE;

default {

   touch_start(integer total_number)
   {
       if (llDetectedKey(0) != llGetOwner()) return;

       redirect = 1-redirect;

       if(redirect)
       {
           listenHandle = llListen(11223344, "", llGetOwner(), "");
           llOwnerSay("@rediremote:11223344=add");
           llSay(0, "Emotes redirected to channel 11223344.");
       }
       else
       {
           llListenRemove(listenHandle);
           llOwnerSay("@rediremote:11223344=rem");
           llSay(0, "Emotes back on public channel.");
       }
   }
   
   listen(integer channel, string name, key id, string message)
   {
       llSay(0, name + llGetSubString(message, 3, -1));
   }

}

</lsl>