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

From Second Life Wiki
Jump to navigation Jump to search
m (type fix, examples split)
Line 1: Line 1:
{{Template:RLV_Documentation/Command
{{Template:RLV_Documentation/Command
|command=@recvim|type=Restriction
|command=@recvim|type=# Restriction
|usage=#@recvim=<y/n>
# Exception
#@recvim:<UUID>=<rem/add>
|usage=# @recvim=<y/n>
|purpose=When prevented, every incoming IM will be discarded and the sender will be notified that the user cannot read them. Example 1 is where all IM's are blocked, Example 2 is with an expection for one UUID that will be able to IM anyways.
# @recvim:<UUID>=<add/rem>
|purpose=# When prevented, every incoming IM will be discarded and the sender will be notified that the user cannot read them. Example 1 is where all IM's are blocked.
# Example 2 is with an exception for one UUID that will be able to IM anyways.
|version=1.0b
|version=1.0b
|seealso=recvim recvim_sec sendim sendim_sec
|seealso=recvim_sec sendim sendim_sec
|example=<lsl>integer restricted = FALSE;
|example=<lsl>integer restricted = FALSE;
   
   
Line 28: Line 30:
     }
     }
}
}
 
</lsl>
//
|example_2=<lsl>
// Example 2
// Edit here pls, so there are two boxes
//
 
integer restricted = FALSE;
integer restricted = FALSE;
   
   

Revision as of 12:32, 7 July 2010


@recvim

Type

# Restriction
  1. Exception

Implemented

Implemented since RLV version 1.0b

Usage

# @recvim=<y/n>
  1. @recvim:<UUID>=<add/rem>

Purpose

# When prevented, every incoming IM will be discarded and the sender will be notified that the user cannot read them. Example 1 is where all IM's are blocked.
  1. Example 2 is with an exception for one UUID that will be able to IM anyways.


Example 1

<lsl>integer restricted = FALSE;

default {

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

       restricted = 1-restricted;

       if(restricted)
       {
           llOwnerSay("@recvim=n");
           llSay(0, "IM's are now restricted.");
       }
       else
       {
           llOwnerSay("@recvim=y");
           llSay(0, "IM restriction lifted.");
       }
   }

}

</lsl>

Example 2

<lsl>

integer restricted = FALSE;

default {

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

       restricted = 1-restricted;

       if(restricted)
       {
           llOwnerSay("@recvim=n,recvemote:fcf9eafc-a6b4-4de9-bda7-c44ddb649895=add");
           llSay(0, "IM's are now restricted, but with an exception.");
       }
       else
       {
           llOwnerSay("@recvim=y,recvemote:fcf9eafc-a6b4-4de9-bda7-c44ddb649895=rem");
           llSay(0, "IM restriction lifted.");
       }
   }

}

</lsl>