OsRevokeScriptPermissions
From OpenSimulator
(Difference between revisions)
(Created page with "{{osslfunc |threat_level=Severe |function_syntax=void osRevokeScriptPermissions(key revoked_key, string function) |ossl_example=<source lang="lsl"> list functions = ["osNpcCre...") |
|||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
− | |threat_level=Severe | + | |threat_level=Severe '''(Pending Peer Review)''' |
− | |function_syntax= | + | |permissions=false |
+ | |delay=0 | ||
+ | |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", | + | // |
− | + | // osGrantScriptPermissions Script Example | |
− | + | // | |
− | + | ||
− | + | list functions = [ | |
+ | "osNpcCreate", "osNpcGetPos", "osNpcLoadAppearance", "osNpcGetRot", | ||
+ | "osNpcMoveTo", "osNpcRemove", "osNpcSaveAppearance", "osNpcSay", | ||
+ | "osNpcSetRot", "osNpcSit", "osNpcStand", "osNpcPlayAnimation", | ||
+ | "osNpcStopAnimation","osNpcMoveToTarget", "osNpcStopMoveToTarget", | ||
+ | "osOwnerSaveAppearance", "osAgentSaveAppearance" | ||
+ | ]; | ||
+ | |||
default | default | ||
{ | { | ||
state_entry() | state_entry() | ||
{ | { | ||
− | llSetColor(<1,0,0>,ALL_SIDES); | + | llSay(PUBLIC_CHANNEL, "Touch to see osGrantScriptPermissions usage."); |
+ | llSetColor(<1.0, 0.0, 0.0>, ALL_SIDES); | ||
} | } | ||
− | + | ||
− | touch_start(integer | + | touch_start(integer number) |
{ | { | ||
− | llSay( | + | llSay(PUBLIC_CHANNEL, "Enable"); |
− | + | ||
osGrantScriptPermissions(llGetOwner(), functions); | osGrantScriptPermissions(llGetOwner(), functions); | ||
state enabled; | state enabled; | ||
} | } | ||
} | } | ||
− | + | ||
state enabled | state enabled | ||
{ | { | ||
state_entry() | state_entry() | ||
{ | { | ||
− | llSetColor(<0,1,0>,ALL_SIDES); | + | llSetColor(<0.0, 1.0, 0.0>, ALL_SIDES); |
− | llSay( | + | llSay(PUBLIC_CHANNEL, "ossl functions enabled"); |
} | } | ||
− | + | ||
− | touch_start(integer | + | touch_start(integer number) |
{ | { | ||
osRevokeScriptPermissions(llGetOwner(), functions); | osRevokeScriptPermissions(llGetOwner(), functions); | ||
Line 39: | Line 48: | ||
} | } | ||
</source> | </source> | ||
− | 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. | + | 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. | ||
+ | |||
|description=Dynamically allow/disallow ossl execution to owner/creator/group by function name. | |description=Dynamically allow/disallow ossl execution to owner/creator/group by function name. | ||
| | | | ||
}} | }} |
Latest revision as of 05:42, 11 January 2021
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) | |
// // osGrantScriptPermissions Script Example // list functions = [ "osNpcCreate", "osNpcGetPos", "osNpcLoadAppearance", "osNpcGetRot", "osNpcMoveTo", "osNpcRemove", "osNpcSaveAppearance", "osNpcSay", "osNpcSetRot", "osNpcSit", "osNpcStand", "osNpcPlayAnimation", "osNpcStopAnimation","osNpcMoveToTarget", "osNpcStopMoveToTarget", "osOwnerSaveAppearance", "osAgentSaveAppearance" ]; default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch to see osGrantScriptPermissions usage."); llSetColor(<1.0, 0.0, 0.0>, ALL_SIDES); } touch_start(integer number) { llSay(PUBLIC_CHANNEL, "Enable"); osGrantScriptPermissions(llGetOwner(), functions); state enabled; } } state enabled { state_entry() { llSetColor(<0.0, 1.0, 0.0>, ALL_SIDES); llSay(PUBLIC_CHANNEL, "ossl functions enabled"); } touch_start(integer number) { 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. |