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

From Second Life Wiki
Jump to navigation Jump to search
(Created page with '{{Template:RLV_Documentation/Command |command=@sendim|type=Restriction |usage=#@sendim=<y/n> #@sendim:<UUID>=<rem/add> |purpose=When prevented, everything typed in IM will be dis...')
 
(source code fixes, usage fixes)
 
Line 1: Line 1:
{{Template:RLV_Documentation/Command
{{Template:RLV_Documentation/Command
|command=@sendim|type=Restriction
|command=@sendim|type=# Restriction
|usage=#@sendim=<y/n>
# Exception
#@sendim:<UUID>=<rem/add>
|usage=# @sendim=<y/n>
|purpose=When prevented, everything typed in IM will be discarded and a bogus message will be sent to the receiver instead. Example 1 is where all IM's are blocked, Example 2 is with an expection for one UUID you will be able to IM anyways.
# @sendim:<UUID>=<add/rem>
|purpose=# When prevented, everything typed in IM will be discarded and a bogus message will be sent to the receiver instead.
# You can add exceptions to allow IMs for certain UUIDs.
|version=1.0b
|version=1.0b
|seealso=recvim recvim_sec sendim sendim_sec
|seealso=recvim recvim_sec sendim_sec
|example=<lsl>integer restricted = FALSE;
|example=<lsl>integer restricted = FALSE;
   
   
Line 19: Line 21:
         {
         {
             llOwnerSay("@sendim=n");
             llOwnerSay("@sendim=n");
             llSay(0, "IM's are now restricted, won't be able to IM out.");
             llSay(0, "IMs are now restricted, won't be able to IM out.");
         }
         }
         else
         else
Line 28: Line 30:
     }
     }
}
}
 
</lsl>
//
|example_2=<lsl>integer restricted = FALSE;
// Example 2
// Edit here pls, so there are two boxes
//
 
integer restricted = FALSE;
   
   
default
default
Line 46: Line 43:
         if(restricted)
         if(restricted)
         {
         {
             llOwnerSay("@sendim=n,recvemote:fcf9eafc-a6b4-4de9-bda7-c44ddb649895=add");
             llOwnerSay("@sendim=n,sendim:fcf9eafc-a6b4-4de9-bda7-c44ddb649895=add");
             llSay(0, "IM's are now restricted, but with an exception.");
             llSay(0, "IMs are now restricted, but with an exception.");
         }
         }
         else
         else
         {
         {
             llOwnerSay("@sendim=y,recvemote:fcf9eafc-a6b4-4de9-bda7-c44ddb649895=rem");
             llOwnerSay("@sendim=y,sendim:fcf9eafc-a6b4-4de9-bda7-c44ddb649895=rem");
             llSay(0, "IM restriction lifted.");
             llSay(0, "IM restriction lifted.");
         }
         }

Latest revision as of 12:50, 7 July 2010


@sendim

Type

# Restriction
  1. Exception

Implemented

Implemented since RLV version 1.0b

Usage

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

Purpose

# When prevented, everything typed in IM will be discarded and a bogus message will be sent to the receiver instead.
  1. You can add exceptions to allow IMs for certain UUIDs.


Example 1

<lsl>integer restricted = FALSE;

default {

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

       restricted = 1-restricted;

       if(restricted)
       {
           llOwnerSay("@sendim=n");
           llSay(0, "IMs are now restricted, won't be able to IM out.");
       }
       else
       {
           llOwnerSay("@sendim=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("@sendim=n,sendim:fcf9eafc-a6b4-4de9-bda7-c44ddb649895=add");
           llSay(0, "IMs are now restricted, but with an exception.");
       }
       else
       {
           llOwnerSay("@sendim=y,sendim:fcf9eafc-a6b4-4de9-bda7-c44ddb649895=rem");
           llSay(0, "IM restriction lifted.");
       }
   }

}

</lsl>