Skip to content
lsl.devlsl.devLSL Dev

llAddToLandBanList

function
Function syntax
llAddToLandBanList(
  1. key avatar,// UUID of the avatar to add to the ban list.
  2. float hours// Duration, in hours, to ban the avatar for (0 for indefinite).
);
Delay
0.1 s
Energy
10

Add avatar to the parcel ban list for the specified number of hours.

A value of 0 for hours will add the agent indefinitely. The smallest value that hours will accept is 0.01; anything smaller will be seen as 0.

Residents teleporting to a parcel where they are banned will be redirected to a neighboring parcel.

How to use
llAddToLandBanList(NULL_KEY, 0.0);
  • Must be owned by the land owner.
  • When values below 1 are used, it seems the function bans in approximately 30 second increments. (Probably 36 second increments, as 0.01 of an hour is 36 seconds)
Example 1
62 collapsed lines
// This is not a complete solution, requires full avatar names to work - even for unbanning someone!
// This is meant only as an example of the land ban and pass management functions.
// free to copy, use, modify, distribute - just don't ask me to debug your modified code. ;-)
//
// Commands are:
// /5 ban:full_avatar_name
// /5 tempban:full_avatar_name
// /5 unban:full_avatar_name
// /5 pass:full_avatar_name
// /5 unpass:full_avatar_name
// /5 clearban
// /5 clearpass
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 = 0;
for (; i < num; ++i)
{
if (command == "ban")
{
// Ban indefinetely
llAddToLandBanList(llDetectedKey(i),0.0);
}
if (command == "tempban")
{
// Ban for 1 hour.
llAddToLandBanList(llDetectedKey(i),1.0);
}
if (command == "unban")
16 collapsed lines
{
llRemoveFromLandBanList(llDetectedKey(i));
}
if (command == "pass")
{
// Add to land pass list for 1 hour
llAddToLandPassList(llDetectedKey(i),1.0);
}
if (command == "unpass")
{
llRemoveFromLandPassList(llDetectedKey(i));
}
}
command = "";
}
}

The wiki article also includes shared templates whose conditional content is not reproduced here: Template:Issues/SVC-1911.

Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.