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

From Second Life Wiki
Jump to navigation Jump to search
(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...')
 
(source code fix, added proper exception syntax)
 
Line 1: Line 1:
{{Template:RLV_Documentation/Command
{{Template:RLV_Documentation/Command
|command=@sendchannel|type=Restriction
|command=@sendchannel|type=# Restriction
|usage=@sendchannel[:<channel>]=<y/n>
# Exception
|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.
|usage=# @sendchannel=<y/n>
# @sendchannel:<channel number>=<add/rem>
|purpose=# Complimentary of @sendchat, this command prevents the user from sending messages on non-public channels. It does not prevent the viewer automatic replies like @version=nnnn, @getstatus=nnnn etc.
# You can also set an exception to the aforementioned restriction for a given channel.
|version=1.10
|version=1.10
|seealso=sendchannel_sec
|seealso=sendchannel_sec
|example=<lsl>integer listenHandle;
|example=<lsl>integer listenHandle;
integer redirect = FALSE;
integer redirect = FALSE;
 
default
default
{     
{     
Line 19: Line 22:
         {
         {
             listenHandle = llListen(11223344, "", llGetOwner(), "");
             listenHandle = llListen(11223344, "", llGetOwner(), "");
             llOwnerSay("@redirchat:11223344=add,sendchannel:11223344=n");
             llOwnerSay("@redirchat:11223344=add,sendchannel=n,sendchannel:11223344=add");
             llSay(0, "Chat redirected to channel 11223344, and all other channels are restricted.");
             llSay(0, "Chat redirected to channel 11223344, and all other channels are restricted.");
         }
         }
Line 25: Line 28:
         {
         {
             llListenRemove(listenHandle);
             llListenRemove(listenHandle);
             llOwnerSay("@redirchat:11223344=rem,sendchannel:11223344=y");
             llOwnerSay("@redirchat:11223344=rem,sendchannel=y,sendchannel:11223344=rem");
             llSay(0, "Chat back on public channel, and all channels are again free.");
             llSay(0, "Chat back on public channel, and all channels are again free.");
         }
         }

Latest revision as of 12:58, 7 July 2010


@sendchannel

Type

# Restriction
  1. Exception

Implemented

Implemented since RLV version 1.10

Usage

# @sendchannel=<y/n>
  1. @sendchannel:<channel number>=<add/rem>

Purpose

# Complimentary of @sendchat, this command prevents the user from sending messages on non-public channels. It does not prevent the viewer automatic replies like @version=nnnn, @getstatus=nnnn etc.
  1. You can also set an exception to the aforementioned restriction for a given 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("@redirchat:11223344=add,sendchannel=n,sendchannel:11223344=add");
           llSay(0, "Chat redirected to channel 11223344, and all other channels are restricted.");
       }
       else
       {
           llListenRemove(listenHandle);
           llOwnerSay("@redirchat:11223344=rem,sendchannel=y,sendchannel:11223344=rem");
           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>