aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl
diff options
context:
space:
mode:
authorBrian McBee2008-01-07 01:03:46 +0000
committerBrian McBee2008-01-07 01:03:46 +0000
commit35b0c2e9dfbbf811c12c9e3e7d4359a13b987977 (patch)
tree42e91b37aa581006dc9defb6780ff15319049d3f /bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl
parentFactor out inventory code in SceneObjectGroup into seperate class. (diff)
downloadopensim-SC-35b0c2e9dfbbf811c12c9e3e7d4359a13b987977.zip
opensim-SC-35b0c2e9dfbbf811c12c9e3e7d4359a13b987977.tar.gz
opensim-SC-35b0c2e9dfbbf811c12c9e3e7d4359a13b987977.tar.bz2
opensim-SC-35b0c2e9dfbbf811c12c9e3e7d4359a13b987977.tar.xz
More inventory work for CharlieO. Final patch to make it all work yet to come.
Diffstat (limited to 'bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl')
-rw-r--r--bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl84
1 files changed, 84 insertions, 0 deletions
diff --git a/bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl b/bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl
new file mode 100644
index 0000000..19ad704
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/llAddToLandBanList.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}