<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=User%3AAllen_Kerensky%2FMyriad_Lite_Preview_5%2FTemplate_Server</id>
		<title>User:Allen Kerensky/Myriad Lite Preview 5/Template Server - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=User%3AAllen_Kerensky%2FMyriad_Lite_Preview_5%2FTemplate_Server"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Template_Server&amp;action=history"/>
		<updated>2026-05-15T16:19:42Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Template_Server&amp;diff=27422&amp;oldid=prev</id>
		<title>Allen Kerensky: moved User:Allen Kerensky:Myriad Lite Preview 5:Template Server to User:Allen Kerensky/Myriad Lite Preview 5/Template Server: move into subsite</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Template_Server&amp;diff=27422&amp;oldid=prev"/>
				<updated>2012-02-06T23:05:44Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/wiki/User:Allen_Kerensky:Myriad_Lite_Preview_5:Template_Server&quot; class=&quot;mw-redirect&quot; title=&quot;User:Allen Kerensky:Myriad Lite Preview 5:Template Server&quot;&gt;User:Allen Kerensky:Myriad Lite Preview 5:Template Server&lt;/a&gt; to &lt;a href=&quot;/wiki/User:Allen_Kerensky/Myriad_Lite_Preview_5/Template_Server&quot; title=&quot;User:Allen Kerensky/Myriad Lite Preview 5/Template Server&quot;&gt;User:Allen Kerensky/Myriad Lite Preview 5/Template Server&lt;/a&gt;: move into subsite&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:05, 6 February 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Allen Kerensky</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Template_Server&amp;diff=27254&amp;oldid=prev</id>
		<title>Allen Kerensky: created</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Template_Server&amp;diff=27254&amp;oldid=prev"/>
				<updated>2012-02-06T20:18:33Z</updated>
		
		<summary type="html">&lt;p&gt;created&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Myriad Lite Template Server =&lt;br /&gt;
