Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Item spamming me incorrectly about giving inventory

Valen Planer
Registered User
Join date: 29 Mar 2008
Posts: 6
03-29-2008 09:26
Hi everyone,

I have an object that's trying to give me inventory but it's not supposed to. The object gives inventory to other objects that e-mail it. What's happening here is that:

1: I am receiving e-mails saying the object is trying to give me inventory and I need to log in to get it. Yet, I never see these offers, and I even receive the e-mails when logged in. I never see anything while logged in to Second Life about this object trying to give me anything.

2: In its normal operations, this should never occur. Despite that, I added a check in the script that only lets the object give inventory if the target's key does not match my avatar's key, so it seemingly cannot be doing it via its script.

Any ideas on how I can stop this? It's driving me crazy!

Thanks.
Weedy Herbst
Too many parameters
Join date: 5 Aug 2004
Posts: 2,255
03-29-2008 09:32
From: Valen Planer
Hi everyone,

I have an object that's trying to give me inventory but it's not supposed to. The object gives inventory to other objects that e-mail it. What's happening here is that:

1: I am receiving e-mails saying the object is trying to give me inventory and I need to log in to get it. Yet, I never see these offers, and I even receive the e-mails when logged in. I never see anything while logged in to Second Life about this object trying to give me anything.

2: In its normal operations, this should never occur. Despite that, I added a check in the script that only lets the object give inventory if the target's key does not match my avatar's key, so it seemingly cannot be doing it via its script.

Any ideas on how I can stop this? It's driving me crazy!

Thanks.


Without seeing the script, it appears llGiveInventory() is working as it should (by comparing keys), but llEmail() isn't using the same conditions. Are the two using the same event handler?
Valen Planer
Registered User
Join date: 29 Mar 2008
Posts: 6
03-29-2008 09:41
Here's a (slighly modified for readability) version of the script in question. Seems the forum is taking out my indentation:

//listens for script request emails and sends scripts back
default
{
state_entry()
{
//listen for emails every second
llSetTimerEvent(1);
}

timer()
{
//check for email
llGetNextEmail("", "";);
}

email(string time, string address, string subject, string message, integer num_left)
{
//get the key of the thing that sent the message
key targetKey = (key)llDeleteSubString(address, llSubStringIndex(address, "@";), llStringLength(address));

//try and prevent it spamming me
if (targetKey != llGetOwnerKey(llGetKey()))
{
llRemoteLoadScriptPin(targetKey, "some script", 21, TRUE, 1);
llGiveInventory(targetKey,"some object";);
}
else
{
llOwnerSay("prevented a spam!";);
}

}
}
Weedy Herbst
Too many parameters
Join date: 5 Aug 2004
Posts: 2,255
03-29-2008 10:07
From: Valen Planer
Here's a (slighly modified for readability) version of the script in question. Seems the forum is taking out my indentation:

//listens for script request emails and sends scripts back
default
{
state_entry()
{
//listen for emails every second
llSetTimerEvent(1);
}

timer()
{
//check for email
llGetNextEmail("", "";);
}

email(string time, string address, string subject, string message, integer num_left)
{
//get the key of the thing that sent the message
key targetKey = (key)llDeleteSubString(address, llSubStringIndex(address, "@";), llStringLength(address));

//try and prevent it spamming me
if (targetKey != llGetOwnerKey(llGetKey()))
{
llRemoteLoadScriptPin(targetKey, "some script", 21, TRUE, 1);
llGiveInventory(targetKey,"some object";);
}
else
{
llOwnerSay("prevented a spam!";);
}

}
}


your email is not a condition of "if (targetKey != llGetOwnerKey(llGetKey()))" and appears to respond to any key, including yours.
Valen Planer
Registered User
Join date: 29 Mar 2008
Posts: 6
03-29-2008 10:20
I'm a bit confused. Are you saying I need to apply a condition to the email() event?

This doesn't make sense to me. I have one line in the script that gives inventory, not counting the remote script load. That line should only execute conditionally, if the key is not my avatar's key. So how is this script offering me inventory?

Even if email() is responding to emails sent from my avatar's key, it shouldn't be giving inventory back to it.

Perhaps it would help me if you were to explain it in simpler terms for my brain :p

Thank you very much for your responses.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
03-29-2008 10:44
Are the objects sending and receiving inventory in different regions? llGiveInventory can only give things to object in the same sim, and you will get an email like that if they are not. (This is only for objects, you can llGiveinventory to an avatar anywhere on the grid).
Valen Planer
Registered User
Join date: 29 Mar 2008
Posts: 6
03-29-2008 10:56
Hmm... to my knowledge, the objects this server is giving inventory to are all in the same region (in fact, are only a few dozen meters away).
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
03-29-2008 11:06
I would check the locations of those things, a few dozen meters can easily have you in a neighboring region. Also, if everything *is* in the same region, you might consider using chat (llRegionSay() for example) for these inventory requests since it can be a little quicker and more reliable than SL email.

You might check this page for more restrictions on llGiveInventory (there are several) and check if any might apply to your case: http://rpgstats.com/wiki/index.php?title=LlGiveInventory
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
03-29-2008 12:02
ACTUALLY.. let's take our heads out of scripting for a second..

