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

From Second Life Wiki
Jump to navigation Jump to search
m (no numbered list for single-usage commands)
m (notes section)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Template:RLV_Documentation/Command
{{Template:RLV_Documentation/Command
|command=@redirchat|type=Restriction
|command=@redirchat|type=Exception
|usage=@redirchat:<channel number>=<add/rem>
|usage=@redirchat:<channel number>=<add/rem>
|purpose=When active (@redirchat:11223344=add), this restriction redirects whatever the user says on the public channel ("/0") to the private channel provided in the option field. If several redirections are issued, the chat message will be redirected to each channel. It does not apply to emotes, and will not trigger any animation (typing start, typing stop, nodding) when talking. This restriction does not supercede @sendchannel. NOTE: As of RLV v1.22.1 / RLVa 1.1.0 @redirchat also truncates emotes on channel 0. It's not clear if this is a bug or a missing note in the API. An additional @emote=add works around this side-effect.
|purpose=When active (@redirchat:11223344=add), this restriction redirects whatever the user says on the public channel ("/0") to the private channel provided in the option field. If several redirections are issued, the chat message will be redirected to each channel. It does not apply to emotes, and will not trigger any animation (typing start, typing stop, nodding) when talking. This restriction does not superdede @sendchannel.
|version=1.16
|version=1.16
|notes=* As of RLV v1.22.1 / RLVa 1.1.0 @redirchat also truncates emotes on channel 0. It's not clear if this is a bug or a missing note in the API. An additional @emote=add works around this side-effect.
|seealso=rediremote
|seealso=rediremote
|example=<lsl>integer listenHandle;
|example=<lsl>integer listenHandle;

Latest revision as of 04:05, 9 July 2010


@redirchat

Type

Exception

Implemented

Implemented since RLV version 1.16

Usage

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

Purpose

When active (@redirchat:11223344=add), this restriction redirects whatever the user says on the public channel ("/0") to the private channel provided in the option field. If several redirections are issued, the chat message will be redirected to each channel. It does not apply to emotes, and will not trigger any animation (typing start, typing stop, nodding) when talking. This restriction does not superdede @sendchannel.

Notes

* As of RLV v1.22.1 / RLVa 1.1.0 @redirchat also truncates emotes on channel 0. It's not clear if this is a bug or a missing note in the API. An additional @emote=add works around this side-effect.

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("@redirchat:11223344=add");
           llSay(0, "Chat redirected to channel 11223344.");
       }
       else
       {
           llListenRemove(listenHandle);
           llOwnerSay("@redirchat:11223344=rem");
           llSay(0, "Chat back on public channel.");
       }
   }
   
   listen(integer channel, string name, key id, string message)
   {
       llSay(0, name + ": " + message);
   }

}

</lsl>