Jump to content
  • 0

lladdtobanlist not working


sophy7777
 Share

You are about to reply to a thread that has been inactive for 2019 days.

Please take a moment to consider if this thread is worth bumping.

Question

hey, im trying to make a script to check ages of people coming into my hangout, (rl ages not sl) but when i script LLaddtobanlist it doesnt, i can eject people but not add them to ban list, i was wondering if anyone could help as i also wanted to expand it to only ask people once,any sugestions? 

the script goes as followed 

string name;
string detectedName;
string dialogInfo = "\nWelcome to the little things hangout please answer the following questions and read the rules. 
are you ages 18 or over in real life?"; 
key id;
integer dialogChannel;
integer listenHandle;


list buttons = ["-", "yes", "no", "no comment"];

default
{
    state_entry()
    {
        dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
    }
     collision_start(integer num_detected)
    {

         
        id = llDetectedKey(0);
        name = llKey2Name(id);
        llListenRemove(listenHandle);
        listenHandle = llListen(dialogChannel, "", id, "");
        llDialog(id, dialogInfo, buttons, dialogChannel);
        llSetTimerEvent(180.0); // Here we set a time limit for responses
 
        detectedName = llDetectedName(0);
        dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
    }
 
    listen(integer channel, string name, key id, string message)
    {
        if (message == "-")
        {
            llDialog(id, dialogInfo, buttons, dialogChannel);
            return;
        }
 
        llListenRemove(listenHandle);
        //  stop timer since the menu was clicked
        llSetTimerEvent(0);
 
        if (message == "yes")
        {
            llSay(0, "Thank you please use the teleporter to explore the hangout.");
        }
        else if (message == "no")
        {
            llSay(0, "I'm sorry this hangout is for over 18 years old only, you will now be teleported home any issue with this please contact the hangout staff.");
           llAddToLandBanList(id,0.0);
           llEjectFromLand(id);
        }
        else
        {
         llSay(0, "I'm afraid we need to know the answer to this question to allow acess you will now be ejected feel free to return to answer this question again.");
           llAddToLandBanList(id,0.1);
           llEjectFromLand(id);
        }
    }
 
    timer()
    {
    //  stop timer
        llSetTimerEvent(0);
 
        llListenRemove(listenHandle);
        llSay(0, "Sorry, we need a answer to this question we understand that you may have been afk at the time, unfortunatly you will be temp banned for one hour, any issue please contact [secondlife:///app/agent/47f37397-9596-41cb-8713-96c36ea2b685/about sophie]- with any issues. ");
         llAddToLandBanList(id,0.1);
    }
}

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Like many of the land LSL functions, llAddToBanList will only work if the script is in object owned by the landowner and if the landowner is in world.  The best way to guarantee that the owner is in world is to deed the land and your object to a group, since a group is always in SL. 

On the practical side, I'm sure that you have 100% trustworthy visitors to your region, but most people don't.  What's to keep anyone from lying?

Link to comment
Share on other sites

  • 0

on the pra

13 minutes ago, Rolig Loon said:

Like many of the land LSL functions, llAddToBanList will only work if the script is in object owned by the landowner and if the landowner is in world.  The best way to guarantee that the owner is in world is to deed the land and your object to a group, since a group is always in SL. 

On the practical side, I'm sure that you have 100% trustworthy visitors to your region, but most people don't.  What's to keep anyone from lying?

on the practable side, it means we have tried our best to stop people underage people into the hangout. and they have told us they are over 18, yes they could lie but the same way they can lie ticking the box for secondlife saying they want to go to adult content. 

Link to comment
Share on other sites

  • 0
2 minutes ago, sophy7777 said:

on the practable side, it means we have tried our best to stop people underage people into the hangout. and they have told us they are over 18, yes they could lie but the same way they can lie ticking the box for secondlife saying they want to go to adult content.  

That's quite reasonable.  A simpler solution, though, is to rate your region either Moderate or Adult.  By definition, anyone who is under 18 cannot go to either type of region.  So, if someone lies to you, they have also lied to Linden Lab -- thus comitting a TOS violation that can get them banned from SL.  The point is that LL has already done the work for you by asking every resident that same question.  All you have to do to cover yourself legally is to be sure you set the region's maturity rating properly and believe that LL has already determined the person is an adult.  If you uncover independent evidence that a visitor is a liar, submit an AR.

  • Like 2
