User:Toy Wylie/RLV Documentation/sendchannel

From Second Life Wiki
< User:Toy Wylie‎ | RLV Documentation
Revision as of 09:24, 7 July 2010 by Liace Parx (talk | contribs) (Created page with '{{Template:RLV_Documentation/Command |command=@sendchannel|type=Restriction |usage=@sendchannel[:<channel>]=<y/n> |purpose=Complimentary of @sendchat, this command prevents the u...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


@sendchannel

Type

Restriction

Implemented

Implemented since RLV version 1.10

Usage

@sendchannel[:<channel>]=<y/n>

Purpose

Complimentary of @sendchat, this command prevents the user from sending messages on non-public channels. If channel is specified, it becomes an exception to the aforementioned restriction. It does not prevent the viewer automatic replies like @version=nnnn, @getstatus=nnnn etc.


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,sendchannel:11223344=n");
           llSay(0, "Chat redirected to channel 11223344, and all other channels are restricted.");
       }
       else
       {
           llListenRemove(listenHandle);
           llOwnerSay("@redirchat:11223344=rem,sendchannel:11223344=y");
           llSay(0, "Chat back on public channel, and all channels are again free.");
       }
   }

   listen(integer channel, string name, key id, string message)
   {
       llSay(0, name + ": " + message);
   }

}

</lsl>