Jump to content

Delivery Server Issue


Chellynne Bailey
 Share

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

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

Recommended Posts

Well I did have a perfectly working delivery server, woke up this morning however to several angry customers who were trying to get their products... and a little bit of testing latter, I realize the delivery huds only work when I'm on sim. Which is weird, because I know I tested the things off sim and this is the first time there's been an issue.

Anyone have any idea why the email protocal may not be working?  Delivery HUD code:

//Comet Aero
//12-11-06
//Reviewed and updated to compile by: Cryas Tokhes (19.06.07)
//This script is under the protection of the
//DNSOIWKY License
//A.K.A. The "Do Not Sell Or I Will Kill You" License*
//
//==========================================WARNING===================================================
//=======The password, productName and serverKey MUST match EXACTLY=======================================
string serverKey = "<----secret---->";//What the server whispers when you put the script in the server or reset it.
string productName = "[LNL] Omega Applier Dev Kit";//The product name you set in your script.
string password = "<----secret---->";//The password you set in your server.
integer currentVersion = 1;//The current version of the product.

update()
{
        llSay(0, "Thank you," + llKey2Name(llGetOwner()) + ", we are currently checking to see if there is a product update available.");  
    llEmail(serverKey + "@lsl.secondlife.com", password + "|" + productName + "|" + (string)currentVersion, (string)llGetOwner());
    //Send the server the request.
    
    }

default
 {
    on_rez(integer param)
    {
  update();
    }
    
        touch(integer param)
    {
  update();
    }
}
//Comet Aero does not support the killing of Kittens, humans or goldfish.

 server code:

list products;
list versions;
list productGiveNames;
/////////////////////////////////////////////////
string productGiveName = "";//Object name inside of the object to give if it is out of date.
string password = "<--secret--->";//Password to protect from people stealing your hard work!!
string product = "";//The product series name, this is in place so you can handle multiple products per prim ^.^
float latestVersion = 2;//This is the latest version of your product.

integer updateNotify = FALSE;//Want the server to email you when a product has been updated?
string emailAddress = "name@isp.com";//Your email address.

string additional_product = "[LNL] NC Converter - Basic (boxed)";

//====================================================================================================
//===Subject Format: password|product|version=========================================================
//===Message Format: UserKey==========================================================================
//==========================================WARNING===================================================
//===========There MUSNT be any spaces in between the "|" and all of them MUST match EXACTLY!!========
//====================================================================================================

fillLists()
{
    integer Inv = llGetInventoryNumber(INVENTORY_OBJECT);
    integer i;
    string check;
    list checklist;

    products = [];
    versions = [];
    productGiveNames = [];

    do{
        check = llGetInventoryName(INVENTORY_OBJECT,i);
        checklist = llParseString2List(check, ["ver.", "v."],[]);
        products = products + [llStringTrim(llList2String(checklist, 0), STRING_TRIM)];
        versions = versions + [llList2Float(checklist, 1)];
    productGiveNames = productGiveNames + [check];
    
}while(i++ <=Inv);
llSay(0, llDumpList2String(productGiveNames, ":"));
    
}


default {
    state_entry() {
        fillLists();
        llSetTimerEvent(2.5);//Poll for emails.
        llSetObjectDesc((string)llGetKey());//You will need the key when setting up you client
        llWhisper(0, (string)llGetKey());
    }

    timer() {
    llGetNextEmail("","");
    llSetText((string)llGetFreeMemory(), <1,1,1>, 1);
        if(llGetFreeMemory() < 100){
            llInstantMessage(llGetOwner(), "/me is running low on available memory, script is resetting in 5 seconds.");
            llSleep(5);//There is nothing really to store in the runtime, so if were running
            //low on memory, just notify the owner and reset.
            llResetScript();
        }
}

changed(integer change)// triggered by various events that change the task
    {
        if (change & CHANGED_INVENTORY)// when a new owner is detected
        {
            llResetScript();
        }
    }

    email(string time, string address, string subj, string message, integer num_left) {
        list messageList = llParseString2List(subj, ["|"], []);//Parses the subject into the parts by "|"
        string inputPassword = llList2String(messageList,0);//Get the first parced part.
        string inputProduct = llList2String(messageList,1);//Get the second parsed part.
        key inputUser = llDeleteSubString(message, 0, llSubStringIndex(message, "\n\n") + 1);
        integer i;
        do {
            if (inputProduct == llList2String(products, i))
            {
                product = llList2String(products, i);
                productGiveName = llList2String(productGiveNames, i);
                }
             if (llList2String(products,i) == "[LNL] NC Converter - Basic (boxed)") additional_product = llList2String(productGiveNames, i);
                
            }while(i++ <= llGetListLength(products));

        //===========================================================================================
        if(inputPassword == password && inputProduct == product){
             llInstantMessage(inputUser, "Attempting to Deliver " + productGiveName + ". Make sure you click accept!");
   
            llGiveInventory(inputUser,productGiveName);
               //    if (product != "[LNL] Omega Applier Dev Kit" && product != "[LNL] NC Converter - Basic (boxed)" ) llGiveInventory(inputUser,additional_product);
                    }
    }
}

 

Any ideas? -confuzzled cause it worked fine before-

Link to comment
Share on other sites

Update: Well after having given up on the problem...thinking..oh it's just SL being stupid today..maybe it'll work tommorrow... I went and worked on something else...and ran accross the answer.

Apparently objects can stop recieving Email occasionally and the only thing that fixes them is a region restart. Go fig, so thats working, much hair tearing out latter. Thank you for all the replys. :)

Bright Note: Totally learned more about how the Email functions work. So -throws confetti-

Link to comment
Share on other sites

Eventually you'll likely encounter an ancient email bug in which even a sim restart won't get things going again -- but all is not lost: you can still revive the server by Wearing it, going to a different sim, returning, and then Dropping (not detaching) it. That step of entering the sim seems to re-acquaint the email dispatcher with the destination object.

(Oh, interesting, I see there's a newish jira for this bug. It's been around for ages, though, and the Lindens gave up on it before, so I'm disinclined to link the new report to the old, lest it suffer the same fate.)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3353 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...