@@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ @@ SGP patch installer - 04 January 2001 @@ @@ This is a quotable installer file that updates SGP code released to the SGP @@ website (http://sgp.erisian.net) prior to 04 Jan 01. @@ Code taken from the SGP website and installed AFTER 04 Jan 01 will already @@ have these changes or will be covered by a subsequent set of bugfixes. @@ @@ DO NOT USE THIS FILE if you are installing SGP into a blank database. All @@ of these changes are included as part of the standard installers. @@ @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ @@ This file adds the following features to standard installations: @@ @@ - +version, version monitoring and notation code and softcoded help. @@ - Utility commands for updating &STAFF-LIST and softcoded help. @@ - MMM-DD-YYYY() and softcoded help. @@ @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ @@ All of these features can be applied to uncustomized SGP code without fear @@ of screwing up your globals. This is all new code, not bugfixes. @@ All code ports cleanly to PennMUSH, TinyMUSH 2.2.x, MUX 2.0 and RhostMUSH @@ and worked on the unmodified test servers. @@ @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ @@ Using this file: @@ @@ ALL code in this file is uncommented and will quote to the game with your @@ MUSH client's uploading commands. @@ @@ Quote this file into the game in the master room for the changes to take @@ effect. Otherwise, change the names of the objects with the DBREF of the @@ object as it exists in your game. @@ @@ Make sure you run a test of the affected code and report any problems to the @@ SGP bug page. We like to get things fixed as soon as possible. @@ @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ @@ MUX users note: You will need to hand edit plushelp.txt and staffhelp.txt @@ in order to add the changes that accompany this patch. There were changes @@ to or the addition of the following entries: @@ @@ +help CREDITS @@ +shelp @@ +shelp +staff @@ +shelp +version @@ +shelp +version2 @@ +shelp FUNCTIONS @@ @@ Please get the file 'version.txt' from the website and add the appropriate @@ entries. @@ @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @pemit me=Creating data attribute &SGP-OBJECTS on the global parent and adding objects to the listing. Moment.... @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[num(SGP - Global Parent Object)] @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP - Global Parent Object/SGP-OBJECTS)]|[num(SGP - Staff Globals)] @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP - Global Parent Object/SGP-OBJECTS)]|[num(SGP - Main Globals)] @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP - Global Parent Object/SGP-OBJECTS)]|[num(SGP - Wizard Globals)] @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP - Global Parent Object/SGP-OBJECTS)]|[num(SGP - Global Functions)] @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP - Global Parent Object/SGP-OBJECTS)]|[num(SGP - Help Data)] @pemit me=Creating data attribute &SGP-VERSION on PLACES objects. If this code isn't installed, you'll see an error message. Moment.... @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP - Global Parent Object/SGP-OBJECTS)]|[num(Places_global_object)] @wait 0=&SGP-OBJECTS SGP - Global Parent Object=[get(SGP - Global Parent Object/SGP-OBJECTS)]|[num(Places_function_object)] @pemit me=Creating data attribute &SGP-VERSION on each SGP object. Moment.... @wait 0=&SGP-VERSION SGP - Global Parent Object=1.0|Base|[elements(time(),2 3 5)] @wait 0=&SGP-VERSION SGP - Staff Globals=1.0|Base|[elements(time(),2 3 5)] @wait 0=&SGP-VERSION SGP - Main Globals=1.0|Base|[elements(time(),2 3 5)] @wait 0=&SGP-VERSION SGP - Wizard Globals=1.0|Base|[elements(time(),2 3 5)] @wait 0=&SGP-VERSION SGP - Global Functions=1.0|Base|[elements(time(),2 3 5)] @pemit me=Creating data attribute &SGP-VERSION on PLACES objects. If this code isn't installed, you'll see an error message. Moment.... @wait 0=&SGP-VERSION Places_global_object=SGP-Y2K|Base|[elements(time(),2 3 5)] @wait 0=&SGP-VERSION Places_function_object=SGP-Y2K|Base|[elements(time(),2 3 5)] @pemit me=Creating data attribute &UPDATE-HISTORY on each SGP object. Moment.... &UPDATE-HISTORY SGP - Main Globals=Base Install [elements(time(),2 3 5)] &UPDATE-HISTORY SGP - Staff Globals=Base Install [elements(time(),2 3 5)] &UPDATE-HISTORY SGP - Wizard Globals=Base Install [elements(time(),2 3 5)] &UPDATE-HISTORY SGP - Global Functions=Base Install [elements(time(),2 3 5)] &UPDATE-HISTORY SGP - Global Parent Object=Base Install [elements(time(),2 3 5)] @pemit me=Creating data attribute &UPDATE-HISTORY on PLACES objects. If this code isn't installed, you'll see an error message. Moment.... &UPDATE-HISTORY Places_global_object=Y2K [elements(time(),2 3 5)] &UPDATE-HISTORY Places_function_object=Y2K [elements(time(),2 3 5)] @pemit me=Adding +version commands. Moment.... &CMD-VERSION SGP - Wizard Globals=$+version:@pemit %#=[ljust(===< Version Status for SGP >===,78,=)]%RObject[space(22)]Version[space(3)]dbref%BPatch[space(9)]Last Update%R[repeat(-,78)][iter(get(v(db)/SGP-OBJECTS),%R[mid(ljust(name(##),28),0,29)][mid(ljust(extract(get(##/SGP-VERSION),1,1,|),10),0,11)][ljust(##,6)][mid(ljust(extract(get(##/SGP-VERSION),2,1,|),14),0,15)][ljust(extract(get(##/SGP-VERSION),3,1,|),20)],|)%R][repeat(=,78)] &CMD-VERSION-HISTORY SGP - Wizard Globals=$+version *:@switch match(get(v(db)/SGP-OBJECTS),%0,|)=0,{@pemit %#=That is not an object tracked by +version.},{@pemit %#=[ljust(===< Version Status for SGP >===,78,=)]%RObject[space(22)]Version[space(3)]dbref%BPatch[space(9)]Last Update%R[repeat(-,78)]%R[mid(ljust(name(%0),28),0,29)][mid(ljust(extract(get(%0/SGP-VERSION),1,1,|),10),0,11)][ljust(%0,6)][mid(ljust(extract(get(%0/SGP-VERSION),2,1,|),14),0,15)][ljust(extract(get(%0/SGP-VERSION),3,1,|),20)]%R[ljust(---< Object History >---,78,-)]%R[get(%0/UPDATE-HISTORY)]%R[repeat(=,78)]} &CMD-VERSION-ADD SGP - Wizard Globals=$+version/add *:@switch match(get(v(db)/SGP-OBJECTS),%0,|)=1,{@pemit %#=That object is already listed in +version.},{@edit v(db)/SGP-OBJECTS=$,|%0;&SGP-VERSION %0=1.0|Base|[elements(time(),2 3 5)];&UPDATE-HISTORY %0=Base [elements(time(),2 3 5)];@pemit %#=You have added [name(%0)] to the +version listing.} &CMD-VERSION-REMOVE SGP - Wizard Globals=$+version/remove *:@switch match(get(v(db)/SGP-OBJECTS),%0,|)=0,{@pemit %#=That object is not listed in +version.},{&SGP-OBJECTS [v(db)]=remove(get(v(db)/SGP-OBJECTS),%0,|);&SGP-VERSION %0;&UPDATE-HISTORY %0;@pemit %#=You have removed [name(%0)] from the +version listing.} &CMD-VERSION-UPDATE SGP - Wizard Globals=$+version/update */*=*:@switch/first 0=match(get(v(db)/SGP-OBJECTS),%0,|),{@pemit %#=That object is not listed in +version.},setr(0,match(version patchlevel history,%1)),{@pemit %#=Invalid field. Valid entries are version, patchlevel history.},{&SGP-VERSION %0=setr(1,replace(extract(get(%0/SGP-VERSION),1,2,|),%q0,edit(%2,|,),|)|[extract(time(),2,2)] [last(time())]);&UPDATE-HISTORY %0=get(%0/UPDATE-HISTORY)|[edit(extract(%q1,3,1,|),|,%b)] [switch(%q0,3,edit(%2,|,))];@pemit %#=You have updated [name(%0)]'s [extract(version patchlevel history,%q0,1)] field to '%2'.} @pemit me=Installation of +version complete. Now adding +staff/add, +staff/remove, and mmm-dd-yyyy(). Moment.... &CMD-STAFF-ADD SGP - Wizard Globals=$+staff/add *:[setq(0,switch(isdbref(%0),1,%0,num(*%0)))];@switch/first 1=not(strmatch(type(%q0),PLAYER)),{@pemit %#=%0 is not a player!},match(get(v(db)/STAFF-LIST),%q0),{@pemit %#=That player is already listed in +staff.},{@wait 0=&STAFF-LIST [v(db)]=[get(v(db)/STAFF-LIST)]%B%q0;@pemit %#=You have added [name(%q0)] to the +staff listing.} &CMD-STAFF-REMOVE SGP - Wizard Globals=$+staff/remove *:[setq(0,switch(isdbref(%0),1,%0,num(*%0)))];@switch/first 1=not(strmatch(type(%q0),PLAYER)),{@pemit %#=%0 is not a player!},not(match(get(v(db)/STAFF-LIST),%q0)),{@pemit %#=That player is not listed in +staff.},{&STAFF-LIST [v(db)]=remove(get(v(db)/STAFF-LIST),%q0);@pemit %#=You have removed [name(%q0)] from the +staff listing.} &FN_MMM-DD-YYYY SGP - Global Functions=[elements(time(),2 3 5)] @pemit me=Now adding additional help files. If this is a MUX, you will get error messages. @edit SGP - Help Data/WIZLIST_COMMANDS=$,|+version|+staff &HELP_CREDITS SGP - Help Data=[repeat(-,78)]%RCredits%R%R[space(2)]SGP is a broad, cross platform coding effort with numerous contributors.[space(2)]%R[space(2)]Current contributors of code and assistance in testing, writing helpfiles, %R[space(2)]and pithy comments are as follows:%R%R[space(4)]Audumla@Everywhere[space(3)]--A little bit of everything, +staff and +staff/all, %R[space(27)]+beginner, +version, and installer files.%R[space(4)]BEM@Granite[space(10)]--Much of the base code including +who, joining %R[space(27)]and summon commands, debugging. %R[space(4)]Miateila@Granite[space(5)]--+finger and LOTS of pithy commentary%R[space(4)]Hilikiradi@Sandbox[space(3)]--Debugging, Penn platform tests, +cnotes, %R[space(27)]+lwho, PLACES upgrades, and installer files. %R[space(4)]Brazil@Everywhere[space(4)]--MUX 2.0 issues%R[space(4)]Talek, Javelin, Raevnos, David,%R[space(4)]Vexon@M*U*S*H[space(8)]--Penn Issues%R[space(4)]Ashen-Shugar[space(9)]--RhostMUSH Issues%R[space(4)]Lilith@Sandbox[space(7)]--Debugging, @register %R[space(4)]Hunger@Pacifica[space(6)]--Debugging, Aesthetics%R[space(4)]Jeff@TSC[space(13)]--+version %R[repeat(-,78)] &WIZHELP_FUNCTIONS SGP - Help Data=[repeat(-,78)]%RSoftcoded Functions:%R%R[space(2)]Functions: isstaff()[space(3)]%R%R[space(4)]Returns 1 or 0 when player matches the flags defined as 'staff'%R[space(4)]%R[space(13)]ostaff()[space(4)]%R[space(4)]%R[space(4)]Softcoded function that checks to see if against the official %R[space(4)]staff list as listed on the Global Parent.%R[space(4)]%R[space(13)]andlist(,) %R%R[space(4)]Returns a string as a comma separated list with 'and' between second to %R[space(4)]last and last elements.%R[space(4)]%R[space(13)]mmm-dd-yyyy()%R[space(4)]%R[space(4)]Returns time() output in terms of MMM DD YYYY.%R[space(4)]%R[repeat(-,78)] &WIZHELP_+STAFF SGP - Help Data=[repeat(-,78)]%RNotes on +staff:%R %R[space(2)]SYNTAX: +staff/add %R[space(10)]+staff/remove %R %R[space(2)]These two commands modify the contents of &STAFF-LIST on the global parent %R[space(2)]and affect whether or not a given person appears on the +staff and %R[space(2)]+staff/all listings.[space(2)]Where isstaff() checks against flags, STAFF-LIST and %R[space(2)]ostaff() are explicitly set and checked by code.%R[space(3)]%R[repeat(-,78)] &WIZHELP_HELP SGP - Help Data=[repeat(-,78)]%RIndex %R%R[space(2)]This is the index of staff helpfiles, V1.0b(17JUL00)%R%R[space(2)]+accept[space(8)]+cnotes[space(8)]+commands[space(6)]+contents[space(6)]+duty[space(10)]%R[space(2)]+join[space(10)]+motd[space(10)]+register[space(6)]+rjoin[space(9)]+rsummon[space(7)]%R[space(2)]+stnotes[space(7)]+summon[space(8)]+timestamp[space(5)]+version[space(7)]BACKGROUNDS[space(4)]%R[space(2)]CONFIGURE[space(6)]DEFAULTS[space(7)]FUNCTIONS[space(6)]PROJECT%R%R[space(2)]To get help on any of the listed topics, type '+shelp '%R[repeat(-,78)] &WIZHELP_+VERSION SGP - Help Data=[repeat(-,78)]%R+version%R%R[space(2)]SYNTAX:[space(2)]+version[space(3)]%R[space(11)]+version %R%R[space(2)]This code is in place to aid the user in the tracking of version history of%R[space(2)]SGP objects.[space(2)]The first form of this command returns a list of all SGP and %R[space(2)]additional tracked objects, their version numbers, dbrefs, most recent %R[space(2)]applied patches, and the date the last upgrade was done.[space(2)]SGP installers %R[space(2)]update this information automatically.%R[space(2)]%R[space(2)]The second form of this command looks up a specific tracked object and %R[space(2)]returns information on what was applied to the object when.%R[space(2)]%R[space(2)]See Also: +version2[space(2)]%R[repeat(-,78)] &WIZHELP_+VERSION2 SGP - Help Data=[repeat(-,78)]%R+version (continued)%R%R[space(2)]SYNTAX:[space(2)]+version/add [space(3)]%R[space(11)]+version/remove %R[space(11)]+version/update /=%R[space(11)]%R[space(2)]The first form of this command adds new objects to the +version listing.[space(2)]%R[space(2)]The second form removes an object from +version. The third form edits %R[space(2)]various parts of the +version display. Fields include 'version', %R[space(2)]'patchlevel' and 'history'.[space(2)]The 'Last Update' field is updated by the first %R[space(2)]two uses of this command.%R[space(2)]%R[space(2)]Updating the 'history' field adds detailed information to the object's %R[space(2)]UPDATE-HISTORY attribute and includes a date with every entry. %R[repeat(-,78)] @pemit me=Triggering the startup on the Global Functions object. Moment.... @trigger SGP - Global Functions/startup +version/update [num(SGP - Main Globals)]/patchlevel=+version +version/update [num(SGP - Staff Globals)]/patchlevel=+version +version/update [num(SGP - Wizard Globals)]/patchlevel=+version +version/update [num(SGP - Global Parent Object)]/patchlevel=+version +version/update [num(SGP - Global Functions)]/patchlevel=+version +version/update [num(SGP - Help Data)]/patchlevel=+version +version/update [num(SGP - Help Data)]/history=+version, +staff, mmm-dd-yyyy() files added @pemit me=Installation of patch complete. As always, test the commands to see if they work. Please report bugs to http://sgp.erisian.net.%R%RMUX users will need to edit their plushelp.txt and staffhelp.txt files to add in the changes that accompany this patch. Get the file: SGP-+help-update.txt from the website.