&lt;br /&gt;
== Myriad_Lite_Template_Server-v0.0.0-20120106.lsl ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// Myriad_Lite_Template_Server-v0.0.0-20120106.lsl&lt;br /&gt;
// Copyright (c) 2012 By Allen Kerensky (OSG/SL)&lt;br /&gt;
// The Myriad RPG System was designed, written, and illustrated by Ashok Desai&lt;br /&gt;
// Myriad RPG licensed under the Creative Commons Attribution 2.0 UK: England and Wales&lt;br /&gt;
// http://creativecommons.org/licenses/by/2.0/uk/&lt;br /&gt;
// Myriad Lite software Copyright (c) 2011-2012 by Allen Kerensky (OSG/SL)&lt;br /&gt;
// Baroun's Adventure Machine Copyright (c) 2008-2011 by Baroun Tardis (SL)&lt;br /&gt;
// Myriad Lite and Baroun's Adventure Machine licensed under the&lt;br /&gt;
// Creative Commons Attribution-Share Alike-Non-Commercial 3.0 Unported&lt;br /&gt;
// http://creativecommons.org/licenses/by-nc-sa/3.0/&lt;br /&gt;
// You must agree to the terms of this license before making any use of this software.&lt;br /&gt;
// If you do not agree to this license, simply delete these materials.&lt;br /&gt;
// There is no warranty, express or implied, for your use of these materials.&lt;br /&gt;
&lt;br /&gt;
// CONSTANTS - DO NOT CHANGE DURING RUN&lt;br /&gt;
string VERSION = &amp;quot;0.0.0&amp;quot;; // Allen Kerensky's script version&lt;br /&gt;
string VERSIONDATE = &amp;quot;20120106&amp;quot;; // Allen Kerensky's script yyyymmdd&lt;br /&gt;
integer CHAN_MYRIAD = -999; // regionwide channel for Myriad events&lt;br /&gt;
&lt;br /&gt;
// RUNTIME GLOBALS - CAN CHANGE DURING RUN&lt;br /&gt;
integer HAND_MYRIAD;&lt;br /&gt;
&lt;br /&gt;
list TABLES; // list of all notecard tables in server&lt;br /&gt;
list TEMPLATENAMES; // list of names by template number&lt;br /&gt;
list TEMPLATETYPES; // list of types by template number&lt;br /&gt;
list TEMPLATECOSTS; // list of costs by template number&lt;br /&gt;
&lt;br /&gt;
list BACKGROUNDS; //list of template backgrounds data&lt;br /&gt;
list CAREERS; // list of template careers data&lt;br /&gt;
list SPECIES; // list of template species data&lt;br /&gt;
&lt;br /&gt;
string SCRATCH; // temporary template building string&lt;br /&gt;
string TYPE; // flag to hold type of current template&lt;br /&gt;
&lt;br /&gt;
string CARD; // current notecard to load from&lt;br /&gt;
integer LINE = 0; // reading line number&lt;br /&gt;
key QUERY = NULL_KEY; // track notecard queries&lt;br /&gt;
&lt;br /&gt;
// DEBUG - show debug chat with wearer name for sorting&lt;br /&gt;
DEBUG(string dmessage) {&lt;br /&gt;
    llOwnerSay(&amp;quot;DEBUG: &amp;quot;+dmessage);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// SETUP - begin&lt;br /&gt;
SETUP() {&lt;br /&gt;
    llSetText(&amp;quot;Server: Templates&amp;quot;,&amp;lt;1,1,1&amp;gt;,1);&lt;br /&gt;
    if ( HAND_MYRIAD != 0 ) llListenRemove(HAND_MYRIAD); // is there already a listener? clear it&lt;br /&gt;
    HAND_MYRIAD = llListen(CHAN_MYRIAD,&amp;quot;&amp;quot;,NULL_KEY,&amp;quot;&amp;quot;); // start region channel listener&lt;br /&gt;
    DEBUG(&amp;quot;Template server &amp;quot;+VERSION+&amp;quot; &amp;quot;+VERSIONDATE+&amp;quot; loading Templates. Please wait...&amp;quot;); // tell player we're waiting for data server&lt;br /&gt;
    // make a list of all species, background, and career templates in server&lt;br /&gt;
    integer numcards = llGetInventoryNumber(INVENTORY_NOTECARD); // count number of notecards&lt;br /&gt;
    integer count; // temporary place to count which card we're on&lt;br /&gt;
    for ( count = 0; count &amp;lt; numcards; count++ ) { // step through each card in a loop&lt;br /&gt;
        string cardname = llGetInventoryName(INVENTORY_NOTECARD,count); // get the name of the current card to read&lt;br /&gt;
        if (llGetSubString(cardname,0,10) == &amp;quot;Background:&amp;quot; ||&lt;br /&gt;
            llGetSubString(cardname,0,6 ) == &amp;quot;Career:&amp;quot; ||&lt;br /&gt;
            llGetSubString(cardname,0,7 ) == &amp;quot;Species:&amp;quot; ) { // is the notecard a species, background, or career notecard?          &lt;br /&gt;
            TABLES = TABLES + [cardname]; // add it to list of cards to load&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    // start reading content of each template notecard&lt;br /&gt;
    if ( llGetListLength(TABLES) &amp;gt; 0 ) { // do we have notecard names in list?&lt;br /&gt;
        CARD = llList2String(TABLES,0); // set current card to first list item&lt;br /&gt;
        TABLES = llDeleteSubList(TABLES,0,0); // delete first list item&lt;br /&gt;
        QUERY = llGetNotecardLine(CARD,LINE++); // ask for line from notecard and advance to next line&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// RESET - reload&lt;br /&gt;
RESET() {&lt;br /&gt;
    llResetScript(); // now reset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
LIST_TEMPLATES(key id) {&lt;br /&gt;
    integer replyto = (integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)id,0,6)); // calculate requestor-specific chat channel to reply to&lt;br /&gt;
    // we have to work around llRegionSay max string length 1023 characters&lt;br /&gt;
    integer items = llGetListLength(TEMPLATENAMES); // how many total items to send?&lt;br /&gt;
    integer count; // which item are we processing now?&lt;br /&gt;
    string out = &amp;quot;TEMPLATES|&amp;quot;; // start an output list&lt;br /&gt;
    integer firstflag = TRUE; // is this first item in new list?&lt;br /&gt;
    while (count &amp;lt; items ) { // do we still have items in list to send?&lt;br /&gt;
        string name = llList2String(TEMPLATENAMES,count); // get the name of current item&lt;br /&gt;
        if (  llStringLength(out+&amp;quot;,&amp;quot;+name) &amp;lt;= 1000) { // is our output list under the string length limit?&lt;br /&gt;
            if ( firstflag == TRUE ) { // first item in list does not need a comma prefix&lt;br /&gt;
                out += name; // add this item as first in the output list&lt;br /&gt;
                firstflag = FALSE; // turn off first flag since next item won't be&lt;br /&gt;
            } else { // not first item in list, prefix with comma&lt;br /&gt;
                out += &amp;quot;,&amp;quot;+name; // add a comma and this template to existing list&lt;br /&gt;
            }&lt;br /&gt;
        } else { // output string &amp;gt; 1016 chars long&lt;br /&gt;
            llRegionSay(replyto,out); // send current output string&lt;br /&gt;
            out = &amp;quot;TEMPLATES|&amp;quot;+name; // start a new one and add current item to that&lt;br /&gt;
        }&lt;br /&gt;
        count++; // done putting this item in a list, set counter to next&lt;br /&gt;
    }&lt;br /&gt;
    llRegionSay(replyto,out); // say last line of output                        &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
GET_TEMPLATE(key id,string msg) {&lt;br /&gt;
    integer replyto = (integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)id,0,6)); // calculate requestor-specific chat channel to reply to&lt;br /&gt;
    list tokens = llParseString2List(msg,[&amp;quot;|&amp;quot;],[]); // split msg into list around pipe symbols&lt;br /&gt;
    string template = llList2String(tokens,1); // the name of the item to get&lt;br /&gt;
    integer listpos = llListFindList(TEMPLATENAMES,[template]); // get the position of that item in the list&lt;br /&gt;
    if ( listpos != -1 ) { // found template by name&lt;br /&gt;
        string type = llList2String(TEMPLATETYPES,llListFindList(TEMPLATENAMES,[template])); // check template type to see which list to pull from&lt;br /&gt;
        if ( type == &amp;quot;Background&amp;quot; ) { // if a background template, get from list of background template data&lt;br /&gt;
            integer count; // set a temporary counter&lt;br /&gt;
            integer numitems = llGetListLength(BACKGROUNDS); // how many background templates&lt;br /&gt;
            for ( count = 0; count &amp;lt; numitems; count++ ) { // step through each one&lt;br /&gt;
                string curitem = llList2String(BACKGROUNDS,count); // get the name&lt;br /&gt;
                if ( llSubStringIndex(curitem,&amp;quot;NAME=&amp;quot;+template) == 0 ) { // does name match the one we want?&lt;br /&gt;
                    llRegionSay(replyto,&amp;quot;TEMPLATE|&amp;quot;+curitem); // send the data&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        } else if ( type == &amp;quot;Career&amp;quot; ) { // if a career template, get from list of career template data&lt;br /&gt;
            integer count; // set a temporary counter&lt;br /&gt;
            integer numitems = llGetListLength(CAREERS); // how many career templates&lt;br /&gt;
            for ( count = 0; count &amp;lt; numitems; count++ ) { // step through each one&lt;br /&gt;
                string curitem = llList2String(CAREERS,count); // get the name of current one&lt;br /&gt;
                if ( llSubStringIndex(curitem,&amp;quot;NAME=&amp;quot;+template) == 0 ) { // does name match the one we want?&lt;br /&gt;
                    llRegionSay(replyto,&amp;quot;TEMPLATE|&amp;quot;+curitem); // send the data&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        } else if ( type == &amp;quot;Species&amp;quot; ) { // if a species template. get from list of species template data&lt;br /&gt;
            integer count; // set a temporary counter&lt;br /&gt;
            integer numitems = llGetListLength(SPECIES); // how many species templates?&lt;br /&gt;
            for ( count = 0; count &amp;lt; numitems; count++ ) { // step through teach one&lt;br /&gt;
                string curitem = llList2String(SPECIES,count); // get the name of current one&lt;br /&gt;
                if ( llSubStringIndex(curitem,&amp;quot;NAME=&amp;quot;+template) == 0 ) { // does name match the one we want?&lt;br /&gt;
                    llRegionSay(replyto,&amp;quot;TEMPLATE|&amp;quot;+curitem); // send the data&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    } else {&lt;br /&gt;
        llRegionSay(replyto,&amp;quot;TEMPLATE|ERROR=Requested template (&amp;quot;+template+&amp;quot;) not found&amp;quot;); // item requested does not exist, return an error&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
SET_TEMPLATE() {&lt;br /&gt;
    // FIXME - do we need this?    &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// DEFAULT STATE&lt;br /&gt;
default {&lt;br /&gt;
&lt;br /&gt;
    // STATE ENTRY - called on Reset&lt;br /&gt;
    state_entry() {&lt;br /&gt;
        SETUP(); // show credits and start character sheet load&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // on_rez - when rezzed to ground or from inventory as attachment during login&lt;br /&gt;
    on_rez(integer params) {&lt;br /&gt;
        params = 0; // LSLINT&lt;br /&gt;
        RESET(); // force to go through state entry&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // attach - when attached or detached from inventory or during login&lt;br /&gt;
    attach(key id) {&lt;br /&gt;
        id = NULL_KEY; // LSLINT&lt;br /&gt;
        RESET(); // force to go through state entry&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // dataserver called for each line of notecard requested&lt;br /&gt;
    dataserver(key queryid,string data) {&lt;br /&gt;
        if ( queryid == QUERY ) { // dataserver gave us line we asked for?&lt;br /&gt;
            if ( data != EOF ) { // we're not at end of notecard file?&lt;br /&gt;
                if ( llGetSubString(data,0,0) == &amp;quot;#&amp;quot; ) { // does this line start with comment mark?&lt;br /&gt;
                    QUERY = llGetNotecardLine(CARD,LINE++); // ignore comment and ask for the next line&lt;br /&gt;
                    return;&lt;br /&gt;
                }&lt;br /&gt;
                // Parse non-comment lines in keyword = value[,value,...] format&lt;br /&gt;
                list fields = llParseString2List(data,[&amp;quot;=&amp;quot;],[]); // break line of text into = delimited fields&lt;br /&gt;
                string cmd = llStringTrim(llList2String(fields,0),STRING_TRIM); // field zero is the &amp;quot;command&amp;quot;&lt;br /&gt;
                string values = llStringTrim(llList2String(fields,1),STRING_TRIM); // field one is the data&lt;br /&gt;
                if ( cmd == &amp;quot;NAME&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = data; // start the scratch template with this field&lt;br /&gt;
                    TEMPLATENAMES = TEMPLATENAMES + [values]; // add name to template name array&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;TYPE&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add the type&lt;br /&gt;
                    TYPE = values; // save the template type too&lt;br /&gt;
                    TEMPLATETYPES = TEMPLATETYPES + [values]; // add type to type array&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;GENRES&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add the genres&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;GPCOST&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add the cost&lt;br /&gt;
                    TEMPLATECOSTS = TEMPLATECOSTS + [(integer)values]; // add cost to the template cost array&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;ADDSTATISTIC&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add a statistic&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;ADDSKILL&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add a skill&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;ADDBOON&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add a boon&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;ADDFLAW&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add a flaw&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;ADDSFX&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add a special effect ability&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;ADDEQUIPMENT&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add an equipment&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;ADAPTATIONS&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add an adaptation type for this template&lt;br /&gt;
                }&lt;br /&gt;
                if ( cmd == &amp;quot;DESCRIPTION&amp;quot; ) {&lt;br /&gt;
                    SCRATCH = SCRATCH + &amp;quot;|&amp;quot; + data; // add the description&lt;br /&gt;
                }                &lt;br /&gt;
                //DEBUG(&amp;quot;POWER_LEVEL=[&amp;quot;+llList2String(POWER_LEVELS,LINE)+&amp;quot;] STAT_POOL=[&amp;quot;+(string)                &lt;br /&gt;
                QUERY = llGetNotecardLine(CARD,LINE++); // finished with known keywords, get next line&lt;br /&gt;
            } else { // end of notecard&lt;br /&gt;
                // notecard done - save template to memory&lt;br /&gt;
                // since template data is a variable length list for each template&lt;br /&gt;
                // we'll prefix a count of items in each template ahead of the template data itself&lt;br /&gt;
                if ( TYPE == &amp;quot;Background&amp;quot; ) {&lt;br /&gt;
                    DEBUG(&amp;quot;Adding Background: &amp;quot;+SCRATCH);&lt;br /&gt;
                    BACKGROUNDS += [SCRATCH]; // add background template to list of background templates&lt;br /&gt;
                }&lt;br /&gt;
                if ( TYPE == &amp;quot;Career&amp;quot; ) {&lt;br /&gt;
                    DEBUG(&amp;quot;Adding Career: &amp;quot;+SCRATCH);&lt;br /&gt;
                    CAREERS += [SCRATCH]; // add career template to list of career templates&lt;br /&gt;
                }&lt;br /&gt;
                if ( TYPE == &amp;quot;Species&amp;quot; ) {&lt;br /&gt;
                    DEBUG(&amp;quot;Adding Species: &amp;quot;+SCRATCH);&lt;br /&gt;
                    SPECIES += [SCRATCH]; // add species to list of species templates&lt;br /&gt;
                }&lt;br /&gt;
                // clean up scratch space&lt;br /&gt;
                SCRATCH = &amp;quot;&amp;quot;;&lt;br /&gt;
                TYPE = &amp;quot;&amp;quot;;&lt;br /&gt;
                // keep reading in more cards?&lt;br /&gt;
                if ( llGetListLength(TABLES) &amp;gt; 0 ) { // do we have notecard names in list?&lt;br /&gt;
                    CARD = llList2String(TABLES,0); // set current card to first list item&lt;br /&gt;
                    TABLES = llDeleteSubList(TABLES,0,0); // delete first list item&lt;br /&gt;
                    LINE = 0; // reset line count to zero for start of read&lt;br /&gt;
                    QUERY = llGetNotecardLine(CARD,LINE++); // ask for line from notecard and advance to next line&lt;br /&gt;
                } else {&lt;br /&gt;
                    DEBUG(&amp;quot;Templates loaded. Server ready. Free Memory: &amp;quot;+(string)llGetFreeMemory()); // done, ready to serve&lt;br /&gt;
                }&lt;br /&gt;
            } // end if data not equal eof&lt;br /&gt;
        } // end if query id equal&lt;br /&gt;
    } // end if data server event&lt;br /&gt;
    &lt;br /&gt;
    listen(integer channel,string name,key id,string msg) {&lt;br /&gt;
        channel = 0; // LSLINT&lt;br /&gt;
        name = &amp;quot;&amp;quot;; // LSLINT        &lt;br /&gt;
        list tokens = llParseString2List(msg,[&amp;quot;|&amp;quot;],[ ]); // split msg into list around pipe symbols&lt;br /&gt;
        string command = llList2String(tokens,0); // first field is some sort of command&lt;br /&gt;
        if ( command == &amp;quot;LIST_TEMPLATES&amp;quot; ) { // is this a list all templates request?&lt;br /&gt;
            LIST_TEMPLATES(id); // call it&lt;br /&gt;
            return; // return early instead of processing more&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;GET_TEMPLATE&amp;quot; ) { // GET_TEMPLATE|string templatename&lt;br /&gt;
            GET_TEMPLATE(id,msg); // call it&lt;br /&gt;
            return; // return early instead of processing more&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;SET_TEMPLATE&amp;quot; ) { // is this a set-template request?&lt;br /&gt;
            SET_TEMPLATE(); // call it&lt;br /&gt;
            return; // return early in case we add more later&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
} // end default state&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Allen Kerensky</name></author>	</entry>

	</feed>