multi user teleport home security script
|
|
Gene Replacement
.........................
Join date: 26 May 2006
Posts: 54
|
07-13-2006 18:36
Here's a teleport home security script I've put together because I was bored and people asked for it. I'm posting it here first as I'd like some feedback so I can make any needed changes before I post it in the script library. - multi user - admins can add/remove other admins so that anyone you choose can add people to the teleport home list.
- 96m range, a limitation of sensors.
- supports group owned land, just deed to group.
- bulleted lists are cool
By default, the owner of the script is added as the only admin, and will remain an admin after the object is deeded to group. Names are case sensitive for now, maybe if I get bored I will fix that for you lazy people. The script listens on channel 333, so all commands should go on that channel. Any problems? post them here. commands: addban name delban name list bans addadmin name deladmin name list admins //Open Source Teleport Home script 0.3 by Gene Replacement //Made with group owned controls in mind. //If this breaks you're either a moron or a jerk who bans too many people!
//By default this listens on channel 333. //To ban avatar, type addban Avatar Name on channel 333. //example: /333addban Prokofy Lastname
//COMMANDS: //addban name //delban name //list bans //addadmin name //deladmin name //list admins //list commands?
list adminNames; list bannedNames;
integer isListed (string jerk, list listlol) { return (llListFindList(listlol, [jerk]) != -1); }
integer isAgent(key id) { return (llGetAgentSize(id) != ZERO_VECTOR); }
default { state_entry() { llListen(333,"","",""); llOwnerSay("Gene's Teleport Home 0.3 initialized."); llOwnerSay("'" + llKey2Name(llGetOwner()) + "' has been added as the default admin."); llOwnerSay("This object may now be deeded to group if it is being used on group owned land."); adminNames += [llKey2Name(llGetOwner())]; llSensorRepeat("", NULL_KEY, AGENT, 96, TWO_PI, 30); } sensor(integer numDetected) { //maybe add something to ignore case because SLers are lazy! integer x; for (x = 0; x < numDetected; x++) { if (isListed(llDetectedName(x), bannedNames)) //if (llOverMyLand(llDetectedKey(x))) llSay(0,"pretend teleport of " + llDetectedName(x));//llTeleportAgentHome(llDetectedKey(x)); } } listen(integer channel, string name, key id, string message) { //check if id is an agent to prevent admin spoofing with renamed objects. if (isAgent(id) & isListed(name,adminNames)) { string cmd = llToLower(llGetSubString(message, 0, llSubStringIndex(message, " ") - 1)); string name = llGetSubString(message, llSubStringIndex(message, " ") + 1, -1); if (cmd == "addban") { bannedNames += [name]; llSay(0, "Added '" + name + "' to ban list."); } else if (cmd == "delban") { integer listPos = llListFindList(bannedNames, [name]); if (listPos == -1) llSay(0, "Could not locate '" + name + "' in ban list."); else { bannedNames = llDeleteSubList(bannedNames, listPos, listPos); llSay(0, "'" + name + "' removed from ban list."); } } else if (cmd == "addadmin") { adminNames += [name]; llSay(0, "Added '" + name + "' to admin list."); } else if (cmd == "deladmin") { integer listPos = llListFindList(adminNames, [name]); if (listPos == -1) llSay(0, "Could not locate '" + name + "' in admin list."); else { adminNames = llDeleteSubList(adminNames, listPos, listPos); llSay(0, "'" + name + "' removed from admin list."); } } else if (cmd == "list" & name == "bans") { integer i; string sushi; for (i = 0; i < llGetListLength(bannedNames); i++) sushi += llList2String(bannedNames,i) + ", "; llSay(0, "Banned avatars: " + sushi); } else if (cmd == "list" & name == "admins") { integer i; string sushi; for (i = 0; i < llGetListLength(adminNames); i++) sushi += llList2String(adminNames,i) + ", "; llSay(0, "Admins: " + sushi); } } } } 0.2 fixes: - replaced my bootlegged llListFindList function with the real thing  thanks Keknehv 0.3 fixes: - replaced IM with Say.
|
|
Angel Fluffy
Very Helpful
Join date: 3 Mar 2006
Posts: 810
|
07-13-2006 19:13
Out of curiousity, why do no script writers have a security orb that, when it detects someone on its banned list, just uses llAddToLandBanList on them for a duration of, say, 5 days.
That would get rid of them quickly, from most of your parcel, and keep the out effectively. It would also mean you could check the ban list to see who was banned recently, without needing to get the object to IM you (impossible for group-owned objects, and annoying with an IM cap anyway).
The only reason I suggest this scripted approach over, say, just using the land ban list is that scripts can hold up to 70 (IIRC, which I might not) names whereas the land ban list holds only 50.
_____________________
Volunteer Portal (FAQs!) : https://wiki.secondlife.com/wiki/Volunteer_Portal
JIRA / Issue Tracker : http://jira.secondlife.com (& http://tinyurl.com/2jropp)
|
|
Gene Replacement
.........................
Join date: 26 May 2006
Posts: 54
|
07-13-2006 20:29
From: Angel Fluffy Out of curiousity, why do no script writers have a security orb that, when it detects someone on its banned list, just uses llAddToLandBanList on them for a duration of, say, 5 days.
That would get rid of them quickly, from most of your parcel, and keep the out effectively. It would also mean you could check the ban list to see who was banned recently, without needing to get the object to IM you (impossible for group-owned objects, and annoying with an IM cap anyway).
The only reason I suggest this scripted approach over, say, just using the land ban list is that scripts can hold up to 70 (IIRC, which I might not) names whereas the land ban list holds only 50. 72 for a predefined list, and an almost unlimited amount for script made lists, you'd have to reach the 16(?)kb script size limit to hit a limit on the number of avatars in the list, which should be pretty hard to hit with this script. But to answer your question, teleporting someone home is a LOT more efficient than parcel banning. First, they usually get sent a good distance away, and will often have no recollection of who they were annoying, making it a lot less likely that they will come back. A regular parcel ban just throws them onto nearby land and will probably irritate the person, causing them to retaliate with scripted weapons or whatever. The point here is to make it difficult for the person to come back, so that they avoid coming near the parcel where a step in the wrong direction will send them home.
|
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
07-13-2006 21:11
You can store over 500 names in the list before reaching the memory limit. Try replacing isListed with this: integer isListed (string jerk, list listlol) { return ( llListFindList( listlol, [jerk] ) != -1 ); }
It will be many times faster.
|
|
Angel Fluffy
Very Helpful
Join date: 3 Mar 2006
Posts: 810
|
07-14-2006 00:07
From: Gene Replacement 72 for a predefined list, and an almost unlimited amount for script made lists, you'd have to reach the 16(?)kb script size limit to hit a limit on the number of avatars in the list, which should be pretty hard to hit with this script.
But to answer your question, teleporting someone home is a LOT more efficient than parcel banning. First, they usually get sent a good distance away, and will often have no recollection of who they were annoying, making it a lot less likely that they will come back. A regular parcel ban just throws them onto nearby land and will probably irritate the person, causing them to retaliate with scripted weapons or whatever.
The point here is to make it difficult for the person to come back, so that they avoid coming near the parcel where a step in the wrong direction will send them home. Ok, good point. Doesn't LL intend to remove llTeleportAgentHome at some point in the future though? What will you do then?
_____________________
Volunteer Portal (FAQs!) : https://wiki.secondlife.com/wiki/Volunteer_Portal
JIRA / Issue Tracker : http://jira.secondlife.com (& http://tinyurl.com/2jropp)
|
|
Ron Overdrive
Registered User
Join date: 10 Jul 2005
Posts: 1,002
|
07-14-2006 05:29
From: Angel Fluffy Ok, good point. Doesn't LL intend to remove llTeleportAgentHome at some point in the future though? What will you do then? llUnsit & llEjectFromLand probly, its also more legal to use in a security device then llTeleportAgentHome.
|
|
Gene Replacement
.........................
Join date: 26 May 2006
Posts: 54
|
07-14-2006 07:32
From: Angel Fluffy Ok, good point. Doesn't LL intend to remove llTeleportAgentHome at some point in the future though? What will you do then? I imagine it'll be removed only when it's not needed anymore and a better solution is available to land owners? We'll see.
|
|
Harleen Gretzky
Registered User
Join date: 27 Oct 2005
Posts: 51
|
07-14-2006 09:57
Why not do both? That is what I do in my script similiar to this, after teleporting them home I add them to the ban list.
|
|
Jesse Murdock
Moves You
Join date: 23 Jun 2004
Posts: 149
|
07-14-2006 18:52
Not really my usual forum to post in  but I think I can help clarify the actual necessity for the functions this script employs. On a private island teleport home is the only real method of ejection, unless you want the perp bouncing up and down off your island for as long as they desire. Ban List limits are very low, and reached quickly in some areas. I know personally, my team and I had to add over 20 avatars to it yesterday alone(yes was a crazy day indeed). I like the idea behind this script, Another version that would be nice could employ collision detection and be situated on the landing point or telehub, and would have no listens, just notecard setup. Then you could transfer names from the sensor version to that to free up the sensor version's memory. This obviously would only work on a private estate. As far as non private estates go, I was told that teleport home is consider an abusive attack unless the land is set to unsafe.
_____________________
The writing's on the wall...
|
|
Gene Replacement
.........................
Join date: 26 May 2006
Posts: 54
|
07-14-2006 20:26
I think the notion of teleport home scripts being abusive comes from the fact that llTeleportAgentHome works on anyone in a sim as long as you have their key and the script is on your land. I imagine people were putting poorly written teleport home scripts on their tiny parcels and teleporting others home who were on different parcels. This could be considered abusive, however I don't see how teleporting someone who is on your land can be abusive. From what I understand, Luskwood has been using a very similar system to keep unwanteds off of their land, and if a respected community like that is allowed to do it, I imagine any land owner is allowed.
|
|
Macphisto Angelus
JAFO
Join date: 21 Oct 2004
Posts: 5,831
|
07-18-2006 10:25
From: Gene Replacement I'm posting it here first as I'd like some feedback so I can make any needed changes before I post it in the script library. .
supports group owned land, just deed to group.
When I deed it to group and then add a person to the ban, I get a script error that deeded objects cannot IM. All other functions, like listing bans, etc do not work without IM evidently.  Just posting what I found. Maybe there is an easy work around I didnt do.
_____________________
From: Natalie P from SLU Second Life: Where being the super important, extra special person you've always been sure you are (at least when you're drunk) can be a reality! From: Ann Launay I put on my robe and wizard ha... Oh. Nevermind then.
|
|
eltee Statosky
Luskie
Join date: 23 Sep 2003
Posts: 1,258
|
07-18-2006 10:49
Basically you can manually ban/eject/kick someone from your land at your discretion. The automated nature of many systems is what runs afoul of the TOS, aka attaching a go home system to a scanner and using it on everyone, instead of 'someone', repeatedly, that becomes problematic.
There is absolutely nothing wrong with using a 'gohomer' like system where you say gohome <name> and the person is sent home, its your land and you have the ultimate discretion over whether or not someone is allowed onto it.
As to the script command itself, no, the *target* has to be on your land, otherwise the command will be ignored by the system.
With the advent of the new ban height, and mute, overall ban actually works better. The problem is the ban number is still so limited as to make the whole system only marginally useful.
What is needed is not just a greater ban list, but some form of 'secondary' ban queue, mabye only 25 people, mabye unlimited people but names are plucked out of it after say 72 hours automatically, something that *SCRIPT* calls can access, and right click ban can access, and will always succeed, will never fail, in that if this little 'rolling' list will never be 'full', depending on which way it was done either it'd just stack them into the list, or it'd pop the first name off the list, so there would ALWAYS be an effective direct ban.
Save the existing ban list for people *personally* and manually entered into the plots properties.
That would make most send-home security fairly redundant.
_____________________
wash, rinse, repeat
|
|
Gene Replacement
.........................
Join date: 26 May 2006
Posts: 54
|
07-18-2006 12:06
From: Macphisto Angelus When I deed it to group and then add a person to the ban, I get a script error that deeded objects cannot IM. All other functions, like listing bans, etc do not work without IM evidently. Just posting what I found. Maybe there is an easy work around I didnt do. Ah, I fixed this, but forgot to use that revision when posting! oops! fixed it now. eltee I *think* a rolling list would be possible using scripts, I will look into this.
|
|
Macphisto Angelus
JAFO
Join date: 21 Oct 2004
Posts: 5,831
|
07-18-2006 12:32
From: Gene Replacement Ah, I fixed this, but forgot to use that revision when posting! oops! fixed it now. eltee I *think* a rolling list would be possible using scripts, I will look into this. Thanks Gene.  Just trying to help with the test. 
_____________________
From: Natalie P from SLU Second Life: Where being the super important, extra special person you've always been sure you are (at least when you're drunk) can be a reality! From: Ann Launay I put on my robe and wizard ha... Oh. Nevermind then.
|
|
eltee Statosky
Luskie
Join date: 23 Sep 2003
Posts: 1,258
|
07-18-2006 13:20
From: Gene Replacement Ah, I fixed this, but forgot to use that revision when posting! oops! fixed it now. eltee I *think* a rolling list would be possible using scripts, I will look into this. Thats not really what i'm talking about. I'm talking about a back-end implementation so script-ban functions always *SUCCEED*, aka there will never be a point, no matter how big or small the 'main' ban list is, where script ban (or also the right click eject and ban) will *FAIL* like they do now (when the list is full).
_____________________
wash, rinse, repeat
|
|
Michi Lumin
Sharp and Pointy
Join date: 14 Oct 2003
Posts: 1,793
|
07-18-2006 19:58
I think what eltee means, Gene, is a system-level FIFO rolling ban... to make it say, for example,
"The permanent ban list is full, but instead of just failing, the person will be added to the 24-hour 50-person system 'fifo/floating/decaying' banlist until you can either remove someone from the main list, or the problem is resolved."
Not that your multi-user suggestion is at all useless in the situation we have now, except, I'd guess, the limitations on sensors and range... and how they work in large crowds(Which are real limitations -- just in case LL is reading.)
I think the main thing here is: script time, and sensor limitations.
I'm gonna give your script a try, though, test drive as it were. Because there's theory, and then there's practice -- in practice it may be less of an issue than we think, in theory.
(re: known knowns, unknown knowns, known unknowns and unknown unknowns.)
|
|
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
|
07-18-2006 21:24
if you are on the mainland I always considered it more polite to llEjectFromLand rather than being teleported home for straying over the line.
|
|
Gene Replacement
.........................
Join date: 26 May 2006
Posts: 54
|
07-20-2006 15:02
Hmm, with this latest patch and the 300 avatar parcel ban limit, I wonder if there's any point in adding to this. 300 should be plenty for everyone 
|
|
eltee Statosky
Luskie
Join date: 23 Sep 2003
Posts: 1,258
|
07-20-2006 15:18
I don't think the 'permanent' ban would really need to be expanded again, at least not for a very long time. I would like to see a 'temporary' ban, seperate list, that things could hit.
The problem with the ban right now specificially when it comes to right click and scripted objects, is that if its 'full' you just get an error and nothing happens.
A second, much smaller, say, something like 50 names, or mabye just names put into it only last 72 hours, etc kind of temporary list, that the 'scripted' ban functions can access, and *ALWAYS* succed, either by pushing off the oldest of the 50 names, or jus queueing another name in for 72 hrs, etc, would be far far more practical.
Leave the current 300 person 'permanent' ban list as it is, but make it so only direct name search and drop can access it. That way if there is a specific named person you want to forever bar, or a number of them, because they are just there to attack you, you can leave them banned forever, and more annoying random newbie or alt attacks, you can ban them *right now* with a script especially, and it will always, always work, and if you want them really permanently banned, you can do it by hand, later, after the attack is over.
_____________________
wash, rinse, repeat
|
|
Ron Overdrive
Registered User
Join date: 10 Jul 2005
Posts: 1,002
|
07-21-2006 05:00
From: eltee Statosky I don't think the 'permanent' ban would really need to be expanded again, at least not for a very long time. I would like to see a 'temporary' ban, seperate list, that things could hit.
The problem with the ban right now specificially when it comes to right click and scripted objects, is that if its 'full' you just get an error and nothing happens.
A second, much smaller, say, something like 50 names, or mabye just names put into it only last 72 hours, etc kind of temporary list, that the 'scripted' ban functions can access, and *ALWAYS* succed, either by pushing off the oldest of the 50 names, or jus queueing another name in for 72 hrs, etc, would be far far more practical.
Leave the current 300 person 'permanent' ban list as it is, but make it so only direct name search and drop can access it. That way if there is a specific named person you want to forever bar, or a number of them, because they are just there to attack you, you can leave them banned forever, and more annoying random newbie or alt attacks, you can ban them *right now* with a script especially, and it will always, always work, and if you want them really permanently banned, you can do it by hand, later, after the attack is over. As a part of the lsl functions for managing the perminate ban list they allow you to set the amount of time someone will stay in the ban list before the system automaticly removes them. By default this setting is 0 for perminate, changing 0 to say 168 (it goes by hours) will ban them for a week. This was added back in 1.8 though you rarely see it used since most people prefer jumping the gun and teleport them home all the time. If all you want is a 'gohome' orb that doesn't use scanners and internal lists to manage this would work for you. LSL Wiki Reference for llAddToLandBanList
|