Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Security Remove_Imposters  

Remove_Imposters

Remove_Imposters

Category: Security
By : Zena Juran
Created: 2010-11-16 Edited: 2010-11-16
Worlds: Second Life

the Zip file

Download all files for Remove_Imposters
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Remove_Imposters_1.lsl
1 // Sensor Detect/Remove Display Name Impostor by Zena Juran
2
3
4
5 ////////////////////////////////////////////////////////////////////////////
6
7 // This script will detect and remove (from owner's land) any avatars using the same Display Name as the owner's User Name.
8
9 // Place one copy of script into any prim and rez on your owned land.
10
11 // Touch prim to toggle on and off.
12
13 // Ejection and TPHome are immediate with NO WARN TIME or MESSAGE
14
15 ////////////////////////////////////////////////////////////////////////////
16
17
18
19
20 ////////////////////////////////////////////////////////////////////////////
21
22 // Change These Values to Match Specific Needs
23
24 // Set Scan Range (meters)
25 float range = 96;
26
27 //Set Scan Time (seconds)
28 float rate = 5;
29
30 // Set Method of Impostor Removal to TRUE (only one integer TRUE at a time)
31
32 integer eject = FALSE; //Eject from Land Only
33 integer tp = TRUE; //Teleport Home Only
34 integer ejectb = FALSE; // Eject and Ban from Land
35 integer tpb = FALSE; //Teleport Home and Ban from Land
36
37 // Notify via IM Impostor Removal
38 integer IM = FALSE;
39
40 ///////////////////////////////////////////////////////////////////////////
41
42
43
44
45 ///////////////////////////////////////////////////////////////////////////
46
47 // Do Not Change These Variables
48
49 list ParcelDetails;
50 string ParcelName;
51 string owner;
52 integer Timer;
53 list impostorlist;
54 integer k;
55 integer status;
56
57 //////////////////////////////////////////////////////////////////////////
58
59
60 default
61 {
63 {
64 ParcelDetails = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME, PARCEL_DETAILS_OWNER, PARCEL_DETAILS_GROUP]);
65 ParcelName = llList2String(ParcelDetails,0);
67 Timer = FALSE;
68 status = FALSE;
69 llSetText("Sleeping", <1,1,1>, 1.0);
70 impostorlist = [];
72 }
73
74 on_rez(integer param)
75 {
77 }
78
79 touch_start(integer total_number)
80 {
82 {
83 status = !status;
84 if(status)
85 {
86 llSetText("Scanning for Impostors", <1,1,1>, 1.0);
87 llSensorRepeat("", NULL_KEY, AGENT, range, PI, rate);
88 }
89 else
90 {
91 llSetText("Sleeping", <1,1,1>, 1.0);
92 impostorlist = [];
93 llSetTimerEvent(0.0);
95 }
96 }
97
98 }
99
100 sensor(integer nr)
101 {
102 integer i;
103 for(i = 0; i < nr; ++i)
104 {
105 key avatar = llDetectedKey(i);
106 string davatar = llToLower(llGetDisplayName(avatar));
107 if((davatar == owner) && (avatar != llGetOwner()) && (llOverMyLand(avatar)==TRUE))
108 {
109 if(llListFindList(impostorlist,[avatar])==-1)
110 {
111 impostorlist = impostorlist + [avatar];
112 }
113 }
114 }
115
116 k = llGetListLength(impostorlist);
117 if((Timer==FALSE) && (k>0))
118 {
119 Timer = TRUE;
120 llSetTimerEvent(1.0);
121 }
122 }
123
124 no_sensor()
125 {
126 impostorlist=[];
127 Timer = FALSE;
128 llSetTimerEvent(0.0);
129 }
130
131 timer()
132 {
133 k = llGetListLength(impostorlist);
134 if(k>0)
135 {
136 integer j;
137 for(j=0; j<k; ++j)
138 {
139 key impostor1 = llList2Key(impostorlist,j);
140 if(llOverMyLand(impostor1))
141 {
142 if(eject)
143 {
144 llEjectFromLand(impostor1);
145 }
146 if(tp)
147 {
148 llTeleportAgentHome(impostor1);
149 }
150 if(ejectb)
151 {
152 llEjectFromLand(impostor1);
153 llAddToLandBanList(impostor1,0.0);
154 }
155 if(tpb)
156 {
157 llTeleportAgentHome(impostor1);
158 llAddToLandBanList(impostor1,0.0);
159 }
160 impostorlist = llDeleteSubList(impostorlist,j,j);
161 if(IM)
162 {
163 string impostor2 = llKey2Name(impostor1);
164 llInstantMessage(llGetOwner(),"Removing " + impostor2 + " from " + ParcelName);
165 }
166 }
167 else
168 {
169 impostorlist = llDeleteSubList(impostorlist,j,j);
170 }
171 }
172 }
173 else
174 {
175 Timer = FALSE;
176 llSetTimerEvent(0.0);
177 }
178 }
179 }

Back to the Best Free Tools in Second Life and OpenSim.