The script is two parts, one is the bouncer itself, one is the emailer.
Put both scripts in the same prim.
Everyone that is a member of the same group as the object the script is in, can use the bouncer. To bounce (teleport home) and ban, you just say /123 Firstname Lastname (CasE SensitivE).
Here goes. First the bouncer:
CODE
key speaker;
key target;
integer handle;
string targetname;
string speakername;
default
{
state_entry()
{
handle = llListen( 123, "", NULL_KEY, "" );
}
listen(integer channel, string name, key id, string message)
{
if (message!="" && llSameGroup(id))
{
speaker=id;
targetname=message;
speakername=llKey2Name(id);
llSensor(message, NULL_KEY, AGENT, 96, PI);
}
}
sensor(integer total_number)
{
target=llDetectedKey(0);
llInstantMessage(speaker,"Found, teleporting avatar home. One sec...");
llTeleportAgentHome(target);
llSay(0,targetname+" was removed and banned for 72 hours. Owner was notified by email.");
llAddToLandBanList(target,72);
llMessageLinked(llGetLinkNumber(), 0, speakername, targetname);
}
no_sensor() {
llInstantMessage(speaker, "Avatar not found.");
}
}
And here is the emailer bit:
CODE
default
{
state_entry()
{
}
link_message(integer sender_num, integer num, string str, key id)
{
llEmail("your@email.com", str+" kicked "+(string)id, "");
}
}