OsRevokeScriptPermissions

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Added permissions and delay information)
Line 3: Line 3:
 
|permissions=false
 
|permissions=false
 
|delay=0
 
|delay=0
|function_syntax=void osRevokeScriptPermissions(key revoked_key, string function)
+
|function_syntax= osRevokeScriptPermissions(key revoked_key, string function)
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
 
list functions = ["osNpcCreate", "osNpcGetPos", "osNpcLoadAppearance", "osNpcGetRot", "osNpcMoveTo",
 
list functions = ["osNpcCreate", "osNpcGetPos", "osNpcLoadAppearance", "osNpcGetRot", "osNpcMoveTo",

Revision as of 17:42, 1 May 2019

osRevokeScriptPermissions(key revoked_key, string function)
Dynamically allow/disallow ossl execution to owner/creator/group by function name.
Threat Level Severe (Pending Peer Review) is unknown threat level
Permissions Use of this function is always disabled by default
Extra Delay 0 seconds
Example(s)
list functions = ["osNpcCreate", "osNpcGetPos", "osNpcLoadAppearance", "osNpcGetRot", "osNpcMoveTo",
                "osNpcRemove", "osNpcSaveAppearance", "osNpcSay", "osNpcSetRot","osNpcSit", "osNpcStand",
                "osNpcPlayAnimation", "osNpcStopAnimation","osNpcMoveToTarget", "osNpcStopMoveToTarget",
                "osOwnerSaveAppearance", "osAgentSaveAppearance"];
 
default
{
    state_entry()
    {
        llSetColor(<1,0,0>,ALL_SIDES);
    }
 
    touch_start(integer det)
    {
        llSay(0, "Enable");
 
        osGrantScriptPermissions(llGetOwner(), functions);  
        state enabled;
    }
}
 
state enabled
{
    state_entry()
    {
        llSetColor(<0,1,0>,ALL_SIDES);
        llSay(0, "ossl functions enabled");
    }
 
    touch_start(integer det)
    {
        osRevokeScriptPermissions(llGetOwner(), functions);
        state default;
    }
}

This example will allow the owner of this object to create and manipulate NPCs. To allow other possibilities, change the llGetOwner() to any key for another avatar or group. The osRevokeScriptPermissions uses the same syntax to remove previuosly granted permissions.


Personal tools
General
About This Wiki