aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl')
-rw-r--r--bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl84
1 files changed, 84 insertions, 0 deletions
diff --git a/bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl b/bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl
new file mode 100644
index 0000000..19ad704
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl
@@ -0,0 +1,84 @@
1//Commands are:
2///5 ban:full_avatar_name
3///5 tempban:full_avatar_name
4///5 unban:full_avatar_name
5///5 pass:full_avatar_name
6///5 unpass:full_avatar_name
7///5 clearban
8///5 clearpass
9
10string command;
11
12default
13{
14 state_entry()
15 {
16 llListen(5, "", llGetOwner(), "");
17 }
18
19 on_rez(integer param)
20 {
21 llResetScript();
22 }
23
24 listen(integer chan, string name, key id, string message)
25 {
26 if (command != "")
27 {
28 llOwnerSay("Sorry, still processing last command, try again in a second.");
29 }
30
31 list args = llParseString2List(message,[":"],[]);
32 command = llToLower(llList2String(args,0));
33
34 if (command == "clearbans")
35 {
36 llResetLandBanList();
37 }
38 if (command == "clearpass")
39 {
40 llResetLandPassList();
41 }
42 else
43 {
44 llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
45 }
46 }
47
48 no_sensor()
49 {
50 command = "";
51 }
52
53 sensor(integer num)
54 {
55 integer i;
56 for (i=0; i< num; ++i)
57 {
58 if (command == "ban")
59 {
60 // Ban indefinetely
61 llAddToLandBanList(llDetectedKey(i),0.0);
62 }
63 if (command == "tempban")
64 {
65 // Ban for 1 hour.
66 llAddToLandBanList(llDetectedKey(i),1.0);
67 }
68 if (command == "unban")
69 {
70 llRemoveFromLandBanList(llDetectedKey(i));
71 }
72 if (command == "pass")
73 {
74 // Add to land pass list for 1 hour
75 llAddToLandPassList(llDetectedKey(i),1.0);
76 }
77 if (command == "unpass")
78 {
79 llRemoveFromLandPassList(llDetectedKey(i));
80 }
81 }
82 command = "";
83 }
84}