This has worked out dandy fine.
Now, I was thinking about expanding that a bit, so I rezzed up a copy of the server from inventory, set up a vendor to use *that* server instead... and got nothing.
The symptoms are odd. If I send e-mail from my personal account to the test server, the e-mail gets read about 120 seconds later than one I send to the production server. E-mail from any in-world object is typically never read at all, though once out of about every 30 times an object's mail gets read.
Code snippet:
"update()" - updated the display
"stripoff()" - removes the location etc. lines from the e-mail
"CheckInventory()" - returns true if the invenory is there.
CODE
timer()
{
llGetNextEmail("","");
}
email(string time, string address, string subj, string message, integer num_left)
{
message = stripoff(message);
llOwnerSay(message); // for Debugging
if (llMD5String(message, MDfive) == subj)
{
list buy = llParseString2List(message, ["|||"], [""]);
key delivertarget = llList2Key(buy,0);
string delivername = llList2String(buy,1);
string deliveritem = llList2String(buy,2);
if (CheckInventory(deliveritem))
{
update(delivername + " bought " + deliveritem);
llGiveInventory(delivertarget, deliveritem);
}
else
{
llOwnerSay("WARNING! Misconfigure - missing " + deliveritem + " for " + delivername);
update(delivername + " bought " + deliveritem + " ERR");
llInstantMessage(delivertarget, "There has been an error - please contact Jillian Callahan for assistance.");
}
}
else
{
update("AUTHENTICATION FAILURE");
llOwnerSay("Authentication failure");
llOwnerSay(message);
}
if ( num_left > 0 ) llGetNextEmail("","");
}
Note again, this all works fine in the other object, not two meters away...
Help?
EDIT: Oh, and I have checked to make sure the other objects can send mail. And I do have one other object recieving mail every ten seconds from four other objects in the sim.
EDIT AGAIN: Also, I deleted the test server and rezed up another... actually, did this several times. Even rezed one up, then shift-dragged to copy it, just in case. The results were the same each time.