123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- string command;
- default
- {
- state_entry()
- {
- llListen(5, "", llGetOwner(), "");
- }
-
- on_rez(integer param)
- {
- llResetScript();
- }
- listen(integer chan, string name, key id, string message)
- {
- if (command != "")
- {
- llOwnerSay("Sorry, still processing last command, try again in a second.");
- }
-
- list args = llParseString2List(message,[":"],[]);
- command = llToLower(llList2String(args,0));
-
- if (command == "clearbans")
- {
- llResetLandBanList();
- }
- if (command == "clearpass")
- {
- llResetLandPassList();
- }
- else
- {
- llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
- }
- }
-
- no_sensor()
- {
- command = "";
- }
-
- sensor(integer num)
- {
- integer i;
- for (i=0; i< num; ++i)
- {
- if (command == "ban")
- {
-
- llAddToLandBanList(llDetectedKey(i),0.0);
- }
- if (command == "tempban")
- {
-
- llAddToLandBanList(llDetectedKey(i),1.0);
- }
- if (command == "unban")
- {
- llRemoveFromLandBanList(llDetectedKey(i));
- }
- if (command == "pass")
- {
-
- llAddToLandPassList(llDetectedKey(i),1.0);
- }
- if (command == "unpass")
- {
- llRemoveFromLandPassList(llDetectedKey(i));
- }
- }
- command = "";
- }
- }
|