Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Is there a problem with llAddToLandBanList?

Vares Solvang
It's all Relative
Join date: 26 Jan 2005
Posts: 2,235
12-20-2006 19:11
I have a security script that I wrote a while back that has an option to add someone to the parcel ban list. This command worked fine a month ago, but since the last two updates it doesn't seem to do anything. Has anyone else noticed this?

Here is the code for that part of the device:

CODE

state banonly // ban someone from your parcel
{
state_entry()
{
llListen(0,"","","");
llSetTimerEvent(30);
llInstantMessage(toucher,"Say the name of the person you want to ban now, spelling and capitilization must match the person's name exactally.");

}
listen(integer channel, string name, key id, string message)
{

{
llAddToLandBanList(message, 0);
llInstantMessage(toucher,message+" has been added to the ban list");
state default;
}

}
timer()
{
state menureset;
}
}



Here is the chat when I use it:

Object: Say the name of the person you want to ban now, spelling and capitilization must match the person's name exactally.
You: Calista Amarula
Object: Calista Amarula has been added to the ban list

Only, it doesn't add the person to the list at all, it just returns to the default state.

I bug reported when I first noticed it but there has been an update since then and it still doesn't seem to be working.

So, did I screw up the code or is this borked?


Oh, yes I DO own the land that the object is on. :)
_____________________
Peekay Semyorka
Registered User
Join date: 18 Nov 2006
Posts: 337
12-20-2006 19:47
llAddToLandBanList() appears broken. llRemoveFromLandBanList() and llResetLandBanList() appear to be working fine.

Please file a bug report for us.

-peekay
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-20-2006 23:05
You are using llAddToLandBanList incorrectly. llAddToLandBanList requires the avatars key and not it's name. Please disregard Peekay's advised.

Try this script instead:
Be sure it is owned by the land owner (that may require deeding the object).
CODE

key user;

default
{
state_entry()
{
llListen(0,"","","");
}
listen(integer channel, string name, key id, string message)
{
user = id;
llSensor(message, "", AGENT, 96, PI);
}
sensor(integer a)
{
llAddToLandBanList(llDetectedKey(0), 0);
llInstantMessage(user, llDetectedName(0) + " has been added to the ban list");
}
}


http://lslwiki.com/lslwiki/wakka.php?wakka=llAddToLandBanList
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Vares Solvang
It's all Relative
Join date: 26 Jan 2005
Posts: 2,235
12-20-2006 23:16
Ahhh, there we go. I added this bit as an afterthought and just cut and pasted the commands from a different place in the script. That place used a sensor to eject a person from the land and then gave you the option to add them to the ban list or not after ejecting them. It worked in that part of the script because it already had the key from the ejection sensor.

I added this last little bit weeks later thinking it would be nice to be able to add people without them being present and forgot that it used the av's key instead of their name. :o


Strife to the rescue again! :D
_____________________