Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Parcel access control from within a script

Eli Larsson
Registered User
Join date: 12 Nov 2008
Posts: 2
04-10-2009 08:15
Hi all,

I have a bit of a problem, and can't think of a nice clean way of sorting it out.

Here's some back-ground:

I have written a little php application which enables a user to 'book' / 'reserve' a parcel of land through a little webpage. I've written an LSL script which talks to a MySQL database to determine if (at any point in time) that parcel has been reserved ... and who has access to it. So currently, I have set my parcel of land to 'no public access' ... so everyone sees the 'No Entry' sign around the land - if my parcel-manager script detects the person who made the booking (on the website) then they are granted access to the parcel. So, this means that only the person who has made a booking for the parcel has access to the parcel... - a simple reservation system.

OK, the problem is ... it works the wrong way around. What I really want is .... for the land to have public access ... a part from the times which are booked. So, normally anyone can visit and use the parcel. But, if someone has made a booking ... then only the person who has made the booking can have access (e.g. the public access is removed during the booking period).

So, what I would like to do is to control the public access attribute of a parcel of land from within a script ( in an object which resides in the parcel, and is owned by the same group which owns the parcel).

Does anyone have any ideas ? I've been looking through the LSL library / API and can't see (perhaps I can't see the wood for the trees :-) ) a way of controlling the public access (I can see the 'Get' functions .... appears to not be any 'Set' functions though - grrrrr).

I've thought about trying to work-out the members of a group and adding all members to the access-list (but ... don't appear to be able to do this either). The only approach I can think of at the moment is sensing anyone near the parcel and granting them access (by default) and then removing access for a booking .... though this is really clunky --- I would very much rather not do this.... .... what I want to do is to control the public access attribute from within a script.

Please, if you have any ideas / approaches / experience of this type of problem ... please help - it would be very much appreciated.

Thanks in advance, Eli
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
04-10-2009 11:22
The only way is closing the land and use this functions to manage the access on it.

llAddToLandBanList
http://wiki.secondlife.com/wiki/LlAddToLandBanList

llAddToLandPassList
http://wiki.secondlife.com/wiki/LlAddToLandPassList

llEjectFromLand
http://wiki.secondlife.com/wiki/LlEjectFromLand

llRemoveFromLandBanList
http://wiki.secondlife.com/wiki/LlRemoveFromLandBanList

llRemoveFromLandPassList
http://wiki.secondlife.com/wiki/LlRemoveFromLandPassList

llResetLandBanList
http://wiki.secondlife.com/wiki/LlResetLandBanList

llResetLandPassList
http://wiki.secondlife.com/wiki/LlResetLandPassList
_____________________


RAW terrain files - terraform your SIM!!
http://www.wishland.info/
PD:the wiki its your friend ;)
http://wiki.secondlife.com/wiki/LSL_Portal
Eli Larsson
Registered User
Join date: 12 Nov 2008
Posts: 2
04-10-2009 11:32
Thanks Papalopulus - this is what I've been fearing ... it's going to make things a little 'clunky'.... Do you know (I haven't tried ... and need to experiment) if the ban list still operates with Public Access set ? .... perhaps the way to do it is to ban people which are not part of a booking (may be use a sensor to detect them) and reset the ban list once the booking is over (I think this is what you are suggesting ?)

Thanks. Eli
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
04-10-2009 11:36
Yes if you has the land in open mode , you need to ban them or unban them to get access on it.

here you has an example from Void Singer using the funtion LlOverMyLand



http://wiki.secondlife.com/wiki/LlOverMyLand
_____________________


RAW terrain files - terraform your SIM!!
http://www.wishland.info/
PD:the wiki its your friend ;)
http://wiki.secondlife.com/wiki/LSL_Portal
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
04-10-2009 12:47
hmmm I need to update that thanks, Papalopulus. the wiki link in the script now goes to the wrong page, and IIRC signing examples is discouraged.

PS. if you post in scripting tips, for scripting question you'll usually get more comprehensive answers to scripting questions, and probably a few off the wall ideas too.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
04-10-2009 12:51
From: Void Singer

PS. if you post in scripting tips, for scripting question you'll usually get more comprehensive answers to scripting questions, and probably a few off the wall ideas too.


Oppss!!
I forgot to say that :p
Void has right ,in that place you can get more answers ;)
_____________________


RAW terrain files - terraform your SIM!!
http://www.wishland.info/
PD:the wiki its your friend ;)
http://wiki.secondlife.com/wiki/LSL_Portal