Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2021-10-20 15:57:52



Reply to topic  [ 4 posts ] 
RLV: @acceptpermission doesn't automatically accept attach 
Author Message

Joined: 2021-01-13 19:14:05
Posts: 40
Reply with quote
Hey Henri,

Got another RLV bug for you.

I've got this example script, contained in an object rezzed in-world, which when touched will attach itself as a temporary item, then will detach when touched.
Code:
integer stat;

default
{
    state_entry()
    {
        llSay(0, "RLVTest!");
    }

    touch_start(integer total_number)
    {
        llOwnerSay("@acceptpermission=add"); //don't prompt the user about attaching the object.
        if(!stat)
        {
            llOwnerSay("Attaching... (temporary)");
            llRequestPermissions( llGetOwner(), PERMISSION_ATTACH );
            llSetTimerEvent(5);
        }
        else
        {
            llOwnerSay("Detaching... (I'll be deleted!)");
            llRequestPermissions( llGetOwner(), PERMISSION_ATTACH );
            llDetachFromAvatar();
        }
    }
   
    attach(key id)
    {
        llOwnerSay("@acceptpermission=rem"); //remove the RLV permission management for safety.
        if (id)
        {
            llSetTimerEvent(0); //we've attached now, so no need for this any more.
            stat = 1;
            llOwnerSay( "I've got you now, " + llKey2Name(id) + "!");
        }
        else
            llOwnerSay( "Goodbye cruel world!");
    }
   
    run_time_permissions(integer perm)
    {
        if(perm & PERMISSION_ATTACH)
        {
            if(!stat)
            {
                llAttachToAvatarTemp(ATTACH_LHAND); //attach to the avatar as a temporary item, meaning it gets deleted upon detach.
            }
            else
            {
                llDetachFromAvatar(); //as this is a temporary attachment, the object gets deleted.
            }
        }
    }
   
    timer() //handler for when there isn't any attachment points left.
    {
        llOwnerSay("There's no more room left at the inn!");
        llDie();
    }
}


Only problem is, that under CoolVL I still get the permissions prompt before the object will attach.

I've tested this under Marine's viewer, which is working as expected.

Thanks!


2021-04-16 10:37:56
Profile

Joined: 2009-03-17 18:42:51
Posts: 4751
Reply with quote
Not a bug. Works as expected/designed/wanted.

In the Cool VL Viewer @acceptpermission is designed to NOT allow to bypass the permission dialog for temporary objects...

The problem with temporary objects is that they can do things to your avatar, then vanish (by detaching) without leaving any trace (they never appear in your inventory). Imagine a griefer who designs a pseudo RLV zone controller (i.e. an item you are likely to grant access via your relay) that would emit @acceptpermission, then rez a temp-attachment (preferably an obscene one, such as a grotesque penis or whatnot) that would use RLV to force-tp you to a crowded PG info HUB and make your avatar play obscene animations and emote (llShout(), preferrably) obscenities, then self-detach: your are good for SL's ban hammer and won't be able to prove anything !

At least, with the dialog, you can tell what object attempts to attach and give this info as a proof of your good faith to LL...

This said, it looks like, at some point, Marine added a "RestrainedLoveAutoTempAttach" setting to allow temp-attachments to bypass the permission dialog when @acceptpermission is in force attach without permission at all...
I find this waaaaaay too dangerous, personally, but I will add a "RestrainedLoveRelaxedTempAttach" setting; it will default to FALSE, will only be available from the Advanced -> RestrainedLove menu, and will pop up an alert dialog when enabled (when TRUE, it will allow temp attachments to bypass the permission dialog, when and only when @acceptpermission is in force).


2021-04-16 11:42:49
Profile WWW

Joined: 2021-01-13 19:14:05
Posts: 40
Reply with quote
Henri Beauchamp wrote:
Not a bug. Works as expected/designed/wanted.

In the Cool VL Viewer @acceptpermission is designed to NOT allow to bypass the permission dialog for temporary objects...

The problem with temporary objects is that they can do things to your avatar, then vanish (by detaching) without leaving any trace (they never appear in your inventory). Imagine a griefer who designs a pseudo RLV zone controller (i.e. an item you are likely to grant access via your relay) that would emit @acceptpermission, then rez a temp-attachment (preferably an obscene one, such as a grotesque penis or whatnot) that would use RLV to force-tp you to a crowded PG info HUB and make your avatar play obscene animations and emote (llShout(), preferrably) obscenities, then self-detach: your are good for SL's ban hammer and won't be able to prove anything !

At least, with the dialog, you can tell what object attempts to attach and give this info as a proof of your good faith to LL...

This said, it looks like, at some point, Marine added a "RestrainedLoveAutoTempAttach" setting to allow temp-attachments to bypass the permission dialog when @acceptpermission is in force attach without permission at all...
I find this waaaaaay too dangerous, personally, but I will add a "RestrainedLoveRelaxedTempAttach" setting; it will default to FALSE, will only be available from the Advanced -> RestrainedLove menu, and will pop up an alert dialog when enabled (when TRUE, it will allow temp attachments to bypass the permission dialog, when and only when @acceptpermission is in force).


Hey Henri, just tried today's build and unfortunately it's still not working quite as expected as the permissions dialog is still appearing for the script above after activating the the '@acceptpermission allows temp-attachments'

I noticed that in the description of the debug setting that it mentions 'allows temp-attachments not owned by you to bypass the permission dialog...', however in the example above the intention is that the item is always the property of the owner. (Figure this may have been an oversight)


2021-04-17 10:36:35
Profile

Joined: 2009-03-17 18:42:51
Posts: 4751
Reply with quote
It is working just fine, but you need to let a little delay between the "llOwnerSay("@acceptpermission=add");" and the "llRequestPermissions(llGetOwner(), PERMISSION_ATTACH);", else there might be a race condition (depending on the server load and the viewer frame rate) between the execution of @acceptpermission by the viewer and the attach permission request sent by the server: if the latter comes before the former, the viewer will not have yet granted the @acceptpermission restriction and will ask for permission to attach... Simply insert a llSleep(0.5) and you'll be on the safe side.

Unlike other RLV(a) viewers, the Cool VL Viewer always queues the RestrainedLove commands before executing them; this allows to detect conflicts and avoids race conditions, e.g. with force sit/unsit commands and the execution of the latter by the server, and also to properly restore outfits on login (or when changing outfits, including force-changing them via RLV transformation items, for example) even when scripted objects send attach/wear restrictions before every other item in the outfit can get restored/worn, and all this without the use of extremely dirty hacks and special cases like seen in other viewers...
On the other hand, you must not assume a command is executed immediately (with the exception of some info commands such as @version), but may be delayed by a couple of frames (or much more, on login outfit restoration or change, but that's no different than with other viewers and their outfit restoration hacks).


2021-04-17 13:12:18
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.