@@^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ @@ SGP Bugfixes Installer - 11 July 00 @@ @@ This is a quotable installer file that updates SGP code released to the SGP @@ website(http://sandbox.erisian.net/sgp/sgpindex.html) prior to 11 July 00. @@ Code taken from the SGP website and installed AFTER 11 July 00 will already @@ have these changes or will be covered by a subsequent set of bugfixes. @@ @@ All code presented here was added in response to bug reports from SGP users @@ and/or coders at the SGP Bug Reporting Page @@ (http://sandbox.erisian.net/sgp/SGPbugs.html)and whose disposition is @@ detailed at the SGP Bug Tracking Page @@ (http://sandbox.erisian.net/sgp/bugtracking.html). The list of fixes in @@ this file is listed in the next section. @@ @@^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ @@ This file fixes the following bugs: @@ @@ - +resume problem with not destroying the timestop object in all platforms. @@ - +help and +wizhelp bugs in Penn. @@ - 3 bugs in the +timestamp code in Penn. @@ - Changed explicit flag checking to either isstaff() or to check against @@ WIZARD in the 3 +spy commands in PLACES. @@ - Typo in mutter code for PLACES. @@ - Changed explicit flag checking to simply check against isstaff() in +who @@ and +lwho. @@ - Fixed an @verb problem in PLACEFUNCTION that caused problems with JOIN and @@ OJOIN messages in join and sit commands. This was a Penn issue. @@ - Removed a } from PLACEFUNCTION that was causing problems in PLACENUMS. @@ - Fixed a problem with mis-escaped commas in DO_TT and DO_TTOOC that caused @@ problems in Penn. @@ - Updated +help for PLACES. @@ @@^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ @@ All of these bugfixes can be applied to uncustomized SGP code without fear @@ of screwing up your globals. @@ All code ported cleanly to PennMUSH, TinyMUSH 2.2.x, and MUX 2.0 and worked @@ on the unmodified test servers. @@ Customized SGP code may need to be edited by hand. @@ @@^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ @@ Using this file: @@ @@ ALL code in this file is commented out using the '@@' symbol in front of the @@ code. Remove the @@ from the beginning of any line that you want quoted into @@ the game. Leave the rest commented out. This is done so that if @@ customization has been done, then the coder has control over what things @@ change and what things don't. @@ @@ If parent and data objects have been removed from the master room, you will @@ need to substitute the DBREF of the object for the name of the object. @@ @@ 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. @@ @@^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @pemit me=Beginning SGP bugfix quote...Moment. @@ &CMD-RESUME SGP - Main Globals=$+resume:@dolist lcon(loc(%#))=@switch/first and(strmatch(first(name(##)),TIMESTOP:*),controls(%#,##))=1,{@nuke ##;@nuke ##} @@ &DO_COL SGP - Help Data=[setq(0,fold(max_length,%0,0,%1))][setq(1,div(76,add(%q0,1)))][setq(2,sub(div(76,%q1),1))][setq(3,add(1,div(sub(words(%0,%1),1),%q1)))][setq(4,0)][iter(lnum(%q3),%r%b%b[iter(lnum(%q1),ljust(index(%0,%1,setq(4,add(1,%q4))%q4,1),%q2))])] @@ &CMD-TIMESTAMP-SET SGP - Wizard Globals=$+timestamp */*=*:;@switch hasflag(%#,wizard)[isdbref(num(*%0))]=0*,{@pemit %#=Huh?%B%B(Type "help" for help.)},10,{@pemit %#=You can only set timestamps on players.},{×tamp-%1 *%0=Set by [name(%#)] on [time()]. %2;@lock *%0/timestamp-%1;@pemit %#=You have set the following timestamp on [name(*%0)]:%B%B[get(*%0/timestamp-%1)]} @@ &CMD-TIMESTAMP-READ-STAFF SGP - Wizard Globals=$+timestamp/read *:@switch isstaff(%#)[isdbref(num(*%0))][words(lattr(*%0/timestamp*))]=0*,{@pemit %#=Huh?%B%B(Type "help" for help.)},10*,{@pemit %#=That is not a player.},110,{@pemit %#=[name(*%0)] has no timestamps.},{@pemit %#=center(name(*%0),78,=)[iter(lattr(*%0/timestamp-*),%R##%B-%B[get(*%0/##)])]} @@ &CMD-TIMESTAMP-REMOVE SGP - Wizard Globals=$+timestamp/rem */*:;@switch hasflag(%#,wizard)[isdbref(num(*%0))]=0*,{@pemit %#=Huh?%B%B(Type "help" for help.)},10,{@pemit %#=You can only set timestamps on players.},{@unlock *%0/timestamp-%1;@pemit %#=You have removed the following timestamp on [name(*%0)]:%B%B[get(*%0/timestamp-%1)];×tamp-%1 *%0=} @@ &SPY_WHO Places_global_object=$+spy/who:@switch isstaff(%#)=0,{@pemit %#=You're not authorized to do that.},{@pemit %#=[repeat(*,78)]%RCharacters currently possessing +spy capability:%R%R[iter(get([parent(me)]/CANSPY),switch(mod(member(get([parent(me)]/CANSPY),##),4),0,%R[ljust(name(##),15)],[ljust(name(##),15)]))]%R%R[repeat(*,78)]} @@ &SPY_ADD Places_global_object=$+spy/add *:@switch orflags(%#,W)=0,{@pemit %#=You're not authorized to do that.},{@switch member(get([parent(me)]/CANSPY),num(*%0))=0,{&CANSPY [parent(me)]=cat(get([parent(me)]/CANSPY),num(*%0));@pemit %#=[name(num(*%0))] has been cleared for spying.},{@pemit %#=That person is already cleared for spying.}} @@ &SPY_REMOVE Places_global_object=$+spy/remove *:@switch orflags(%#,W)=0,{@pemit %#=You're not authorized to do that.},{@switch member(get([parent(me)]/CANSPY),num(*%0))=0,{@pemit %#=That person is not in the Master Spy List.},{&CANSPY [parent(me)]=remove(get([parent(me)]/CANSPY),num(*%0));@pemit %#=[name(num(*%0))] is removed from the Master Spy List.}} @@ &DO_MUTTER_TT Places_global_object=$mutter/tt *=*: @switch/first [setq(0,locate(%#,%0,nimP))][r(0)] [setq(9,WhichPlace(%l,%#))][switch(r(9),0,setq(9,WhichPlace(%l,r(0))))][r(9)]=#-1 *, {@pemit %#=I don't see that here.},#-2 *, {@pemit %#=I'm not sure which %0 you mean.},* 0, {@pemit %#=Neither you nor [name(r(0))] is at a special place.},{@pemit/list [setq(8,{[PlaceInfo(%l,r(9),PREFIX)], [switch(%1,:* "*"*,{%N [first(delete(%1,0,1),")]%S mutters to [setq(1,ulocal(MUTTER_FN,extract(%1,2,1,")))][switch(r(0),%#,%oself,name(r(0)))][switch(r(1),...,.,{, "[r(1)]"})] [rest(rest(%1,"),")]},:*,{%N mutters to [switch(r(0),%#,%oself,name(r(0)))].},;* "*"*,{%N[first(delete(%1,0,1),")]%S mutters to [setq(1,ulocal(MUTTER_FN,extract(%1,2,1,")))][switch(r(0),%#,%oself,name(r(0)))][switch(r(1),...,.,{, "[r(1)]"})] [rest(rest(%1,"),")]},;*,{%N mutters to [switch(r(0),%#,%oself,name(r(0)))].},{[setq(1,ulocal(MUTTER_FN,%1))]%N mutters to [switch(r(0),%#,%oself,name(r(0)))][switch(r(1),...,.,{, "[r(1)]"})]})]})][setunion(AtPlace(%l,r(9)),%# [r(0)])]=r(8);@pemit/list [iter(lcon(%l),switch(strmatch([get(##/SPYING)],%l [r(0)]),1,##))]=(Overheard) [r(8)]@pemit %#=[setq(2,edit(edit(%1,<,),>,))][ulocal(MUTTER_FROM_FN,%#,r(0),r(2))];@pemit r(0)=ulocal(MUTTER_TO_FN,%#,r(0),r(2))} @@ &CMD-PLUS-LWHO SGP - Main Globals=$+lwho: @pemit %#=setq(0,0)[u(v(db)/header)][ljust(Player,15,)] [ljust(Sex,3)] [ljust(Alias,5)][rjust(Idle,6)] [ljust(mid(Location,0,28),28,)] [ljust(dbref,6)]%R[u(v(db)/footer)][iter(filter(v(db)/fil-LWHO,lwho()),switch(and(hasflag(##,dark),not(isstaff(%#))),1,,%R[ljust(name(##),15,.)] [ljust(mid(u(##/sex),0,1),3)] [ljust(mid(u(##/alias),0,5),5)][rjust(mid(u(v(db)/secs2hrs,idle(##)),0,6),6)] [ljust(switch(and(or(hasflag(##,unfindable),hasflag(loc(##),unfindable)),not(or(hasflag(%#,wizard),hasflag(%#,immortal)))),1,,mid(name(room(##)),0,28)),28,.)] [ljust(switch(or(isstaff(%#),and(hasflag(loc(##),JUMP_OK),not(hasflag(##,UNFINDABLE)),not(hasflag(loc(##),UNFINDABLE)))),0,,mid(room(##),0,5)),6,.)][ljust(switch(1,ostaff(##),Staff),6)])[setq(0,add(%q0,not(hasflag(##,dark))))])]%r[u(v(db)/footer)]%RThere are %q0 players connected in location [name(%L)]%R[u(v(db)/footer)] @@ &CMD-PLUS-WHO SGP - Main Globals=$+who: @pemit %#=setq(0,0)[u(v(db)/header)][ljust(Player,15,)] [ljust(Sex,3)] [ljust(Alias,5)][rjust(Idle,6)] [ljust(mid(Location,0,28),28,)] [ljust(dbref,6)]%R[u(v(db)/footer)][iter(lwho(),switch(and(hasflag(##,dark),not(isstaff(%#))),1,,%R[ljust(name(##),15,.)] [ljust(mid(u(##/sex),0,1),3)] [ljust(mid(u(##/alias),0,5),5)][rjust(mid(u(v(db)/secs2hrs,idle(##)),0,6),6)] [ljust(switch(and(or(hasflag(##,unfindable),hasflag(loc(##),unfindable)),not(or(hasflag(%#,wizard),hasflag(%#,immortal)))),1,,mid(name(room(##)),0,28)),28,.)] [ljust(switch(or(isstaff(%#),and(hasflag(loc(##),JUMP_OK),not(hasflag(##,UNFINDABLE)),not(hasflag(loc(##),UNFINDABLE)))),0,,mid(room(##),0,5)),6,.)][ljust(switch(1,ostaff(##),Staff),6)])[setq(0,add(%q0,not(hasflag(##,dark))))])]%r[u(v(db)/footer)]%RThere are %q0 players connected%R[u(v(db)/footer)] @@ &PLACEFUNCTION Places_global_object=@switch/first 0=[lte(%2, get(%0/PLACESMAX))], @pemit %1=Invalid Place Number '%2'.,[setq(1, extract(get(%0/PLACENUMS), %2, 1, |))][gt(ulocal(GETINFO, %0, %2, CURPLACES), words(r(1)))], {@pemit %1=There aren't any free spaces there.},{@verb %1=[setq(0,ulocal(getinfo,%0,%2,NAME))]%1,eval_msg,[edit([U(GETINFO, %0, %2, JOIN)] [r(0)].,%,,%%%,)],oeval_mesg,[edit([U(GETINFO, %0, %2, OJOIN)] [r(0)].,%,,%%%,)]};@pemit/list [r(1)]= [name(%1)] joins you. ;&PLACENUMS %0=[replace(get(%0/PLACENUMS), %2, [r(1)]%1%b, |)] @@ &DO_TT Places_global_object=$tt *:@pemit/list [setq(0,ulocal(WHICHPLACE,%l,%#))][switch(r(0),0,%#[setq(1,You'll need to join a place first.)],[extract(get(%l/PLACENUMS),r(0),1,|)][setq(1,[ulocal(GETINFO,%l,r(0),PREFIX)]%, [switch(%0,:*,%N [delete(%0,0,1)],;*,%N[delete(%0,0,1)],"*,%N says "[delete(%0,0,1)]",|*,delete(%0,0,1),%N says "%0")])])]=[r(1)];@pemit/list [iter(lcon(%l),switch(strmatch([get(##/SPYING)],%l [r(0)]),1,##))]=(Overheard) [r(1)] @@ &DO_TTOOC Places_global_object=$ttooc *:@pemit/list [setq(0,ulocal(WHICHPLACE,%l,%#))][switch(r(0),0,%#[setq(1,You'll need to join a place first.)],[extract(get(%l/PLACENUMS),r(0),1,|)][setq(1, [ulocal(GETINFO,%l,r(0),PREFIX)]%, [switch(%0,:*,%N [delete(%0,0,1)],;*,%N[delete(%0,0,1)],"*,%N says "[delete(%0,0,1)]",|*,delete(%0,0,1),%N says "%0")])])]=r(1);@pemit/list [iter(lcon(%l),switch(strmatch([get(##/SPYING)],%l [r(0)]),1,##))]=(Overheard) [r(1)] @@ &HELP_PLACES SGP - Help Data=[repeat(-,78)]%RPLACES%R%R[space(2)]SYNTAX:[space(2)]Mv from <#> to <#>[space(10)]Moves a vacancy from one place to%R[space(39)]another.%R[space(11)]Join [space(11)]Puts you at %R[space(11)]Join at #[space(14)]Puts you at place #.%R[space(11)]Join with [space(12)]Puts you at the place with .%R[space(11)]sit * [space(23)]Alias for Join.%R[space(11)]Depart[space(22)]Removes you from your place.%R[space(11)]Stand[space(23)]Alias for Depart.%R[space(11)]Places[space(22)]Lists who's present at all places.%R[space(11)]Place [space(17)]Lists who's present at place .%R[space(11)]Plook[space(23)]Lists in column format everyone around%R[space(39)]the room.%R[space(11)]Plook [space(17)]Lists name of and virtual desc.%R[space(11)]tt [space(16)](Tete a tete) Relays a message to all%R[space(39)]those at your place. This command takes%R[space(39)]the usual say/pose tokens, and%R[space(39)]TT | will emit.%R[space(11)]ttooc [space(13)](Tete a tete) Relays an OOC message%R[space(11)]Update <#>/