Fix update-receiver.lsl failing to self-delete, and a security issue. (#22)

The types in the list are strings, so they won't match a key.

Remove the pin from the prim when removing the script.
This commit is contained in:
Sei-Lisa 2017-08-27 02:39:50 +02:00 committed by codeviolet
parent 56c16cf6bf
commit e03807caa7

View file

@ -53,10 +53,11 @@ default
{ {
if (start) if (start)
{ {
if (~llListFindList(admin_avatars, [llGetOwner()])) if (~llListFindList(admin_avatars, [(string)llGetOwner()]))
{ {
llRegionSayTo(llGetOwner(), 0, "Removing :" + llGetScriptName()); llRegionSayTo(llGetOwner(), 0, "Removing :" + llGetScriptName());
} }
llSetRemoteScriptAccessPin(0);
llRemoveInventory(llGetScriptName()); llRemoveInventory(llGetScriptName());
} }
} }
@ -87,8 +88,9 @@ default
{ {
if (change & CHANGED_OWNER) if (change & CHANGED_OWNER)
{ {
if (!llListFindList(admin_avatars, [llGetOwner()])) if (llListFindList(admin_avatars, [(string)llGetOwner()]) == -1)
{ {
llSetRemoteScriptAccessPin(0);
llRemoveInventory(llGetScriptName()); llRemoveInventory(llGetScriptName());
} }
} }