About

The database test module can be placed in the same primitive as the database client script. It provides an easy way of testing the DPD network by listening to the owner of the script and relaying all commands to the database client script and from there onto the DPD network.

Code

The database test module is a trivial script which may be dropped in a primitive containing the database client so that the owner can type commands on the main chat which will be relayed to the DPD network that the database client is connected to.

database_test_module.lsl
///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2011 - License: GNU GPLv3      //
//  Please see: http://www.gnu.org/licenses/gpl.html for legal details,  //
//  rights of fair usage, the disclaimer and warranty conditions.        //
///////////////////////////////////////////////////////////////////////////
 
// DPD: DATABASE TEST MODULE
 
default
{
    state_entry()
    {
        llListen(0, "", llGetOwner(), "");
    }
 
    listen(integer chan,string name,key id,string mes) {
        if(~llSubStringIndex(mes, "@db_FETCH") || ~llSubStringIndex(mes, "@db_REPLACE"))
            llMessageLinked(LINK_THIS, 0, mes, "49c11b5dfa51597b3021578810a1ebd2");
    }
 
    link_message(integer sender_num, integer num, string str, key id) {
        if(id != "db_ANSWER") return;
        llSay(0, "DB3 answer: " + str);
    }
}

secondlife/persistent_storage/distributed_primitive_database/client_scripts/database_test_module.txt ยท Last modified: 2017/02/22 18:22 (external edit)

Access website using Tor


For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.