User:Toy Wylie/RLV Documentation/sendim - Second Life Wiki

User:Toy Wylie/RLV Documentation/sendim

From Second Life Wiki

Second Life Wiki > Toy Wylie/RLV Documentation/sendim
Jump to: navigation, search


@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

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.");
        }
    }
}

Example 2

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.");
        }
    }
}