Link to comment
Share on other sites

  • 0
29 minutes ago, Rolig Loon said:

That's quite reasonable.  A simpler solution, though, is to rate your region either Moderate or Adult.  By definition, anyone who is under 18 cannot go to either type of region.  So, if someone lies to you, they have also lied to Linden Lab -- thus comitting a TOS violation that can get them banned from SL.  The point is that LL has already done the work for you by asking every resident that same question.  All you have to do to cover yourself legally is to be sure you set the region's maturity rating properly and believe that LL has already determined the person is an adult.  If you uncover independent evidence that a visitor is a liar, submit an AR.

back to the script could you help me so it only asks people once? 

 

Link to comment
Share on other sites

  • 0
40 minutes ago, sophy7777 said:

could you help me so it only asks people once?

Certainly.  Create a global list (call it lAllAvs, maybe).  Then, every time someone collides with your object, have it check to see whether the person's UUID is on the list.  If not, activate the dialog and add the person to the list.  If the person is in the list, ignore her/him.  So ....
 

collision_start (integer num)
{
    if ( !~llListFindList( lAllAvs, [ llDetectedKey(0) ] ) )
    {
        lAllAvs += [ llDetectedKey(0) ];
       // Do the dialog stuff
    }
}

The only serious problem is that you won't dare to reset the script.  If you do, the list will be wiped clean.  You can get around that by adding a touch_start event that is only accessible to you and trusted allies (or maybe do it with a timer).  Use that event to send the entire list (with llDumpList2String and then a llMessageLinked) to a separate script in a child prim that serves as a backup repository.  Then figure a way to dump that backup copy back to your main script if you ever need to.  If you have access to an Experience, you could do a different version of the same idea -- and much more securely -- to save the user info in a unique Experience key. 

A secondary problem, much less serious unless you are on a busy region, is that after a while you may accumulate so many UUIDs in lAllAvs that your script runs out of memory. If that happens, you have no choice but to restart the script and wipe out everything.  You can beat that problem in two ways.  One is to store a compressed version of each UUID, so that each one takes less memory.  The other way is to deliberately remove the oldest UUIDs in the list if the script is getting dangerously close to running out of memory.  You'll find an example of a script that uses both methods at http://wiki.secondlife.com/wiki/User:Rolig_Loon/High-Capacity_Greeter-Counter

EDIT:  BTW, a question like this truly belongs in the Scripting forum, where it's likely to attract the attention of other scripters (other than me ;) ).

Edited by Rolig Loon
Typos, of course
Link to comment
Share on other sites

  • 0
4 minutes ago, Lindal Kidd said:

If your land is Moderate, you don't need the script.

Personally, I would consider it a rude and intrusive question, and even though I am way over 18 I would never visit your place because of that.

well as LindenLab states 16-year-olds can enter moderate sims, and this is as the age of consent is different around the world, but if an adult from America engaged with roleplay or otherwise then finds out the age of this teen is 16 may feel themselves like they have abused a minor, now I don't know about the legal side of things ill hold my hands up to that, but i was one of the thoughts young girls who went into chat rooms and saw things at the age of 16 that scared me, and that did put me in danger. now im not saying underage people will come to this hangout, but i want to say i did all i could to protect them from being in danger as the hangout owner i would feel slightly responsible if i hear wind that an underage person or even an adult was damaged mentally by any interaction in the hangout. i do not want to know where you are what you do as a job its a simple yes and no answer and yes people could lie but i have at least tried to stop anything happening and i can feel ive done my best. as for linden labs if i remember right all i had to do to say i wanted to see adult sims was tick a box, so i feel that its the same kinda thing, anyone can say they are 18 plus but i can go well this is what i knew they agreed and told me they were 18 and i had no right in saying they were lying. i am sorry you feel its rude though as it is not meant to be that way at all.

 

Link to comment
Share on other sites

  • 0

 

5 minutes ago, Lindal Kidd said:

That is incorrect.  If you are 16-17, you can only access General content.

i am glad that is true, but if its just ticking a box id rather have my own box to tick there too. thank you for telling me though i thought it was moderate too!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2019 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...