You're getting an OFFLINE EMAIL that says that the "Object" (blah blah) has offered you inventory in Second Life... log in to accept it.

#1.. check the headers of this email.

This is what such an email looks like when I receive it:
CODE

from SL Exchange Magic Box black <___________@im.agni.lindenlab.com>
to Winter Ventura _________,
date Wed, Mar 5, 2008 at 1:50 PM
subject Second Life - Inventory offer from 'SL Exchange Magic Box black' owned by _________


The object 'SL Exchange Magic Box black' in Second Life has offered you inventory.
Log in to accept to decline this inventory.

= SL Exchange Magic Box black is owned by _______________
= http://slurl.com/secondlife/____________


In that email, are some important things.. Your account NAME... your email address, the NAME of the person who owns the giving object, and even a SLURL that points to the giving object's location.

First, check to make sure it's not emailing an alt of yours. It's happened to me, that I'll get an email telling me I've been offered friendship or a group invite.. only to realize that that email was aimed at my alt, and not my main account.

Next, take a look at the owner of the object. If this is something you don't want, IM them to tell them to knock it off. If it's bordering on harrassment, mute them!

You might take a look at that SLURL and consider popping out to go visit the object. It may be that on seeing the object, you may have an option to "opt out" of these inventory offers, or something else.

If the object(s) doing this giving are called "SLExchange something or other".. and OnRez, Apez, etc.. then someone "out in the real world" may be buying gifts for you.

If it's harrassment, definitely report it. If it's some well meaning friend buying stuff for you.. consider asking them to wait til you're online, since these offline buys can often get lost in a crqashed login or something.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
03-29-2008 12:16
CODE


//listens for script request emails and sends scripts back
default
{
state_entry()
{
//listen for emails every second
llSetTimerEvent(1);
}

timer()
{
//check for email
llGetNextEmail("", "");
}

email(string time, string address, string subject, string message, integer num_left)
{
//get the key of the thing that sent the message
key targetKey = (key)llDeleteSubString(address, llSubStringIndex(address, "@"), -1);

//try and prevent it spamming me
if (targetKey != llGetOwner())
{
llOwnerSay("Got Email [Time:" + time + "]\n[From:" + address + "]\n[Re:" + subject + "]\n[Body: " + message + "]\nleft:" + (string)num_left);
}
else
{
llOwnerSay("prevented a spam!");
}

}
}



Try this and see what your emails are actually saying.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Valen Planer
Registered User
Join date: 29 Mar 2008
Posts: 6
03-29-2008 17:48
I was aware of what the e-mails were saying, but in any case, I redesigned this particular experiment to use local chat on a private channel rather than using e-mail.

Now, everything is right next to everything else in the same region. No e-mails are being sent. I am snooping on the channel being used. Everything is working exactly as it should be. I read the RPGstats as well as a separate LSLwiki.

llGiveInventory() is sending inventory to the objects it is supposed to, but I am still receiving these messages to my e-mail address. The object is not actually sending me anything while I am logged on. I even created that conditional statement so that it could not give inventory directly to me.

Are there any other thoughts on this? I'm suspecting that there's something happening with llGiveInventory(), perhaps if it tries to give too many during a timeframe, or some other condition, that is causing this behavior.
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
03-30-2008 02:21
Well it sounds like your script still contains an error. Since you're only posting a "nerfed" version of your code, I can't help you find the glitch. I'm not seeing this behavior in any llGiveInventory applications I'm using.

Double check the contents of the emails you're seeing.. and check to see if an alt is getting these emails, or if it's at the right location. Perhaps there's a copy going wild someplace else?

Does your email account give an auto-reply?
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Valen Planer
Registered User
Join date: 29 Mar 2008
Posts: 6
03-30-2008 05:16
Thank you for your reply. I have no auto-reply on my e-mail address. The script isn't running anywhere else. If I disable it, I don't get the e-mails.

Here's the complete script. This is for my mushrooms, which breed and evolve using genetic algorithms. This script runs in their server, which sends each new individual in the colony its scripts when born.

Here's the update from after I changed everything to use chat rather than e-mail. This is the exact script. There are no modifications.

Also, I am sitting right there watching the experiment run, and it looks like the only time the server gives its inventory is when a mushroom requests it. The inventory transfers directly coincide with the inventory requests going on.

//listens for script requests from baby mushes and sends scripts/inventory back
default
{
state_entry()
{
llListen(76234, "Mushroom", NULL_KEY, "";);
}

listen(integer channel, string name, key id, string message)
{
//determine which script to send
if (message == "send cap scripts";)
{
//send the cap scripts to the mush
llRemoteLoadScriptPin(id, "Mushroom Cap Growth", 21, TRUE, 1);
llRemoteLoadScriptPin(id, "Mush Contingency", 21, TRUE, 1);
}
else if (message == "send stalk scripts";)
{
//send the stalk scripts to the mush
llRemoteLoadScriptPin(id, "Mushroom Stalk Growth", 21, TRUE, 1);
llRemoteLoadScriptPin(id, "Mush Intelligence", 21, TRUE, 1);
llGiveInventory(id,"Mushroom";);
//llOwnerSay("I am giving inventory.";);
}
}
}