[PENNMUSH-ANNOUNCE] 1.7.5-patch06
dunemush@pennmush.org
dunemush at pennmush.org
Sun, 28 Apr 2002 15:13:26 -0500
This is patch06 to PennMUSH 1.7.5. After applying this patch, you will
have version 1.7.5p6
To apply this patch, save it to a file in your top-level MUSH directory,
and do the following:
patch -p1 < 1.7.5-patch06
make install
If you use GNU patch 2.2, you probably want the above to be 'patch -b -p1',
not just 'patch -p1'.
Unix (or cygwin) users need not worry about failed hunks in src/switchinc.c,
hdrs/switches.h, hdrs/cmds.h, or hdrs/funs.h. These files are automatically
rebuilt on compile.
Then @shutdown and restart your MUSH.
- Alan/Javelin
In this patch:
Config:
* New attribute_alias config directive, and some default attribute
aliases added to alias.cnf. Based on a report from Hilikiradi.
Functions:
* textfile() returns help/news/etc. entries. Suggested by Trispis@M*U*S*H.
Minor changes:
* New @warnings type lock-checks that reports problems with @locks. [SW]
* exit-unlinked checks do some sanity checks on variable exits. [SW]
* Improved error-checking in evaluation of @locks. [SW]
* No more hdrs/warnings.h file. [SW]
* New @nameaccent attribute to add accent marks to object
names in speech and things like look. Idea from Elendor. [SW]
* accent() understands a few more things. [SW]
* The accented characters->html entities table and other
lookup tables are now in a seperate file, src/tables.c,
which can be regenerated if needed by utils/gentables.c [SW]
* Improvements in caching of cached text files. [SW]
Fixes:
* Buglet in ansi display of high-bit characters fixed. Report by
Trispis@M*U*S*H. [SW]
* Improved @clock2 help by Linda Antonsson.
* Fixes from 1.7.4p17
* A truly perverse database could cause an infinite loop on load. [TAP]
* Win32 portability fixes. [NJG, EEH]
* The notify code assumed that integers could be directly stored in
pointers. This isn't always true. [SW]
* Removed some un-used code. [SW]
* Fixed some compiler warnings and general code cleanup. [SW]
* Changed signal handlers to always use the ANSI/ISO C form (Returning
void, basically) [SW]
* A null string no longer prefix-matches anything. Report by Prot Diryn
and Cheetah@M*U*S*H.
* @sitelock/remove could remove entries it shouldn't if you remove the first
one after the '@sitelock will add sites...' line. Reported by
Ambrosia@M*U*S*H. [SW]
* The last line of the access.cnf file sometimes wouldn't get read
properly. [SW]
Prereq: 1.7.5p5
*** 1_7_5.134/Patchlevel Mon, 11 Mar 2002 18:22:55 -0600 dunemush (pennmush/5_Patchlevel 1.17.1.6 600)
--- 1_7_5.158(w)/Patchlevel Mon, 22 Apr 2002 11:34:04 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.7 600)
***************
*** 1,2 ****
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.5p5
--- 1,2 ----
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.5p6
*** 1_7_5.134/CHANGES.174 Sat, 16 Mar 2002 09:31:59 -0600 dunemush (pennmush/8_CHANGES 1.219.1.72.1.21 600)
--- 1_7_5.158(w)/CHANGES.174 Mon, 22 Apr 2002 11:31:58 -0500 dunemush (pennmush/8_CHANGES 1.219.1.72.1.36 600)
***************
*** 18,23 ****
--- 18,63 ----
==========================================================================
+ Version 1.7.4 patchlevel 18 April 14, 2002
+
+ Fixes:
+ * Help for following() function added. Report by Ashen-Shugar@Rhost.
+
+ Version 1.7.4 patchlevel 17 April 14, 2002
+
+ Minor Changes:
+ * The on-vacation flag, if in use, is no longer automatically cleared
+ on connect. Instead, the player is warned on connect (and at each
+ dump) that their flag is set. Suggested by Nymeria@M*U*S*H.
+ Fixes:
+ * Improved help for edit(). Suggested by Trispis@M*U*S*H [SW]
+ * List functions with null elements and a null output seperator could
+ trip end-of-buffer checks and stop in the middle of a list. [SW]
+ * valid() was inconsistent in how it handled attribute names with lower-case
+ letters compared to what everything else does. Reported by Philip Mak. [SW]
+ * @open could cause crashes in some unusual contexts. Reported
+ by Dandy@M*U*S*H.
+ * Improved sort()'s autodetection of list types. [SW]
+ * Fixed a problem with sorting dbrefs larger than the highest one in the
+ db. [SW]
+ * Mac portability fixes. [DW]
+ * Help for @open clarified. Suggested by fil@M*U*S*H.
+ * Help for kill clarified. Suggested by Philip Mak.
+ * Channel titles can no longer contain newlines or beeps.
+ Report by Nome@M*U*S*H.
+ * soundex behaved badly with extended characters. [SW]
+ * inc() and dec() now behave like the help says, regardless of whether
+ tiny_math is set or not. Their behavior on null strings and strings
+ that do not end in a digit depend on the null_eq_zero setting.
+ Reported by Wayne@PDX.
+ * The panic db file descriptor was never closed after reading a
+ panic dump. [SW]
+ * DOES removed from help attribute list. Suggested Philip Mak.
+ * Under no circumstances should connection to a null-named player
+ be allowed. Suggested by Wayne@PDX.
+ * 'with' no longer allows use of $commands on remote objects you
+ don't control. Report by Nammyung@M*U*S*H.
+
Version 1.7.4 patchlevel 16 March 11, 2002
Minor changes:
*** 1_7_5.134/CHANGES Thu, 14 Mar 2002 09:15:34 -0600 dunemush (pennmush/g/7_CHANGES 1.27.1.12 600)
--- 1_7_5.158(w)/CHANGES Thu, 25 Apr 2002 20:31:15 -0500 dunemush (pennmush/g/7_CHANGES 1.27.1.24 600)
***************
*** 18,23 ****
--- 18,64 ----
==========================================================================
+ Version 1.7.5 patchlevel 6 April 22, 2002
+
+ Config:
+ * New attribute_alias config directive, and some default attribute
+ aliases added to alias.cnf. Based on a report from Hilikiradi.
+ Functions:
+ * textfile() returns help/news/etc. entries. Suggested by Trispis@M*U*S*H.
+ Minor changes:
+ * New @warnings type lock-checks that reports problems with @locks. [SW]
+ * exit-unlinked checks do some sanity checks on variable exits. [SW]
+ * Improved error-checking in evaluation of @locks. [SW]
+ * No more hdrs/warnings.h file. [SW]
+ * New @nameaccent attribute to add accent marks to object
+ names in speech and things like look. Idea from Elendor. [SW]
+ * accent() understands a few more things. [SW]
+ * The accented characters->html entities table and other
+ lookup tables are now in a seperate file, src/tables.c,
+ which can be regenerated if needed by utils/gentables.c [SW]
+ * Improvements in caching of cached text files. [SW]
+ Fixes:
+ * Buglet in ansi display of high-bit characters fixed. Report by
+ Trispis@M*U*S*H. [SW]
+ * Improved @clock2 help by Linda Antonsson.
+ * Fixes from 1.7.4p17
+ * A truly perverse database could cause an infinite loop on load. [TAP]
+ * Win32 portability fixes. [NJG, EEH]
+ * The notify code assumed that integers could be directly stored in
+ pointers. This isn't always true. [SW]
+ * Removed some un-used code. [SW]
+ * Fixed some compiler warnings and general code cleanup. [SW]
+ * Changed signal handlers to always use the ANSI/ISO C form (Returning
+ void, basically) [SW]
+ * A null string no longer prefix-matches anything. Report by Prot Diryn
+ and Cheetah@M*U*S*H.
+ * @sitelock/remove could remove entries it shouldn't if you remove the first
+ one after the '@sitelock will add sites...' line. Reported by
+ Ambrosia@M*U*S*H. [SW]
+ * The last line of the access.cnf file sometimes wouldn't get read
+ properly. [SW]
+
+
Version 1.7.5 patchlevel 5 March 11, 2002
Commands:
*** 1_7_5.134/game/txt/hlp/pennvers.hlp Mon, 25 Mar 2002 11:01:50 -0600 dunemush (pennmush/12_pennvers.h 1.169.1.42.1.3.1.2.2.2.1.1.1.3.1.2 600)
--- 1_7_5.158(w)/game/txt/hlp/pennvers.hlp Sun, 28 Apr 2002 15:04:22 -0500 dunemush (pennmush/12_pennvers.h 1.169.1.42.1.3.1.2.2.2.1.1.1.3.1.9 600)
***************
*** 1,5 ****
& changes
! & 1.7.5p5
This is a list of changes in this patchlevel which are probably of
interest to players. More information about new commands and functions
can probably be gotten via 'help <name of whatever>'. 'help credits'
--- 1,5 ----
& changes
! & 1.7.5p6
This is a list of changes in this patchlevel which are probably of
interest to players. More information about new commands and functions
can probably be gotten via 'help <name of whatever>'. 'help credits'
***************
*** 11,16 ****
--- 11,58 ----
A list of the patchlevels associated with each release can
be read in 'help patchlevels'.
+ Version 1.7.5 patchlevel 6 April 22, 2002
+
+ Config:
+ * New attribute_alias config directive, and some default attribute
+ aliases added to alias.cnf. Based on a report from Hilikiradi.
+ Functions:
+ * textfile() returns help/news/etc. entries. Suggested by Trispis@M*U*S*H.
+ Minor changes:
+ * New @warnings type lock-checks that reports problems with @locks. [SW]
+ * exit-unlinked checks do some sanity checks on variable exits. [SW]
+ * Improved error-checking in evaluation of @locks. [SW]
+ * No more hdrs/warnings.h file. [SW]
+ * New @nameaccent attribute to add accent marks to object
+ names in speech and things like look. Idea from Elendor. [SW]
+ * accent() understands a few more things. [SW]
+ * The accented characters->html entities table and other
+ lookup tables are now in a seperate file, src/tables.c,
+ which can be regenerated if needed by utils/gentables.c [SW]
+ * Improvements in caching of cached text files. [SW]
+ Fixes:
+ * Buglet in ansi display of high-bit characters fixed. Report by
+ Trispis@M*U*S*H. [SW]
+ * Improved @clock2 help by Linda Antonsson.
+ * Fixes from 1.7.4p17
+ * A truly perverse database could cause an infinite loop on load. [TAP]
+ * Win32 portability fixes. [NJG, EEH]
+ * The notify code assumed that integers could be directly stored in
+ pointers. This isn't always true. [SW]
+ * Removed some un-used code. [SW]
+ * Fixed some compiler warnings and general code cleanup. [SW]
+ * Changed signal handlers to always use the ANSI/ISO C form (Returning
+ void, basically) [SW]
+ * A null string no longer prefix-matches anything. Report by Prot Diryn
+ and Cheetah@M*U*S*H.
+ * @sitelock/remove could remove entries it shouldn't if you remove the first
+ one after the '@sitelock will add sites...' line. Reported by
+ Ambrosia@M*U*S*H. [SW]
+ * The last line of the access.cnf file sometimes wouldn't get read
+ properly. [SW]
+
+
+ & 1.7.5p5
Version 1.7.5 patchlevel 5 March 11, 2002
Commands:
***************
*** 189,194 ****
--- 231,278 ----
* Indentation fixes [SW]
* Fixes up to 1.7.4p12 merged in.
+ & 1.7.4p18
+ Version 1.7.4 patchlevel 18 April 14, 2002
+
+ Fixes:
+ * Help for following() function added. Report by Ashen-Shugar@Rhost.
+
+ & 1.7.4p17
+ Version 1.7.4 patchlevel 17 April 14, 2002
+
+ Minor Changes:
+ * The on-vacation flag, if in use, is no longer automatically cleared
+ on connect. Instead, the player is warned on connect (and at each
+ dump) that their flag is set. Suggested by Nymeria@M*U*S*H.
+ Fixes:
+ * Improved help for edit(). Suggested by Trispis@M*U*S*H [SW]
+ * List functions with null elements and a null output seperator could
+ trip end-of-buffer checks and stop in the middle of a list. [SW]
+ * valid() was inconsistent in how it handled attribute names with lower-case
+ letters compared to what everything else does. Reported by Philip Mak. [SW]
+ * @open could cause crashes in some unusual contexts. Reported
+ by Dandy@M*U*S*H.
+ * Improved sort()'s autodetection of list types. [SW]
+ * Fixed a problem with sorting dbrefs larger than the highest one in the
+ db. [SW]
+ * Mac portability fixes. [DW]
+ * Help for @open clarified. Suggested by fil@M*U*S*H.
+ * Help for kill clarified. Suggested by Philip Mak.
+ * Channel titles can no longer contain newlines or beeps.
+ Report by Nome@M*U*S*H.
+ * soundex behaved badly with extended characters. [SW]
+ * inc() and dec() now behave like the help says, regardless of whether
+ tiny_math is set or not. Their behavior on null strings and strings
+ that do not end in a digit depend on the null_eq_zero setting.
+ Reported by Wayne@PDX.
+ * The panic db file descriptor was never closed after reading a
+ panic dump. [SW]
+ * DOES removed from help attribute list. Suggested Philip Mak.
+ * Under no circumstances should connection to a null-named player
+ be allowed. Suggested by Wayne@PDX.
+ * 'with' no longer allows use of $commands on remote objects you
+ don't control. Report by Nammyung@M*U*S*H.
+
& 1.7.4p16
Version 1.7.4 patchlevel 16 March 11, 2002
***************
*** 5206,5213 ****
For information on a specific patchlevel of one of the versions listed,
type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3'
! 1.7.5: 0, 1, 2, 3, 4, 5
! 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
1.7.3: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
1.7.2: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35
--- 5290,5297 ----
For information on a specific patchlevel of one of the versions listed,
type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3'
! 1.7.5: 0, 1, 2, 3, 4, 5, 6
! 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
1.7.3: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
1.7.2: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35
*** 1_7_5.134/game/txt/hlp/penntop.hlp Mon, 11 Mar 2002 18:22:55 -0600 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.2 600)
--- 1_7_5.158(w)/game/txt/hlp/penntop.hlp Wed, 10 Apr 2002 20:36:09 -0500 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.2 600)
***************
*** 163,177 ****
ADISCONNECT ADROP AEFAIL AENTER AFAILURE
AHEAR ALEAVE ALFAIL AMHEAR AMOVE
APAYMENT ASUCCESS AWAY CHARGES COST
! DEATH DESCRIBE DOES DROP EALIAS
! EFAIL ENTER FAILURE FORWARDLIST HAVEN
! IDESCRIBE IDLE LALIAS LAST (*) LASTIP (*)
! LASTLOGOUT(*) LASTSITE (*) LEAVE LFAIL LISTEN
! MOVE ODEATH ODESCRIBE ODROP OEFAIL
! OENTER OFAILURE OLEAVE OLFAIL OMOVE
! OPAYMENT OSUCCESS OXENTER OXLEAVE OXMOVE
! PAYMENT QUEUE (*) RQUOTA (*) RUNOUT SEX
! STARTUP SUCCESS
(continued in help attributes2)
& ATTRIBUTES2
--- 163,177 ----
ADISCONNECT ADROP AEFAIL AENTER AFAILURE
AHEAR ALEAVE ALFAIL AMHEAR AMOVE
APAYMENT ASUCCESS AWAY CHARGES COST
! DEATH DESCRIBE DROP EALIAS EFAIL
! ENTER FAILURE FORWARDLIST HAVEN IDESCRIBE
! IDLE LALIAS LAST (*) LASTIP (*) LASTLOGOUT(*)
! LASTSITE (*) LEAVE LFAIL LISTEN MOVE
! ODEATH ODESCRIBE ODROP OEFAIL OENTER
! OFAILURE OLEAVE OLFAIL OMOVE OPAYMENT
! OSUCCESS OXENTER OXLEAVE OXMOVE PAYMENT
! QUEUE (*) RQUOTA (*) RUNOUT SEX STARTUP
! SUCCESS
(continued in help attributes2)
& ATTRIBUTES2
***************
*** 1637,1648 ****
thing-msgs Warn on missing succ/osucc/odrop/fail
thing-desc Warn on missing description
my-desc Warn on missing player description
(continued in help warnings list2)
& WARNINGS LIST2
These warnings combine the functionality of multiple warnings above:
! serious exit-unlinked, thing-desc, room-desc, my-desc
normal serious, exit-oneway, exit-multiple, exit-msgs
extra normal, thing-msgs
all all of the above
--- 1637,1650 ----
thing-msgs Warn on missing succ/osucc/odrop/fail
thing-desc Warn on missing description
my-desc Warn on missing player description
+ lock-checks Warn on @lock problems
(continued in help warnings list2)
& WARNINGS LIST2
These warnings combine the functionality of multiple warnings above:
! serious exit-unlinked, thing-desc, room-desc, my-desc,
! lock-checks
normal serious, exit-oneway, exit-multiple, exit-msgs
extra normal, thing-msgs
all all of the above
*** 1_7_5.134/game/txt/hlp/pennfunc.hlp Mon, 11 Mar 2002 18:22:55 -0600 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 600)
--- 1_7_5.158(w)/game/txt/hlp/pennfunc.hlp Mon, 22 Apr 2002 11:32:08 -0500 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.2 600)
***************
*** 96,105 ****
Dbref functions return a dbref or list of dbrefs related to some value
on an object.
! con() entrances() followers() home() lcon()
! lexits() loc() locate() lparent() lsearch()
! next() num() owner() parent() pmatch()
! rloc() rnum() room() where() zone()
See also: DBREF
& Information functions
--- 96,106 ----
Dbref functions return a dbref or list of dbrefs related to some value
on an object.
! con() entrances() followers() following() home()
! lcon() lexits() loc() locate() lparent()
! lsearch() next() num() owner() parent()
! pmatch() rloc() rnum() room() where()
! zone()
See also: DBREF
& Information functions
***************
*** 214,221 ****
null() objeval() oemit() open() pcreate()
pemit() r-function rand() remit() restarts()
s-function set() setq() setr() soundex()
! soundslike() tel() valid() version() wipe()
! zemit() @@()
& @@()
& NULL()
--- 215,222 ----
null() objeval() oemit() open() pcreate()
pemit() r-function rand() remit() restarts()
s-function set() setq() setr() soundex()
! soundslike() tel() textfile() valid() version()
! wipe() zemit() @@()
& @@()
& NULL()
***************
*** 259,279 ****
--------------------------------------------------------------
grave Backward slant ` A,E,I,O,U,a,e,i,o,u
above letter
! acute Forward slant ' A,E,I,O,U,a,e,i,o,u,y
above letter
tilde Wavy line above ~ A,N,O,a,n,o
letter
circumflex carat above ^ A,E,I,O,U,a,e,i,o,u
letter
! umlaut Two dots above : A,E,I,O,U,Y,a,e,i,o,u
diaeresis letter
ring Small circle above o A,a
letter
cedilla Small tail below , C,c
letter
! See HELP ACCENT3 for examples
& ACCENT3
Some examples of accent() and their expected outputs:
> think accent(Aule, ---:)
--- 260,298 ----
--------------------------------------------------------------
grave Backward slant ` A,E,I,O,U,a,e,i,o,u
above letter
! acute Forward slant ' A,E,I,O,U,Y,a,e,i,o,u,y
above letter
tilde Wavy line above ~ A,N,O,a,n,o
letter
circumflex carat above ^ A,E,I,O,U,a,e,i,o,u
letter
! umlaut Two dots above : A,E,I,O,U,,a,e,i,o,u,y
diaeresis letter
ring Small circle above o A,a
letter
cedilla Small tail below , C,c
letter
! See HELP ACCENT3 for more
& ACCENT3
+ These are non-accent special characters, mostly punctuation and
+ non-roman letters.
+
+ Template String
+ Description Character Character
+ --------------------------------------------------------------
+ Upside-down ? u ?
+ Upside-down ! u !
+ << quote mark " <
+ >> quote mark " >
+ German sharp s B s
+ Capital thorn | P
+ Lower-case thorn | p
+ Capital eth - D
+ Lower-case eth & o
+
+ See HELP ACCENT4 for examples
+ & ACCENT4
Some examples of accent() and their expected outputs:
> think accent(Aule, ---:)
***************
*** 854,859 ****
--- 873,881 ----
If <search> is a caret (^), <replace> is prepended.
If <search> is a dollar sign ($), <replace> is appended.
+ If <search> is an empty string, <replace> is inserted between
+ every character, and before the first and after the last.
+ If <replace> is an empty string, <search> is deleted from the string.
Example:
> say [edit(this is a test,^,I think%b,$,.,a test,an exam)]
***************
*** 1123,1128 ****
--- 1145,1155 ----
Returns the list of things and players following object. You must
control object.
+ & FOLLOWING()
+ following(<object>)
+
+ Returns the list of things and players that the object is following.
+ You must control object.
& FOREACH()
foreach([<object>/]<attribute>,<string>[,<start>[,<end>]])
***************
*** 1338,1344 ****
iname() returns the name of object <object>, as it would appear if
you were inside it. It is identical to name() except that if the
! object has a NAMEFORMAT attribute, it is used.
You must be see_all, control <object>, or be inside it to use this
function.
--- 1365,1371 ----
iname() returns the name of object <object>, as it would appear if
you were inside it. It is identical to name() except that if the
! object has a NAMEFORMAT or NAMEACCENT attribute, it is used.
You must be see_all, control <object>, or be inside it to use this
function.
***************
*** 3087,3092 ****
--- 3114,3136 ----
@tel <object>=<destination>.
See also: @tel
+ & TEXTFILE()
+ textfile(<type>,<entry>)
+
+ textfile() returns the text of entries from cached text files (such as
+ "help", "news", "events", etc.) All whitespace and newlines are included,
+ so you may want to edit %r's and squish the result if you plan to use
+ the text as a list of words rather than a display.
+
+ Examples:
+ > say textfile(help,tel\()
+ You say, " tel(<object>,<destination>)
+
+ This function will teleport <object> to <destination>, exactly as
+ @tel <object>=<destination>.
+
+ See also: @tel
+ "
& TIME()
& UTCTIME()
time([<zone>])
*** 1_7_5.134/game/txt/hlp/penncmd.hlp Sun, 17 Mar 2002 09:40:17 -0600 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.3.1.4.1.1.1.1.1.1.1.1.1.1.1.2 600)
--- 1_7_5.158(w)/game/txt/hlp/penncmd.hlp Mon, 22 Apr 2002 11:32:09 -0500 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.3.1.4.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3 600)
***************
*** 584,589 ****
--- 584,603 ----
for example. More complex things are, obviously, possible.
See also: @exitformat, @nameformat
+ & @nameaccent
+ @nameaccent <object> [=<accent template>]
+
+ When this attribute holds an accent template that has the same
+ length as the object's name, it is used to change the object's name
+ in some situations (How it shows up in speech, look, and a few other
+ commands). This allows for accented names without having to use the
+ accented characters directly in a name, which can make it harder for
+ people to type.
+
+ If a container has both a @nameaccent and a @nameformat, the
+ @nameformat is used.
+
+ See also: accent(), @nameformat
& @nameformat
@nameformat <object> [=<format>]
***************
*** 1783,1788 ****
--- 1797,1803 ----
but users can test it with elock()
See 'help locktypes2' for more
+ & lock types2
& locktypes2
More standard lock types:
***************
*** 2114,2121 ****
See also: give, @cost, @payment, @apayment, MONEY
& @open
@open <exit name>
! @open <exit name>;<exit alias>*=<destination>
! @open <exit name>;<exit alias>*=<destination>,<exit name>;<exit alias>*
This command opens an exit in the room you are standing in with the
specified name. You can then use the @link command to set the exit's
--- 2129,2136 ----
See also: give, @cost, @payment, @apayment, MONEY
& @open
@open <exit name>
! @open <exit name>;<exit aliases>=<destination>
! @open <exit name>;<exit aliases>=<destination>,<exit name>;<exit aliases>
This command opens an exit in the room you are standing in with the
specified name. You can then use the @link command to set the exit's
***************
*** 2124,2134 ****
exits from objects.) If you also include the second exit name, an exit
from the destination room will be opened back to the room you are in.
! * Note that you can have as many exit aliases as you like by adding more,
separated by semicolons. An exit alias allows you to type that instead of
the full exit name to go through the exit. Only the exit name appears in
the list of Obvious Exits in a room.
See also: EXITS, @link, @dig
& @osuccess
@osuccess <object> [=<message>]
--- 2139,2151 ----
exits from objects.) If you also include the second exit name, an exit
from the destination room will be opened back to the room you are in.
! NOTE: you can have as many exit aliases as you like by adding more,
separated by semicolons. An exit alias allows you to type that instead of
the full exit name to go through the exit. Only the exit name appears in
the list of Obvious Exits in a room.
+ Ex: @open Up;u;climb = #255, Down;dow;do;d;fall
+
See also: EXITS, @link, @dig
& @osuccess
@osuccess <object> [=<message>]
***************
*** 3256,3262 ****
through. This doesn't prevent you from going somewhere else on your
own.
! See also: unfollow, dismiss, desert, followers(), @follow, @ofollow, @afollow
& dismiss
dismiss <object>
dismiss
--- 3273,3280 ----
through. This doesn't prevent you from going somewhere else on your
own.
! See also: unfollow, dismiss, desert, followers(), following(),
! @follow, @ofollow, @afollow
& dismiss
dismiss <object>
dismiss
***************
*** 3351,3362 ****
kill <player> [=<cost>]
Attempts to kill the specified player. Killing costs <cost> pennies, which
! gives you a <cost>% chance of killing the player. Thus, spending 100
! pennies always works (except against wizards, who can never be killed).
! Players cannot be killed in rooms which have been set HAVEN. If you don't
! specify a cost, the default is 10 (i.e. 10%). The player, if killed,
! receives <cost>/2 pennies in insurance.
!
This command may be disabled in this MUSH.
See also: BEING KILLED, HAVEN, FLAGS, powers list
--- 3369,3382 ----
kill <player> [=<cost>]
Attempts to kill the specified player. Killing costs <cost> pennies, which
! gives you a <cost>% chance of killing the player. Thus, spending 100
! pennies always works (except against wizards, who can never be killed).
! If you don't specify a cost, the default is 10 (i.e. 10%). The player,
! if killed, receives <cost>/2 pennies in insurance.
!
! You can not kill a player in a room that they control unless you
! also control the room.
! Only wizards can kill players in rooms which have been set HAVEN.
This command may be disabled in this MUSH.
See also: BEING KILLED, HAVEN, FLAGS, powers list
*** 1_7_5.134/game/txt/hlp/pennchat.hlp Tue, 04 Sep 2001 09:08:48 -0500 dunemush (pennmush/19_pennchat.h 1.2.1.4.1.2 600)
--- 1_7_5.158(w)/game/txt/hlp/pennchat.hlp Tue, 02 Apr 2002 08:13:06 -0600 dunemush (pennmush/19_pennchat.h 1.2.1.4.1.3 600)
***************
*** 199,208 ****
>&isunfind #10=[hasflag(%#,unfindable)]
>@set #10 = VISUAL
! @clock Corresponding user: lock for object
join ChanJoinLock
speak ChanSpeakLock
see ChanSeeLock
hide ChanHideLock
mod ChanModLock
--- 199,215 ----
>&isunfind #10=[hasflag(%#,unfindable)]
>@set #10 = VISUAL
! @clock Corresponding default user: lock for object
join ChanJoinLock
speak ChanSpeakLock
see ChanSeeLock
hide ChanHideLock
mod ChanModLock
+ You can lock multiple channels to the same object by specfiying a
+ specific indirect lock instead of the default one:
+
+ >@clock/join onechannel=@#10/onechanneljoin
+ >@clock/join anotherchannel=@#10/anotherchanneljoin
+ >@lock/user:onechanneljoin #10 = 1
+ >@lock/user:anotherchanneljoin #10 = isunfind/1
*** 1_7_5.134/src/wiz.c Fri, 15 Feb 2002 16:15:40 -0600 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.1.1.5.1.1 660)
--- 1_7_5.158(w)/src/wiz.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.1.1.5.1.1.1.1 660)
***************
*** 787,794 ****
notify(player, T("None of your connections are idle."));
else
notify(player, T("That player isn't connected!"));
- } else if (d == cdesc) {
- notify(player, tprintf(T("Try %s instead."), QUIT_COMMAND));
} else {
do_log(LT_WIZ, player, victim, "*** BOOT ***");
if (flag == 2)
--- 787,792 ----
***************
*** 1775,1781 ****
break;
case 3:{
int n;
! n = remove_access_sitelock(player, site);
write_access_file();
notify_format(player, T("%d sitelocks removed."), n);
break;
--- 1773,1779 ----
break;
case 3:{
int n;
! n = remove_access_sitelock(site);
write_access_file();
notify_format(player, T("%d sitelocks removed."), n);
break;
*** 1_7_5.134/src/warnings.c Mon, 18 Jun 2001 10:36:58 -0500 dunemush (pennmush/b/25_warnings.c 1.18 660)
--- 1_7_5.158(w)/src/warnings.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/25_warnings.c 1.20 660)
***************
*** 5,15 ****
#include "config.h"
#include <stdio.h>
- #ifdef I_STRING
#include <string.h>
! #else
! #include <strings.h>
! #endif
#include "copyrite.h"
#include "conf.h"
--- 5,12 ----
#include "config.h"
#include <stdio.h>
#include <string.h>
! #include <stdarg.h>
#include "copyrite.h"
#include "conf.h"
***************
*** 21,27 ****
#include "externs.h"
#include "match.h"
#include "attrib.h"
! #include "warnings.h"
#include "confmagic.h"
#ifdef USE_WARNINGS
--- 18,24 ----
#include "externs.h"
#include "match.h"
#include "attrib.h"
! #include "boolexp.h"
#include "confmagic.h"
#ifdef USE_WARNINGS
***************
*** 42,54 ****
/* Space for more room stuff */
#define W_PLAYER_DESC 0x10000
/* Groups of warnings */
#define W_NONE 0
! #define W_SERIOUS (W_EXIT_UNLINKED|W_THING_DESC|W_ROOM_DESC|W_PLAYER_DESC)
#define W_NORMAL (W_SERIOUS|W_EXIT_ONEWAY|W_EXIT_MULTIPLE|W_EXIT_MSGS)
#define W_EXTRA (W_NORMAL|W_THING_MSGS)
#define W_ALL (W_EXTRA|W_EXIT_DESC)
typedef struct a_tcheck tcheck;
struct a_tcheck {
const char *name;
--- 39,55 ----
/* Space for more room stuff */
#define W_PLAYER_DESC 0x10000
+ #define W_LOCK_PROBS 0x100000
+
/* Groups of warnings */
#define W_NONE 0
! #define W_SERIOUS (W_EXIT_UNLINKED|W_THING_DESC|W_ROOM_DESC|W_PLAYER_DESC|W_LOCK_PROBS)
#define W_NORMAL (W_SERIOUS|W_EXIT_ONEWAY|W_EXIT_MULTIPLE|W_EXIT_MSGS)
#define W_EXTRA (W_NORMAL|W_THING_MSGS)
#define W_ALL (W_EXTRA|W_EXIT_DESC)
+ typedef long int warn_type;
+
typedef struct a_tcheck tcheck;
struct a_tcheck {
const char *name;
***************
*** 56,75 ****
};
! static int warning_lock_type _((const struct boolexp * l));
static void complain
! _((dbref player, dbref i, const char *name, const char *desc));
! static void ct_room _((dbref player, dbref i, warn_type flags));
! static void ct_exit _((dbref player, dbref i, warn_type flags));
! static void ct_player _((dbref player, dbref i, warn_type flags));
! static void ct_thing _((dbref player, dbref i, warn_type flags));
! void set_initial_warnings _((dbref player));
! void do_warnings _((dbref player, char *name, char *warns));
! const char *unparse_warnings _((dbref thing));
! static void check_topology_on _((dbref player, dbref i));
! void run_topology _((void));
! void do_wcheck_all _((dbref player));
! void do_wcheck _((dbref player, char *name));
static tcheck checklist[] = {
--- 57,73 ----
};
! static int warning_lock_type(const struct boolexp *l);
static void complain
! (dbref player, dbref i, const char *name, const char *desc, ...)
! __attribute__ ((__format__(__printf__, 4, 5)));
! static void check_lock(dbref player, dbref i, const char *name,
! struct boolexp *be);
! static void ct_generic(dbref player, dbref i, warn_type flags);
! static void ct_room(dbref player, dbref i, warn_type flags);
! static void ct_exit(dbref player, dbref i, warn_type flags);
! static void ct_player(dbref player, dbref i, warn_type flags);
! static void ct_thing(dbref player, dbref i, warn_type flags);
static tcheck checklist[] = {
***************
*** 83,88 ****
--- 81,87 ----
{"exit-msgs", W_EXIT_MSGS},
{"thing-msgs", W_THING_MSGS},
{"exit-desc", W_EXIT_DESC},
+ {"lock-checks", W_LOCK_PROBS},
/* These should stay at the end */
{"serious", W_SERIOUS},
***************
*** 97,104 ****
* a specific db#, it's locked. Anything else, and we don't know.
*/
static int
! warning_lock_type(l)
! const struct boolexp *l; /* 0== unlocked. 1== locked, 2== sometimes */
{
if (l == TRUE_BOOLEXP)
return W_UNLOCKED;
--- 96,103 ----
* a specific db#, it's locked. Anything else, and we don't know.
*/
static int
! warning_lock_type(const struct boolexp *l)
! /* 0== unlocked. 1== locked, 2== sometimes */
{
if (l == TRUE_BOOLEXP)
return W_UNLOCKED;
***************
*** 110,141 ****
}
static void
! complain(player, i, name, desc)
! dbref player;
! dbref i;
! const char *name;
! const char *desc;
{
notify_format(player, T("Warning '%s' for %s:"),
name, unparse_object(player, i));
! notify(player, desc);
}
static void
! ct_room(player, i, flags)
! dbref player;
! dbref i;
! warn_type flags;
{
if ((flags & W_ROOM_DESC) && !atr_get(i, "DESCRIBE"))
complain(player, i, "room-desc", T("room has no description"));
}
static void
! ct_exit(player, i, flags)
! dbref player;
! dbref i;
! warn_type flags;
{
dbref j, src, dst;
int count = 0;
--- 109,205 ----
}
static void
! complain(dbref player, dbref i, const char *name, const char *desc, ...)
{
+ #ifdef HAS_VSNPRINTF
+ char buff[BUFFER_LEN];
+ #else
+ char buff[BUFFER_LEN * 3]; /* safety margin */
+ #endif
+ va_list args;
+
+ va_start(args, desc);
+
+ #ifdef HAS_VSNPRINTF
+ vsnprintf(buff, sizeof buff, desc, args);
+ #else
+ vsprintf(buff, desc, args);
+ #endif
+
+ buff[BUFFER_LEN - 1] = '\0';
+ va_end(args);
+
notify_format(player, T("Warning '%s' for %s:"),
name, unparse_object(player, i));
! notify(player, buff);
}
static void
! check_lock(dbref player, dbref i, const char *name, struct boolexp *be)
! {
! switch (be->type) {
! case BOOLEXP_CONST:
! case BOOLEXP_CARRY:
! case BOOLEXP_IS:
! case BOOLEXP_OWNER:
! if (!GoodObject(be->thing) || IsGarbage(be->thing))
! complain(player, i, "lock-checks",
! T("%s lock refers to garbage object"), name);
! break;
! case BOOLEXP_NOT:
! check_lock(player, i, name, be->data.n);
! break;
! case BOOLEXP_OR:
! case BOOLEXP_AND:
! check_lock(player, i, name, be->data.sub.a);
! check_lock(player, i, name, be->data.sub.b);
! break;
! case BOOLEXP_EVAL:
! {
! ATTR *a;
! a = atr_get(i, be->data.atr_lock->name);
! if (!a || !Can_Read_Attr(i, i, a))
! complain(player, i, "lock-checks",
! T
! ("%s lock has eval-lock that uses a nonexistant attribute '%s'."),
! name, be->data.atr_lock->name);
! }
! break;
! case BOOLEXP_IND:
! if (!GoodObject(be->thing) || IsGarbage(be->thing))
! complain(player, i, "lock-checks",
! T("%s lock refers to garbage object"), name);
! else if (!(Can_Read_Lock(i, be->thing, be->data.ind_lock) &&
! getlock(be->thing, be->data.ind_lock) != TRUE_BOOLEXP))
! complain(player, i, "lock-checks",
! T("%s lock has indirect lock to %s/%s that it can't read"),
! name, unparse_object(player, be->thing), be->data.ind_lock);
! break;
! default:
! break;
! }
! }
!
! static void
! ct_generic(dbref player, dbref i, warn_type flags)
! {
! if ((flags & W_LOCK_PROBS)) {
! lock_list *ll;
! for (ll = Locks(i); ll; ll = L_NEXT(ll)) {
! check_lock(player, i, L_TYPE(ll), L_KEY(ll));
! }
! }
! }
!
! static void
! ct_room(dbref player, dbref i, warn_type flags)
{
if ((flags & W_ROOM_DESC) && !atr_get(i, "DESCRIBE"))
complain(player, i, "room-desc", T("room has no description"));
}
static void
! ct_exit(dbref player, dbref i, warn_type flags)
{
dbref j, src, dst;
int count = 0;
***************
*** 152,157 ****
--- 216,240 ----
complain(player, i, "exit-unlinked",
T("exit is unlinked; anyone can steal it"));
+ if ((flags & W_EXIT_UNLINKED) && dst == AMBIGUOUS) {
+ ATTR *a;
+ const char *var = "DESTINATION";
+ a = atr_get(i, "DESTINATION");
+ if (!a)
+ a = atr_get(i, "EXITTO");
+ if (a)
+ var = "EXITTO";
+ if (!a)
+ complain(player, i, "exit-unlinked",
+ T("Variable exit has no %s attribute"), var);
+ else {
+ const char *x = uncompress(AL_STR(a));
+ if (!x || !*x)
+ complain(player, i, "exit-unlinked",
+ T("Variable exit has empty %s attribute"), var);
+ }
+ }
+
if (!Dark(i)) {
if (flags & W_EXIT_MSGS) {
lt = warning_lock_type(getlock(i, Basic_Lock));
***************
*** 187,208 ****
}
if ((count == 0) && (flags & W_EXIT_ONEWAY))
complain(player, i, "exit-oneway", T("exit has no return exit"));
! else if ((count > 1) && (flags & W_EXIT_MULTIPLE)) {
! char buff[BUFFER_LEN];
! strncpy(buff, tprintf(T("exit has multiple (%d) return exits"), count),
! BUFFER_LEN);
! buff[BUFFER_LEN - 1] = '\0';
! complain(player, i, "exit-multiple", buff);
! }
}
static void
! ct_player(player, i, flags)
! dbref player;
! dbref i;
! warn_type flags;
{
if ((flags & W_PLAYER_DESC) && !atr_get(i, "DESCRIBE"))
complain(player, i, "my-desc", T("player is missing description"));
--- 270,284 ----
}
if ((count == 0) && (flags & W_EXIT_ONEWAY))
complain(player, i, "exit-oneway", T("exit has no return exit"));
! else if ((count > 1) && (flags & W_EXIT_MULTIPLE))
! complain(player, i, "exit-multiple",
! T("exit has multiple (%d) return exits"), count);
}
static void
! ct_player(dbref player, dbref i, warn_type flags)
{
if ((flags & W_PLAYER_DESC) && !atr_get(i, "DESCRIBE"))
complain(player, i, "my-desc", T("player is missing description"));
***************
*** 211,220 ****
static void
! ct_thing(player, i, flags)
! dbref player;
! dbref i;
! warn_type flags;
{
int lt;
--- 287,293 ----
static void
! ct_thing(dbref player, dbref i, warn_type flags)
{
int lt;
***************
*** 238,255 ****
}
void
! set_initial_warnings(player)
! dbref player;
{
Warnings(player) = W_NORMAL;
return;
}
void
! do_warnings(player, name, warns)
! dbref player;
! char *name;
! char *warns;
{
dbref thing;
int found = 0;
--- 311,324 ----
}
void
! set_initial_warnings(dbref player)
{
Warnings(player) = W_NORMAL;
return;
}
void
! do_warnings(dbref player, const char *name, const char *warns)
{
dbref thing;
int found = 0;
***************
*** 322,329 ****
/* Given an object, return a string of warnings on it */
const char *
! unparse_warnings(thing)
! dbref thing;
{
static char tbuf1[BUFFER_LEN];
int warns, listsize, indexx;
--- 391,397 ----
/* Given an object, return a string of warnings on it */
const char *
! unparse_warnings(dbref thing)
{
static char tbuf1[BUFFER_LEN];
int warns, listsize, indexx;
***************
*** 358,366 ****
}
static void
! check_topology_on(player, i)
! dbref player;
! dbref i;
{
warn_type flags;
--- 426,432 ----
}
static void
! check_topology_on(dbref player, dbref i)
{
warn_type flags;
***************
*** 380,385 ****
--- 446,453 ----
} else
flags = Warnings(player);
+ ct_generic(player, i, flags);
+
switch (Typeof(i)) {
case TYPE_ROOM:
ct_room(player, i, flags);
***************
*** 411,418 ****
}
void
! do_wcheck_all(player)
! dbref player;
{
if (!Wizard(player)) {
notify(player, T("You'd better check your wizbit first."));
--- 479,485 ----
}
void
! do_wcheck_all(dbref player)
{
if (!Wizard(player)) {
notify(player, T("You'd better check your wizbit first."));
***************
*** 425,432 ****
/* wcheck on a specific player, by that player */
void
! do_wcheck_me(player)
! dbref player;
{
int ndone;
if (!Connected(player))
--- 492,498 ----
/* wcheck on a specific player, by that player */
void
! do_wcheck_me(dbref player)
{
int ndone;
if (!Connected(player))
***************
*** 444,452 ****
* ownership or hasprivs before allowing it
*/
void
! do_wcheck(player, name)
! dbref player;
! char *name;
{
dbref thing;
--- 510,516 ----
* ownership or hasprivs before allowing it
*/
void
! do_wcheck(dbref player, const char *name)
{
dbref thing;
*** 1_7_5.134/src/utils.c Sat, 23 Feb 2002 14:41:18 -0600 dunemush (pennmush/b/27_utils.c 1.34 660)
--- 1_7_5.158(w)/src/utils.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/27_utils.c 1.37 660)
***************
*** 26,31 ****
--- 26,36 ----
#include <unistd.h>
#endif
#include "conf.h"
+ #ifdef WIN32
+ #include <wtypes.h>
+ #include <winbase.h> /* For GetCurrentProcessId() */
+ #undef OPAQUE /* Clashes with flags.h */
+ #endif
#ifdef MEM_CHECK
#include "memcheck.h"
***************
*** 197,246 ****
return newlist;
}
- /* takes a dbref and returns a pointer to the head of a dblist */
- struct dblist *
- listcreate(dbref ref)
- {
- struct dblist *ptr;
-
- ptr =
- (struct dblist *) mush_malloc((unsigned) sizeof(struct dblist), "dblist");
- if (!ptr)
- panic("Out of memory.");
- ptr->obj = ref;
- ptr->next = NULL;
- return (ptr);
- }
-
- /*
- * takes a pointer to a dblist and a dbref and adds the dbref to the
- * end of the list.
- */
- void
- listadd(struct dblist *head, dbref ref)
- {
- struct dblist *ptr = head;
-
-
- while (ptr->next)
- ptr = ptr->next;
-
- ptr->next = listcreate(ref);
- }
-
- /* takes a pointer to a dblist and recursively frees it */
- void
- listfree(struct dblist *head)
- {
- struct dblist *ptra = head, *ptrb;
-
- while (ptra->next) {
- ptrb = ptra->next;
- mush_free((Malloc_t) ptra, "dblist");
- ptra = ptrb;
- }
- }
-
void init_genrand(unsigned long);
void init_by_array(unsigned long *, int);
--- 202,207 ----
***************
*** 286,292 ****
--- 247,257 ----
#endif
/* Default seeder. Pick a seed that's fairly random */
+ #ifdef WIN32
+ init_genrand(GetCurrentProcessId() | (time(NULL) << 16));
+ #else
init_genrand(getpid() | (time(NULL) << 16));
+ #endif
}
*** 1_7_5.134/src/unparse.c Fri, 04 Jan 2002 15:23:43 -0600 dunemush (pennmush/b/28_unparse.c 1.16.1.4 660)
--- 1_7_5.158(w)/src/unparse.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/28_unparse.c 1.16.1.6 660)
***************
*** 29,35 ****
{
static PUEBLOBUFF;
const char *result;
! result = real_unparse(player, loc, 0, 0);
if (couldunparse) {
PUSE;
tag_wrap("A", tprintf("XCH_CMD=\"examine #%d\"", loc), result);
--- 29,35 ----
{
static PUEBLOBUFF;
const char *result;
! result = real_unparse(player, loc, 0, 0, 0);
if (couldunparse) {
PUSE;
tag_wrap("A", tprintf("XCH_CMD=\"examine #%d\"", loc), result);
***************
*** 47,53 ****
{
static PUEBLOBUFF;
const char *result;
! result = real_unparse(player, loc, 1, 0);
if (couldunparse) {
PUSE;
tag_wrap("A", tprintf("XCH_CMD=\"examine #%d\"", loc), result);
--- 47,53 ----
{
static PUEBLOBUFF;
const char *result;
! result = real_unparse(player, loc, 1, 0, 1);
if (couldunparse) {
PUSE;
tag_wrap("A", tprintf("XCH_CMD=\"examine #%d\"", loc), result);
***************
*** 70,76 ****
{
static PUEBLOBUFF;
const char *result;
! result = real_unparse(player, loc, 1, 1);
if (couldunparse) {
PUSE;
tag_wrap("A", tprintf("XCH_CMD=\"examine #%d\"", loc), result);
--- 70,76 ----
{
static PUEBLOBUFF;
const char *result;
! result = real_unparse(player, loc, 1, 1, 1);
if (couldunparse) {
PUSE;
tag_wrap("A", tprintf("XCH_CMD=\"examine #%d\"", loc), result);
***************
*** 81,92 ****
}
}
const char *
! real_unparse(player, loc, obey_myopic, use_nameformat)
! dbref player;
! dbref loc;
! int obey_myopic;
! int use_nameformat;
{
static char buf[BUFFER_LEN];
static char tbuf1[BUFFER_LEN];
--- 81,91 ----
}
}
+ const char *accented_name(dbref);
+
const char *
! real_unparse(dbref player, dbref loc, int obey_myopic, int use_nameformat,
! int use_nameaccent)
{
static char buf[BUFFER_LEN];
static char tbuf1[BUFFER_LEN];
***************
*** 110,116 ****
got_nameformat = 1;
} else {
/* Not using @nameformat or couldn't get one */
! strcpy(tbuf1, Name(loc));
}
if (IsExit(loc) && obey_myopic) {
if ((p = strchr(tbuf1, ';')))
--- 109,118 ----
got_nameformat = 1;
} else {
/* Not using @nameformat or couldn't get one */
! if (use_nameaccent)
! strcpy(tbuf1, accented_name(loc));
! else
! strcpy(tbuf1, Name(loc));
}
if (IsExit(loc) && obey_myopic) {
if ((p = strchr(tbuf1, ';')))
***************
*** 247,250 ****
--- 249,280 ----
*p = '\0';
}
return str;
+ }
+
+ const char *
+ accented_name(dbref thing)
+ {
+ ATTR *na;
+ static char fbuf[BUFFER_LEN];
+
+ na = atr_get(thing, "NAMEACCENT");
+ if (!na)
+ return Name(thing);
+ else {
+ char tbuf[BUFFER_LEN];
+ char *bp = fbuf;
+ size_t len;
+
+ strcpy(tbuf, uncompress(AL_STR(na)));
+
+ len = strlen(Name(thing));
+
+ if (len != strlen(tbuf))
+ return Name(thing);
+
+ safe_accent(Name(thing), tbuf, len, fbuf, &bp);
+ *bp = '\0';
+
+ return fbuf;
+ }
}
*** 1_7_5.134/src/timer.c Mon, 11 Mar 2002 09:34:10 -0600 dunemush (pennmush/b/29_timer.c 1.28 660)
--- 1_7_5.158(w)/src/timer.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/29_timer.c 1.29.1.2 660)
***************
*** 7,17 ****
#include <stdio.h>
#include <ctype.h>
#include <fcntl.h>
- #ifdef I_STRING
#include <string.h>
- #else
- #include <strings.h>
- #endif
#ifdef I_SYS_TIME
#include <sys/time.h>
#else
--- 7,13 ----
***************
*** 28,34 ****
--- 24,32 ----
#include "conf.h"
#include "match.h"
+ #include "flags.h"
#include "externs.h"
+ #include "flags.h"
#include "access.h"
#ifdef MEM_CHECK
#include "memcheck.h"
***************
*** 40,85 ****
int on_second = 0;
! static int hup_triggered = 0;
! static int usr1_triggered = 0;
extern char ccom[BUFFER_LEN];
extern dbref cplr;
! extern void inactivity_check _((void));
! extern void reopen_logs _((void));
#ifndef WIN32
! Signal_t hup_handler _((int));
! Signal_t usr1_handler _((int));
#endif
! void dispatch _((void));
#ifndef WIN32
! Signal_t
! hup_handler(x)
! int x __attribute__ ((__unused__));
{
hup_triggered = 1;
#ifndef SIGNALS_KEPT
signal(SIGHUP, (void *) hup_handler);
#endif
- #ifndef VOIDSIG
- return 0;
- #endif
}
! Signal_t
! usr1_handler(x)
! int x __attribute__ ((__unused__));
{
usr1_triggered = 1;
#ifndef SIGNALS_KEPT
signal(SIGUSR1, (void *) usr1_handler);
#endif
- #ifndef VOIDSIG
- return 0;
- #endif
}
#endif /* WIN32 */
--- 38,75 ----
int on_second = 0;
! static sig_atomic_t hup_triggered = 0;
! static sig_atomic_t usr1_triggered = 0;
extern char ccom[BUFFER_LEN];
extern dbref cplr;
! extern void inactivity_check(void);
! extern void reopen_logs(void);
#ifndef WIN32
! void hup_handler(int);
! void usr1_handler(int);
#endif
! void dispatch(void);
#ifndef WIN32
! void
! hup_handler(int x __attribute__ ((__unused__)))
{
hup_triggered = 1;
#ifndef SIGNALS_KEPT
signal(SIGHUP, (void *) hup_handler);
#endif
}
! void
! usr1_handler(int x __attribute__ ((__unused__)))
{
usr1_triggered = 1;
#ifndef SIGNALS_KEPT
signal(SIGUSR1, (void *) usr1_handler);
#endif
}
#endif /* WIN32 */
***************
*** 88,95 ****
init_timer()
{
#ifndef WIN32
! signal(SIGHUP, (void *) hup_handler);
! signal(SIGUSR1, (void *) usr1_handler);
#endif
}
--- 78,85 ----
init_timer()
{
#ifndef WIN32
! signal(SIGHUP, hup_handler);
! signal(SIGUSR1, usr1_handler);
#endif
}
***************
*** 151,156 ****
--- 141,151 ----
options.dump_counter = options.dump_interval + mudtime;
strcpy(ccom, "dump");
fork_and_dump(1);
+ #ifdef VACATION_FLAG
+ flag_broadcast(0, PLAYER_VACATION, "%s",
+ T
+ ("Your ON-VACATION flag is set! If you're back, clear it."));
+ #endif
} else if (NO_FORK &&
(options.dump_counter - 60 == mudtime) &&
*options.dump_warning_1min) {
*** 1_7_5.134/src/help.c Mon, 11 Mar 2002 18:26:13 -0600 dunemush (pennmush/f/32_help.c 1.4.1.2.1.1.1.3.2.2.1.1.2.1.1.2.1.2.1.2.1.2 660)
--- 1_7_5.158(w)/src/help.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/f/32_help.c 1.4.1.2.1.1.1.3.2.2.1.1.2.1.1.2.1.2.1.2.1.3 660)
***************
*** 15,20 ****
--- 15,21 ----
#include "help.h"
#include "log.h"
#include "ansi.h"
+ #include "parse.h"
#include "pueblo.h"
#include "flags.h"
#include "dbdefs.h"
***************
*** 415,418 ****
--- 416,531 ----
fclose(rfp);
do_rawlog(LT_WIZ, T("%d topics indexed."), num_topics);
return;
+ }
+
+ /* ARGSUSED */
+ FUNCTION(fun_textfile)
+ {
+ help_file *h;
+
+ h = hashfind(strupper(args[0]), &help_files);
+ if (!h) {
+ safe_str(T("#-1 NO SUCH FILE"), buff, bp);
+ return;
+ }
+ if (h->admin && !Hasprivs(executor)) {
+ safe_str(T(e_perm), buff, bp);
+ return;
+ }
+ safe_str(string_spitfile(h, args[1]), buff, bp);
+ }
+
+
+ static char *
+ string_spitfile(help_file *help_dat, char *arg1)
+ {
+ help_indx *entry = NULL;
+ FILE *fp;
+ char *p, line[LINE_SIZE + 1];
+ char the_topic[LINE_SIZE + 2];
+ Size_t n;
+ static char buff[BUFFER_LEN];
+ char *bp;
+
+ if (*arg1 == '\0')
+ arg1 = (char *) "help";
+ else if (*arg1 == '&')
+ return T("#-1 INVALID ENTRY");
+ if (strlen(arg1) > LINE_SIZE)
+ *(arg1 + LINE_SIZE) = '\0';
+
+ if (help_dat->admin)
+ sprintf(the_topic, "&%s", arg1);
+ else
+ strcpy(the_topic, arg1);
+
+ if (!help_dat->indx || help_dat->entries == 0)
+ return T("#-1 NO INDEX FOR FILE");
+
+ if (help_dat->entries < 10) { /* Just do a linear search for small files */
+ for (n = 0; n < help_dat->entries; n++) {
+ if (string_prefix(help_dat->indx[n].topic, the_topic)) {
+ entry = &help_dat->indx[n];
+ break;
+ }
+ }
+ } else { /* Binary search of the index */
+ int left = 0;
+ int cmp;
+ int right = help_dat->entries - 1;
+
+ while (1) {
+ n = (left + right) / 2;
+
+ if (left > right)
+ break;
+
+ cmp = strcasecmp(the_topic, help_dat->indx[n].topic);
+
+ if (cmp == 0) {
+ entry = &help_dat->indx[n];
+ break;
+ } else if (cmp < 0) {
+ /* We need to catch the first prefix */
+ if (string_prefix(help_dat->indx[n].topic, the_topic)) {
+ int m;
+ for (m = n - 1; m >= 0; m--) {
+ if (!string_prefix(help_dat->indx[m].topic, the_topic))
+ break;
+ }
+ entry = &help_dat->indx[m + 1];
+ break;
+ }
+ if (left == right)
+ break;
+ right = n - 1;
+ } else { /* cmp > 0 */
+ if (left == right)
+ break;
+ left = n + 1;
+ }
+ }
+ }
+
+ if (!entry) {
+ return T("#-1 NO ENTRY");
+ }
+
+ if ((fp = fopen(help_dat->file, "rb")) == NULL) {
+ return T("#-1 UNAVAILABLE");
+ }
+ if (fseek(fp, entry->pos, 0) < 0L) {
+ return T("#-1 UNAVAILABLE");
+ }
+ bp = buff;
+ for (n = 0; n < BUFFER_LEN; n++) {
+ if (fgets(line, LINE_SIZE, fp) == NULL)
+ break;
+ if (line[0] == '&')
+ break;
+ safe_str(line, buff, &bp);
+ }
+ *bp = '\0';
+ fclose(fp);
+ return buff;
}
*** 1_7_5.134/src/switchinc.c Mon, 25 Mar 2002 11:01:50 -0600 dunemush (pennmush/b/32_switchinc. 1.3.1.2.1.6.1.18.1.2.1.2.2.5.1.4.2.4.1.1.1.2.1.5.1.2.1.8 660)
--- 1_7_5.158(w)/src/switchinc.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/32_switchinc. 1.3.1.2.1.6.1.18.1.2.1.2.2.5.1.4.2.4.1.1.1.2.1.5.1.2.1.5.2.2 660)
***************
*** 1,520 ****
{
! "ACCESS", SWITCH_ACCESS
! }
! ,
! {
! "ADD", SWITCH_ADD
! }
! ,
! {
! "ALL", SWITCH_ALL
! }
! ,
! {
! "ANY", SWITCH_ANY
! }
! ,
! {
! "ATTRIBS", SWITCH_ATTRIBS
! }
! ,
! {
! "BAN", SWITCH_BAN
! }
! ,
! {
! "BLIND", SWITCH_BLIND
! }
! ,
! {
! "BRIEF", SWITCH_BRIEF
! }
! ,
! {
! "CHECK", SWITCH_CHECK
! }
! ,
! {
! "CHOWN", SWITCH_CHOWN
! }
! ,
! {
! "CLEAR", SWITCH_CLEAR
! }
! ,
! {
! "CMD", SWITCH_CMD
! }
! ,
! {
! "COMMANDS", SWITCH_COMMANDS
! }
! ,
! {
! "CONN", SWITCH_CONN
! }
! ,
! {
! "CONNECT", SWITCH_CONNECT
! }
! ,
! {
! "CONNECTED", SWITCH_CONNECTED
! }
! ,
! {
! "CONTENTS", SWITCH_CONTENTS
! }
! ,
! {
! "COSTS", SWITCH_COSTS
! }
! ,
! {
! "COUNT", SWITCH_COUNT
! }
! ,
! {
! "CREATE", SWITCH_CREATE
! }
! ,
! {
! "DATABASE", SWITCH_DATABASE
! }
! ,
! {
! "DB", SWITCH_DB
! }
! ,
! {
! "DEBUG", SWITCH_DEBUG
! }
! ,
! {
! "DECOMPILE", SWITCH_DECOMPILE
! }
! ,
! {
! "DEFAULTS", SWITCH_DEFAULTS
! }
! ,
! {
! "DELETE", SWITCH_DELETE
! }
! ,
! {
! "DELIMIT", SWITCH_DELIMIT
! }
! ,
! {
! "DESCRIBE", SWITCH_DESCRIBE
! }
! ,
! {
! "DESTROY", SWITCH_DESTROY
! }
! ,
! {
! "DISABLE", SWITCH_DISABLE
! }
! ,
! {
! "DOWN", SWITCH_DOWN
! }
! ,
! {
! "DSTATS", SWITCH_DSTATS
! }
! ,
! {
! "EMIT", SWITCH_EMIT
! }
! ,
! {
! "ENABLE", SWITCH_ENABLE
! }
! ,
! {
! "ERR", SWITCH_ERR
! }
! ,
! {
! "EXITS", SWITCH_EXITS
! }
! ,
! {
! "FILE", SWITCH_FILE
! }
! ,
! {
! "FIRST", SWITCH_FIRST
! }
! ,
! {
! "FLAGS", SWITCH_FLAGS
! }
! ,
! {
! "FOLDERS", SWITCH_FOLDERS
! }
! ,
! {
! "FORWARD", SWITCH_FORWARD
! }
! ,
! {
! "FSTATS", SWITCH_FSTATS
! }
! ,
! {
! "FULL", SWITCH_FULL
! }
! ,
! {
! "FUNCTIONS", SWITCH_FUNCTIONS
! }
! ,
! {
! "FWD", SWITCH_FWD
! }
! ,
! {
! "GAG", SWITCH_GAG
! }
! ,
! {
! "GLOBALS", SWITCH_GLOBALS
! }
! ,
! {
! "HEADER", SWITCH_HEADER
! }
! ,
! {
! "HERE", SWITCH_HERE
! }
! ,
! {
! "HIDE", SWITCH_HIDE
! }
! ,
! {
! "ILIST", SWITCH_ILIST
! }
! ,
! {
! "INVENTORY", SWITCH_INVENTORY
! }
! ,
! {
! "IPRINT", SWITCH_IPRINT
! }
! ,
! {
! "JOIN", SWITCH_JOIN
! }
! ,
! {
! "LIST", SWITCH_LIST
! }
! ,
! {
! "LOWERCASE", SWITCH_LOWERCASE
! }
! ,
! {
! "ME", SWITCH_ME
! }
! ,
! {
! "MEMBERS", SWITCH_MEMBERS
! }
! ,
! {
! "MOD", SWITCH_MOD
! }
! ,
! {
! "MORTAL", SWITCH_MORTAL
! }
! ,
! {
! "MOTD", SWITCH_MOTD
! }
! ,
! {
! "MUTE", SWITCH_MUTE
! }
! ,
! {
! "NAME", SWITCH_NAME
! }
! ,
! {
! "NO", SWITCH_NO
! }
! ,
! {
! "NOEVAL", SWITCH_NOEVAL
! }
! ,
! {
! "NOFLAGCOPY", SWITCH_NOFLAGCOPY
! }
! ,
! {
! "NOISY", SWITCH_NOISY
! }
! ,
! {
! "NOSIG", SWITCH_NOSIG
! }
! ,
! {
! "NOSPACE", SWITCH_NOSPACE
! }
! ,
! {
! "NOTIFY", SWITCH_NOTIFY
! }
! ,
! {
! "NUKE", SWITCH_NUKE
! }
! ,
! {
! "OFF", SWITCH_OFF
! }
! ,
! {
! "ON", SWITCH_ON
! }
! ,
! {
! "OUTSIDE", SWITCH_OUTSIDE
! }
! ,
! {
! "OVERRIDE", SWITCH_OVERRIDE
! }
! ,
! {
! "PANIC", SWITCH_PANIC
! }
! ,
! {
! "PARANOID", SWITCH_PARANOID
! }
! ,
! {
! "PLAYERS", SWITCH_PLAYERS
! }
! ,
! {
! "PORT", SWITCH_PORT
! }
! ,
! {
! "POSE", SWITCH_POSE
! }
! ,
! {
! "PRESERVE", SWITCH_PRESERVE
! }
! ,
! {
! "PRINT", SWITCH_PRINT
! }
! ,
! {
! "PRIVS", SWITCH_PRIVS
! }
! ,
! {
! "PURGE", SWITCH_PURGE
! }
! ,
! {
! "QUICK", SWITCH_QUICK
! }
! ,
! {
! "QUIET", SWITCH_QUIET
! }
! ,
! {
! "READ", SWITCH_READ
! }
! ,
! {
! "REBOOT", SWITCH_REBOOT
! }
! ,
! {
! "REGISTER", SWITCH_REGISTER
! }
! ,
! {
! "REMOVE", SWITCH_REMOVE
! }
! ,
! {
! "RENAME", SWITCH_RENAME
! }
! ,
! {
! "RESTORE", SWITCH_RESTORE
! }
! ,
! {
! "RESTRICT", SWITCH_RESTRICT
! }
! ,
! {
! "RETROACTIVE", SWITCH_RETROACTIVE
! }
! ,
! {
! "ROOM", SWITCH_ROOM
! }
! ,
! {
! "ROOMS", SWITCH_ROOMS
! }
! ,
! {
! "ROYALTY", SWITCH_ROYALTY
! }
! ,
! {
! "SEE", SWITCH_SEE
! }
! ,
! {
! "SEEFLAG", SWITCH_SEEFLAG
! }
! ,
! {
! "SELF", SWITCH_SELF
! }
! ,
! {
! "SEND", SWITCH_SEND
! }
! ,
! {
! "SET", SWITCH_SET
! }
! ,
! {
! "SILENT", SWITCH_SILENT
! }
! ,
! {
! "SKIPDEFAULTS", SWITCH_SKIPDEFAULTS
! }
! ,
! {
! "SPEAK", SWITCH_SPEAK
! }
! ,
! {
! "STATS", SWITCH_STATS
! }
! ,
! {
! "SUMMARY", SWITCH_SUMMARY
! }
! ,
! {
! "TABLES", SWITCH_TABLES
! }
! ,
! {
! "TAG", SWITCH_TAG
! }
! ,
! {
! "TELEPORT", SWITCH_TELEPORT
! }
! ,
! {
! "TF", SWITCH_TF
! }
! ,
! {
! "THINGS", SWITCH_THINGS
! }
! ,
! {
! "TITLE", SWITCH_TITLE
! }
! ,
! {
! "TRACE", SWITCH_TRACE
! }
! ,
! {
! "UNCLEAR", SWITCH_UNCLEAR
! }
! ,
! {
! "UNFOLDER", SWITCH_UNFOLDER
! }
! ,
! {
! "UNGAG", SWITCH_UNGAG
! }
! ,
! {
! "UNHIDE", SWITCH_UNHIDE
! }
! ,
! {
! "UNMUTE", SWITCH_UNMUTE
! }
! ,
! {
! "UNTAG", SWITCH_UNTAG
! }
! ,
! {
! "UNTIL", SWITCH_UNTIL
! }
! ,
! {
! "URGENT", SWITCH_URGENT
! }
! ,
! {
! "USEFLAG", SWITCH_USEFLAG
! }
! ,
! {
! "WHAT", SWITCH_WHAT
! }
! ,
! {
! "WHO", SWITCH_WHO
! }
! ,
! {
! "WIPE", SWITCH_WIPE
! }
! ,
! {
! "WIZ", SWITCH_WIZ
! }
! ,
! {
! "WIZARD", SWITCH_WIZARD
! }
! ,
! {
! "YES", SWITCH_YES
! }
! ,
! {
! "ZONE", SWITCH_ZONE
! }
,
--- 1,391 ----
{
! "ACCESS", SWITCH_ACCESS}
!
! , {
! "ADD", SWITCH_ADD}
!
! , {
! "ALL", SWITCH_ALL}
!
! , {
! "ANY", SWITCH_ANY}
!
! , {
! "ATTRIBS", SWITCH_ATTRIBS}
!
! , {
! "BAN", SWITCH_BAN}
!
! , {
! "BLIND", SWITCH_BLIND}
!
! , {
! "BRIEF", SWITCH_BRIEF}
!
! , {
! "CHECK", SWITCH_CHECK}
!
! , {
! "CHOWN", SWITCH_CHOWN}
!
! , {
! "CLEAR", SWITCH_CLEAR}
!
! , {
! "CMD", SWITCH_CMD}
!
! , {
! "COMMANDS", SWITCH_COMMANDS}
!
! , {
! "CONN", SWITCH_CONN}
!
! , {
! "CONNECT", SWITCH_CONNECT}
!
! , {
! "CONNECTED", SWITCH_CONNECTED}
!
! , {
! "CONTENTS", SWITCH_CONTENTS}
!
! , {
! "COSTS", SWITCH_COSTS}
!
! , {
! "COUNT", SWITCH_COUNT}
!
! , {
! "CREATE", SWITCH_CREATE}
!
! , {
! "DATABASE", SWITCH_DATABASE}
!
! , {
! "DB", SWITCH_DB}
!
! , {
! "DEBUG", SWITCH_DEBUG}
!
! , {
! "DECOMPILE", SWITCH_DECOMPILE}
!
! , {
! "DEFAULTS", SWITCH_DEFAULTS}
!
! , {
! "DELETE", SWITCH_DELETE}
!
! , {
! "DELIMIT", SWITCH_DELIMIT}
!
! , {
! "DESCRIBE", SWITCH_DESCRIBE}
!
! , {
! "DESTROY", SWITCH_DESTROY}
!
! , {
! "DISABLE", SWITCH_DISABLE}
!
! , {
! "DOWN", SWITCH_DOWN}
!
! , {
! "DSTATS", SWITCH_DSTATS}
!
! , {
! "EMIT", SWITCH_EMIT}
!
! , {
! "ENABLE", SWITCH_ENABLE}
!
! , {
! "ERR", SWITCH_ERR}
!
! , {
! "EXITS", SWITCH_EXITS}
!
! , {
! "FILE", SWITCH_FILE}
!
! , {
! "FIRST", SWITCH_FIRST}
!
! , {
! "FLAGS", SWITCH_FLAGS}
!
! , {
! "FOLDERS", SWITCH_FOLDERS}
!
! , {
! "FORWARD", SWITCH_FORWARD}
!
! , {
! "FSTATS", SWITCH_FSTATS}
!
! , {
! "FULL", SWITCH_FULL}
!
! , {
! "FUNCTIONS", SWITCH_FUNCTIONS}
!
! , {
! "FWD", SWITCH_FWD}
!
! , {
! "GAG", SWITCH_GAG}
!
! , {
! "GLOBALS", SWITCH_GLOBALS}
!
! , {
! "HEADER", SWITCH_HEADER}
!
! , {
! "HERE", SWITCH_HERE}
!
! , {
! "HIDE", SWITCH_HIDE}
!
! , {
! "ILIST", SWITCH_ILIST}
!
! , {
! "INVENTORY", SWITCH_INVENTORY}
!
! , {
! "IPRINT", SWITCH_IPRINT}
!
! , {
! "JOIN", SWITCH_JOIN}
!
! , {
! "LIST", SWITCH_LIST}
!
! , {
! "LOWERCASE", SWITCH_LOWERCASE}
!
! , {
! "ME", SWITCH_ME}
!
! , {
! "MEMBERS", SWITCH_MEMBERS}
!
! , {
! "MOD", SWITCH_MOD}
!
! , {
! "MORTAL", SWITCH_MORTAL}
!
! , {
! "MOTD", SWITCH_MOTD}
!
! , {
! "MUTE", SWITCH_MUTE}
!
! , {
! "NAME", SWITCH_NAME}
!
! , {
! "NO", SWITCH_NO}
!
! , {
! "NOEVAL", SWITCH_NOEVAL}
!
! , {
! "NOFLAGCOPY", SWITCH_NOFLAGCOPY}
!
! , {
! "NOISY", SWITCH_NOISY}
!
! , {
! "NOSIG", SWITCH_NOSIG}
!
! , {
! "NOSPACE", SWITCH_NOSPACE}
!
! , {
! "NOTIFY", SWITCH_NOTIFY}
!
! , {
! "NUKE", SWITCH_NUKE}
!
! , {
! "OFF", SWITCH_OFF}
!
! , {
! "ON", SWITCH_ON}
!
! , {
! "OUTSIDE", SWITCH_OUTSIDE}
!
! , {
! "OVERRIDE", SWITCH_OVERRIDE}
!
! , {
! "PANIC", SWITCH_PANIC}
!
! , {
! "PARANOID", SWITCH_PARANOID}
!
! , {
! "PLAYERS", SWITCH_PLAYERS}
!
! , {
! "PORT", SWITCH_PORT}
!
! , {
! "POSE", SWITCH_POSE}
!
! , {
! "PRESERVE", SWITCH_PRESERVE}
!
! , {
! "PRINT", SWITCH_PRINT}
!
! , {
! "PRIVS", SWITCH_PRIVS}
!
! , {
! "PURGE", SWITCH_PURGE}
!
! , {
! "QUICK", SWITCH_QUICK}
!
! , {
! "QUIET", SWITCH_QUIET}
!
! , {
! "READ", SWITCH_READ}
!
! , {
! "REBOOT", SWITCH_REBOOT}
!
! , {
! "REGISTER", SWITCH_REGISTER}
!
! , {
! "REMOVE", SWITCH_REMOVE}
!
! , {
! "RENAME", SWITCH_RENAME}
!
! , {
! "RESTORE", SWITCH_RESTORE}
!
! , {
! "RESTRICT", SWITCH_RESTRICT}
!
! , {
! "RETROACTIVE", SWITCH_RETROACTIVE}
!
! , {
! "ROOM", SWITCH_ROOM}
!
! , {
! "ROOMS", SWITCH_ROOMS}
!
! , {
! "ROYALTY", SWITCH_ROYALTY}
!
! , {
! "SEE", SWITCH_SEE}
!
! , {
! "SEEFLAG", SWITCH_SEEFLAG}
!
! , {
! "SELF", SWITCH_SELF}
!
! , {
! "SEND", SWITCH_SEND}
!
! , {
! "SET", SWITCH_SET}
!
! , {
! "SILENT", SWITCH_SILENT}
!
! , {
! "SKIPDEFAULTS", SWITCH_SKIPDEFAULTS}
!
! , {
! "SPEAK", SWITCH_SPEAK}
!
! , {
! "STATS", SWITCH_STATS}
!
! , {
! "SUMMARY", SWITCH_SUMMARY}
!
! , {
! "TABLES", SWITCH_TABLES}
!
! , {
! "TAG", SWITCH_TAG}
!
! , {
! "TELEPORT", SWITCH_TELEPORT}
!
! , {
! "TF", SWITCH_TF}
!
! , {
! "THINGS", SWITCH_THINGS}
!
! , {
! "TITLE", SWITCH_TITLE}
!
! , {
! "TRACE", SWITCH_TRACE}
!
! , {
! "UNCLEAR", SWITCH_UNCLEAR}
!
! , {
! "UNFOLDER", SWITCH_UNFOLDER}
!
! , {
! "UNGAG", SWITCH_UNGAG}
!
! , {
! "UNHIDE", SWITCH_UNHIDE}
!
! , {
! "UNMUTE", SWITCH_UNMUTE}
!
! , {
! "UNTAG", SWITCH_UNTAG}
!
! , {
! "UNTIL", SWITCH_UNTIL}
!
! , {
! "URGENT", SWITCH_URGENT}
!
! , {
! "USEFLAG", SWITCH_USEFLAG}
!
! , {
! "WHAT", SWITCH_WHAT}
!
! , {
! "WHO", SWITCH_WHO}
!
! , {
! "WIPE", SWITCH_WIPE}
!
! , {
! "WIZ", SWITCH_WIZ}
!
! , {
! "WIZARD", SWITCH_WIZARD}
!
! , {
! "YES", SWITCH_YES}
!
! , {
! "ZONE", SWITCH_ZONE}
!
,
*** 1_7_5.134/src/strutil.c Mon, 25 Feb 2002 15:04:41 -0600 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.7.2.1.1.2.1.2 660)
--- 1_7_5.158(w)/src/strutil.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.7.2.1.1.2.1.1.1.1.1.2 660)
***************
*** 27,294 ****
char *next_token(char *str, char sep);
static int format_long(long val, char *buff, char **bp, int maxlen);
-
- /* GENERATED TABLE. EDIT AT YOUR OWN RISK. */
- accent_info accent_table[UCHAR_MAX + 1] = {
- {0, NULL},
- {1, NULL},
- {2, NULL},
- {3, NULL},
- {4, NULL},
- {5, NULL},
- {6, NULL},
- {7, NULL},
- {8, NULL},
- {9, NULL},
- {10, "<br>\n"},
- {11, NULL},
- {12, NULL},
- {13, NULL},
- {14, NULL},
- {15, NULL},
- {16, NULL},
- {17, NULL},
- {18, NULL},
- {19, NULL},
- {20, NULL},
- {21, NULL},
- {22, NULL},
- {23, NULL},
- {24, NULL},
- {25, NULL},
- {26, NULL},
- {27, NULL},
- {28, NULL},
- {29, NULL},
- {30, NULL},
- {31, NULL},
- {32, NULL},
- {33, NULL},
- {34, """},
- {35, NULL},
- {36, NULL},
- {37, NULL},
- {38, "&"},
- {39, NULL},
- {40, NULL},
- {41, NULL},
- {42, NULL},
- {43, NULL},
- {44, NULL},
- {45, NULL},
- {46, NULL},
- {47, NULL},
- {48, NULL},
- {49, NULL},
- {50, NULL},
- {51, NULL},
- {52, NULL},
- {53, NULL},
- {54, NULL},
- {55, NULL},
- {56, NULL},
- {57, NULL},
- {58, NULL},
- {59, NULL},
- {60, "<"},
- {61, NULL},
- {62, ">"},
- {63, NULL},
- {64, NULL},
- {65, NULL},
- {66, NULL},
- {67, NULL},
- {68, NULL},
- {69, NULL},
- {70, NULL},
- {71, NULL},
- {72, NULL},
- {73, NULL},
- {74, NULL},
- {75, NULL},
- {76, NULL},
- {77, NULL},
- {78, NULL},
- {79, NULL},
- {80, NULL},
- {81, NULL},
- {82, NULL},
- {83, NULL},
- {84, NULL},
- {85, NULL},
- {86, NULL},
- {87, NULL},
- {88, NULL},
- {89, NULL},
- {90, NULL},
- {91, NULL},
- {92, NULL},
- {93, NULL},
- {94, NULL},
- {95, NULL},
- {96, NULL},
- {97, NULL},
- {98, NULL},
- {99, NULL},
- {100, NULL},
- {101, NULL},
- {102, NULL},
- {103, NULL},
- {104, NULL},
- {105, NULL},
- {106, NULL},
- {107, NULL},
- {108, NULL},
- {109, NULL},
- {110, NULL},
- {111, NULL},
- {112, NULL},
- {113, NULL},
- {114, NULL},
- {115, NULL},
- {116, NULL},
- {117, NULL},
- {118, NULL},
- {119, NULL},
- {120, NULL},
- {121, NULL},
- {122, NULL},
- {123, NULL},
- {124, NULL},
- {125, NULL},
- {126, NULL},
- {127, NULL},
- {128, NULL},
- {129, NULL},
- {130, NULL},
- {131, NULL},
- {132, NULL},
- {133, NULL},
- {134, NULL},
- {135, NULL},
- {136, NULL},
- {137, NULL},
- {138, NULL},
- {139, NULL},
- {140, NULL},
- {141, NULL},
- {142, NULL},
- {143, NULL},
- {144, NULL},
- {145, NULL},
- {146, NULL},
- {147, NULL},
- {148, NULL},
- {149, NULL},
- {150, NULL},
- {151, NULL},
- {152, NULL},
- {153, NULL},
- {154, NULL},
- {155, NULL},
- {156, NULL},
- {157, NULL},
- {158, NULL},
- {159, NULL},
- {160, NULL},
- {161, NULL},
- {162, NULL},
- {163, NULL},
- {164, NULL},
- {165, NULL},
- {166, NULL},
- {167, NULL},
- {168, NULL},
- {169, NULL},
- {170, NULL},
- {171, NULL},
- {172, NULL},
- {173, NULL},
- {174, NULL},
- {175, NULL},
- {176, NULL},
- {177, NULL},
- {178, NULL},
- {179, NULL},
- {180, NULL},
- {181, NULL},
- {182, NULL},
- {183, NULL},
- {184, NULL},
- {185, NULL},
- {186, NULL},
- {187, NULL},
- {188, NULL},
- {189, NULL},
- {190, NULL},
- {191, NULL},
- {65, "À"},
- {65, "Á"},
- {65, "Â"},
- {65, "Ã"},
- {65, "Ä"},
- {65, "Å"},
- {198, NULL},
- {67, "Ç"},
- {69, "È"},
- {69, "É"},
- {69, "Ê"},
- {69, "Ë"},
- {73, "Ì"},
- {73, "Í"},
- {73, "Î"},
- {73, "Ï"},
- {208, NULL},
- {78, "Ñ"},
- {79, "Ò"},
- {79, "Ó"},
- {79, "Ô"},
- {79, "Õ"},
- {79, "Ö"},
- {215, NULL},
- {216, NULL},
- {85, "Ù"},
- {85, "Ú"},
- {85, "Û"},
- {85, "Ü"},
- {89, "Ý"},
- {222, NULL},
- {223, NULL},
- {97, "à"},
- {97, "á"},
- {97, "â"},
- {97, "ã"},
- {97, "ä"},
- {97, "å"},
- {230, NULL},
- {99, "ç"},
- {101, "è"},
- {101, "é"},
- {101, "ê"},
- {101, "ë"},
- {105, "ì"},
- {105, "í"},
- {105, "î"},
- {105, "ï"},
- {240, NULL},
- {110, "ñ"},
- {111, "ò"},
- {111, "ó"},
- {111, "ô"},
- {111, "õ"},
- {111, "ö"},
- {247, NULL},
- {248, NULL},
- {117, "ù"},
- {117, "ú"},
- {117, "û"},
- {117, "ü"},
- {121, "ý"},
- {254, NULL},
- {121, "ÿ"}
- };
-
-
/* Duplicate the first len characters of s */
char *
mush_strndup(const char *src, size_t len, const char *check)
--- 27,32 ----
***************
*** 438,443 ****
--- 176,492 ----
for (p = s; p && *p; p++)
*p = UPCASE(*p);
return s;
+ }
+
+ int
+ safe_accent(const char *base, const char *template, size_t len, char *buff,
+ char **bp)
+ {
+ /* base and template must be the same length */
+ size_t n;
+ unsigned char c;
+
+ for (n = 0; n < len; n++) {
+ switch (base[n]) {
+ case 'A':
+ switch (template[n]) {
+ case '`':
+ c = 192;
+ break;
+ case '\'':
+ c = 193;
+ break;
+ case '^':
+ c = 194;
+ break;
+ case '~':
+ c = 195;
+ break;
+ case ':':
+ c = 196;
+ break;
+ case 'o':
+ c = 197;
+ break;
+ default:
+ c = 'A';
+ }
+ break;
+ case 'a':
+ switch (template[n]) {
+ case '`':
+ c = 224;
+ break;
+ case '\'':
+ c = 225;
+ break;
+ case '^':
+ c = 226;
+ break;
+ case '~':
+ c = 227;
+ break;
+ case ':':
+ c = 228;
+ break;
+ case 'o':
+ c = 229;
+ break;
+ default:
+ c = 'a';
+ }
+ break;
+ case 'C':
+ if (template[n] == ',')
+ c = 199;
+ else
+ c = 'C';
+ break;
+ case 'c':
+ if (template[n] == ',')
+ c = 231;
+ else
+ c = 'c';
+ break;
+ case 'E':
+ switch (template[n]) {
+ case '`':
+ c = 200;
+ break;
+ case '\'':
+ c = 201;
+ break;
+ case '^':
+ c = 202;
+ break;
+ case ':':
+ c = 203;
+ break;
+ default:
+ c = 'E';
+ }
+ break;
+ case 'e':
+ switch (template[n]) {
+ case '`':
+ c = 232;
+ break;
+ case '\'':
+ c = 233;
+ break;
+ case '^':
+ c = 234;
+ break;
+ case ':':
+ c = 235;
+ break;
+ default:
+ c = 'e';
+ }
+ break;
+ case 'I':
+ switch (template[n]) {
+ case '`':
+ c = 204;
+ break;
+ case '\'':
+ c = 205;
+ break;
+ case '^':
+ c = 206;
+ break;
+ case ':':
+ c = 207;
+ break;
+ default:
+ c = 'I';
+ }
+ break;
+ case 'i':
+ switch (template[n]) {
+ case '`':
+ c = 236;
+ break;
+ case '\'':
+ c = 237;
+ break;
+ case '^':
+ c = 238;
+ break;
+ case ':':
+ c = 239;
+ break;
+ default:
+ c = 'i';
+ }
+ break;
+ case 'N':
+ if (template[n] == '~')
+ c = 209;
+ else
+ c = 'N';
+ break;
+ case 'n':
+ if (template[n] == '~')
+ c = 241;
+ else
+ c = 'n';
+ break;
+ case 'O':
+ switch (template[n]) {
+ case '`':
+ c = 210;
+ break;
+ case '\'':
+ c = 211;
+ break;
+ case '^':
+ c = 212;
+ break;
+ case '~':
+ c = 213;
+ break;
+ case ':':
+ c = 214;
+ break;
+ default:
+ c = 'O';
+ }
+ break;
+ case 'o':
+ switch (template[n]) {
+ case '&':
+ c = 240;
+ break;
+ case '`':
+ c = 242;
+ break;
+ case '\'':
+ c = 243;
+ break;
+ case '^':
+ c = 244;
+ break;
+ case '~':
+ c = 245;
+ break;
+ case ':':
+ c = 246;
+ break;
+ default:
+ c = 'o';
+ }
+ break;
+ case 'U':
+ switch (template[n]) {
+ case '`':
+ c = 217;
+ break;
+ case '\'':
+ c = 218;
+ break;
+ case '^':
+ c = 219;
+ break;
+ case ':':
+ c = 220;
+ break;
+ default:
+ c = 'U';
+ }
+ break;
+ case 'u':
+ switch (template[n]) {
+ case '`':
+ c = 249;
+ break;
+ case '\'':
+ c = 250;
+ break;
+ case '^':
+ c = 251;
+ break;
+ case ':':
+ c = 252;
+ break;
+ default:
+ c = 'u';
+ }
+ break;
+ case 'Y':
+ if (template[n] == '\'')
+ c = 221;
+ else
+ c = 'Y';
+ break;
+ case 'y':
+ if (template[n] == '\'')
+ c = 253;
+ else if (template[n] == ':')
+ c = 255;
+ else
+ c = 'y';
+ break;
+ case '?':
+ if (template[n] == 'u')
+ c = 191;
+ else
+ c = '?';
+ break;
+ case '!':
+ if (template[n] == 'u')
+ c = 161;
+ else
+ c = '!';
+ break;
+ case '<':
+ if (template[n] == '"')
+ c = 171;
+ else
+ c = '<';
+ break;
+ case '>':
+ if (template[n] == '"')
+ c = 187;
+ else
+ c = '>';
+ break;
+ case 's':
+ if (template[n] == 'B')
+ c = 223;
+ else
+ c = 's';
+ break;
+ case 'p':
+ if (template[n] == '|')
+ c = 254;
+ else
+ c = 'p';
+ break;
+ case 'P':
+ if (template[n] == '|')
+ c = 222;
+ else
+ c = 'P';
+ break;
+ case 'D':
+ if (template[n] == '-')
+ c = 208;
+ else
+ c = 'D';
+ break;
+ default:
+ c = base[n];
+ }
+ if (isprint(c)) {
+ if (safe_chr((char) c, buff, bp))
+ return 1;
+ } else {
+ if (safe_chr(base[n], buff, bp))
+ return 1;
+ }
+ }
+ return 0;
}
*** 1_7_5.134/src/speech.c Mon, 11 Mar 2002 18:22:55 -0600 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.8 660)
--- 1_7_5.158(w)/src/speech.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.8.1.1.1.1 660)
***************
*** 45,55 ****
if (FULL_INVIS && DarkLegal(thing)) {
if (IsPlayer(thing))
! return ("Someone");
else
! return ("Something");
} else {
! return (Name(thing));
}
}
--- 45,55 ----
if (FULL_INVIS && DarkLegal(thing)) {
if (IsPlayer(thing))
! return "Someone";
else
! return "Something";
} else {
! return accented_name(thing);
}
}
***************
*** 1004,1012 ****
}
char *
! ns_esnotify(dbref speaker, dbref (*func) (dbref, void *)
! __attribute__ ((__unused__)), void *fdata
! __attribute__ ((__unused__)), int para)
{
char dest[BUFFER_LEN];
char *ret;
--- 1004,1011 ----
}
char *
! ns_esnotify(dbref speaker, na_lookup func __attribute__ ((__unused__)),
! void *fdata __attribute__ ((__unused__)), int para)
{
char dest[BUFFER_LEN];
char *ret;
***************
*** 1142,1148 ****
*/
if (IsExit(thing)) {
! notify_anything(orator, na_next, (void *) Contents(loc), NULL, 0, tbuf1);
} else {
pass[0] = Contents(loc);
pass[1] = thing;
--- 1141,1147 ----
*/
if (IsExit(thing)) {
! notify_anything(orator, na_next, &Contents(loc), NULL, 0, tbuf1);
} else {
pass[0] = Contents(loc);
pass[1] = thing;
***************
*** 1268,1274 ****
}
/* notify everybody */
! notify_anything(player, na_loc, (void *) loc, ns_esnotify, 0, tbuf1);
do_audible_stuff(loc, NULL, 0, tbuf1);
}
--- 1267,1273 ----
}
/* notify everybody */
! notify_anything(player, na_loc, &loc, ns_esnotify, 0, tbuf1);
do_audible_stuff(loc, NULL, 0, tbuf1);
}
*** 1_7_5.134/src/set.c Fri, 15 Feb 2002 16:15:40 -0600 dunemush (pennmush/b/38_set.c 1.26.1.5.1.1.2.2 660)
--- 1_7_5.158(w)/src/set.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/38_set.c 1.26.1.5.1.1.2.1.1.2 660)
***************
*** 982,988 ****
COMMAND (cmd_with) {
dbref what;
! what = match_thing(player, arg_left);
if (!GoodObject(what))
return;
--- 982,988 ----
COMMAND (cmd_with) {
dbref what;
! what = noisy_match_result(player, arg_left, NOTYPE, MAT_NEARBY);
if (!GoodObject(what))
return;
*** 1_7_5.134/src/player.c Tue, 04 Sep 2001 09:08:48 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.5 660)
--- 1_7_5.158(w)/src/player.c Sun, 28 Apr 2002 15:08:53 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.4.1.2 660)
***************
*** 119,124 ****
--- 119,127 ----
dbref player;
dbref i;
+ if (!name || !*name)
+ return NOTHING;
+
/* validate name */
if ((player = lookup_player(name)) == NOTHING)
return NOTHING;
*** 1_7_5.134/src/parse.c Mon, 25 Mar 2002 11:01:50 -0600 dunemush (pennmush/b/48_parse.c 1.23.1.10.1.2.1.1.1.1.1.2.1.3 660)
--- 1_7_5.158(w)/src/parse.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/b/48_parse.c 1.23.1.10.1.2.1.1.1.1.1.2.1.4 660)
***************
*** 97,123 ****
#endif
- /* Indexes of valid q-regs into the renv array. -1 is error. */
- signed char qreg_indexes[UCHAR_MAX + 1] = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
- -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
- -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
- };
-
-
dbref
parse_dbref(str)
char const *str;
--- 97,102 ----
***************
*** 281,307 ****
}
/* Table of interesting characters for process_expression() */
! static char active_table[UCHAR_MAX + 1];
!
! /* Function to initialize table above */
! void
! init_process_expression()
! {
! active_table['\0'] = 1;
! active_table['%'] = 1;
! active_table['{'] = 1;
! active_table['['] = 1;
! active_table['('] = 1;
! active_table['\\'] = 1;
! active_table[' '] = 1;
! active_table['}'] = 1;
! active_table[']'] = 1;
! active_table[')'] = 1;
! active_table[','] = 1;
! active_table[';'] = 1;
! active_table['='] = 1;
! active_table['$'] = 1;
! }
#ifdef WIN32
#pragma warning( disable : 4761) /* NJG: disable warning re conversion */
--- 260,268 ----
}
/* Table of interesting characters for process_expression() */
! extern char active_table[UCHAR_MAX + 1];
! /* Indexes of valid q-regs into the renv array. -1 is error. */
! extern signed char qreg_indexes[UCHAR_MAX + 1];
#ifdef WIN32
#pragma warning( disable : 4761) /* NJG: disable warning re conversion */
*** 1_7_5.134/src/match.c Sat, 18 Aug 2001 10:55:46 -0500 dunemush (pennmush/c/2_match.c 1.24 660)
--- 1_7_5.158(w)/src/match.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/c/2_match.c 1.25 660)
***************
*** 67,103 ****
#include "confmagic.h"
static dbref match_result_internal
! _((const dbref who, const char *name, const int type, const long int flags));
! static dbref match_me _((const dbref who, const char *name));
! static dbref match_here _((const dbref who, const char *name));
! static dbref match_absolute _((const char *name));
! static dbref match_player _((const dbref matcher, const char *match_name));
! static dbref match_list _((const dbref match_who, const char *match_name,
! const int type, const long int flags, dbref first,
! dbref *last_match, int *match_count));
! static dbref match_neighbor _((const dbref who, const char *name,
! const int type, const long int flags,
! dbref *last_match, int *match_count));
! static dbref match_possession _((const dbref who, const char *name,
! const int type, const long int flags,
! dbref *last_match, int *match_count));
! static dbref match_exit _((const dbref who, const char *name,
! const int type, const long int flags));
! static dbref match_exit_internal _((const dbref match_who,
! const char *match_name, const int type,
! const long int flags, const dbref loc,
! int *match_count));
! static dbref match_remote_contents _((const dbref who, const char *name,
! const int type, const long int flags,
! dbref *last_match, int *match_count));
! static dbref match_container _((const dbref who, const char *name,
! const int type, const long int flags,
! dbref *last_match, int *match_count));
! static dbref match_english _((const dbref who, const char *name,
! const int type, const long int flags));
! static dbref choose_thing _((const dbref match_who, const int preferred_type,
! long int flags, dbref thing1, dbref thing2,
! int *match_count));
--- 67,103 ----
#include "confmagic.h"
static dbref match_result_internal
! (dbref who, const char *name, int type, long flags);
! static dbref match_me(const dbref who, const char *name);
! static dbref match_here(const dbref who, const char *name);
! static dbref match_absolute(const char *name);
! static dbref match_player(const dbref matcher, const char *match_name);
! static dbref match_list(const dbref match_who, const char *match_name,
! const int type, const long int flags, dbref first,
! dbref *last_match, int *match_count);
! static dbref match_neighbor(const dbref who, const char *name,
! const int type, const long int flags,
! dbref *last_match, int *match_count);
! static dbref match_possession(const dbref who, const char *name,
! const int type, const long int flags,
! dbref *last_match, int *match_count);
! static dbref match_exit(const dbref who, const char *name,
! const int type, const long int flags);
! static dbref match_exit_internal(const dbref match_who,
! const char *match_name, const int type,
! const long int flags, const dbref loc,
! int *match_count);
! static dbref match_remote_contents(const dbref who, const char *name,
! const int type, const long int flags,
! dbref *last_match, int *match_count);
! static dbref match_container(const dbref who, const char *name,
! const int type, const long int flags,
! dbref *last_match, int *match_count);
! static dbref match_english(const dbref who, const char *name,
! const int type, const long int flags);
! static dbref choose_thing(const dbref match_who, const int preferred_type,
! long int flags, dbref thing1, dbref thing2,
! int *match_count);
***************
*** 158,168 ****
/* The real work. */
static dbref
! match_result_internal(who, name, type, flags)
! const dbref who;
! const char *name;
! const int type;
! const long int flags;
{
dbref match = NOTHING, last_match = NOTHING, exact_match = NOTHING;
int exact_match_count = 0;
--- 158,164 ----
/* The real work. */
static dbref
! match_result_internal(dbref who, const char *name, int type, long flags)
{
dbref match = NOTHING, last_match = NOTHING, exact_match = NOTHING;
int exact_match_count = 0;
*** 1_7_5.134/src/lock.c Sun, 27 Jan 2002 16:28:10 -0600 dunemush (pennmush/c/6_lock.c 1.17.1.6 660)
--- 1_7_5.158(w)/src/lock.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/c/6_lock.c 1.17.1.7 660)
***************
*** 245,253 ****
{
lock_list *ll;
dbref p;
! int cmp;
for (p = thing; GoodObject(p); p = Parent(p)) {
ll = Locks(p);
while (ll && L_TYPE(ll)) {
cmp = strcasecmp(L_TYPE(ll), type);
--- 245,256 ----
{
lock_list *ll;
dbref p;
! int cmp, count;
+ count = 0;
for (p = thing; GoodObject(p); p = Parent(p)) {
+ if (count++ > 100)
+ return NULL;
ll = Locks(p);
while (ll && L_TYPE(ll)) {
cmp = strcasecmp(L_TYPE(ll), type);
*** 1_7_5.134/src/game.c Mon, 11 Mar 2002 18:22:55 -0600 dunemush (pennmush/c/10_game.c 1.50.1.8.1.1.1.1.2.1.1.1.2.1.1.4.1.1.1.1.1.1.1.1.1.1.2.1.1.2.1.1.1.2 660)
--- 1_7_5.158(w)/src/game.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/c/10_game.c 1.50.1.8.1.1.1.1.2.1.1.1.2.1.1.4.1.1.1.1.1.1.1.1.1.1.2.1.1.2.1.1.1.1.1.2 660)
***************
*** 812,817 ****
--- 812,820 ----
}
#endif
+ if (panicdb)
+ db_close(f);
+
/* now do access file stuff */
read_access_file();
*** 1_7_5.134/src/funstr.c Mon, 25 Feb 2002 15:04:41 -0600 dunemush (pennmush/c/13_funstr.c 1.28.1.1.1.2.1.4.1.6.1.1.1.1.1.2.1.1.1.1.1.1.1.2 660)
--- 1_7_5.158(w)/src/funstr.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/c/13_funstr.c 1.28.1.1.1.2.1.4.1.6.1.1.1.1.1.2.1.1.1.1.1.1.1.3 660)
***************
*** 1039,1298 ****
FUNCTION(fun_accent)
{
- int n;
- unsigned char c;
-
if (arglens[0] != arglens[1]) {
safe_str(T("#-1 STRING LENGTHS MUST BE EQUAL"), buff, bp);
return;
}
!
! for (n = 0; n < arglens[0]; n++) {
! switch (args[0][n]) {
! case 'A':
! switch (args[1][n]) {
! case '`':
! c = 192;
! break;
! case '\'':
! c = 193;
! break;
! case '^':
! c = 194;
! break;
! case '~':
! c = 195;
! break;
! case ':':
! c = 196;
! break;
! case 'o':
! c = 197;
! break;
! default:
! c = 'A';
! }
! break;
! case 'a':
! switch (args[1][n]) {
! case '`':
! c = 224;
! break;
! case '\'':
! c = 225;
! break;
! case '^':
! c = 226;
! break;
! case '~':
! c = 227;
! break;
! case ':':
! c = 228;
! break;
! case 'o':
! c = 229;
! break;
! default:
! c = 'a';
! }
! break;
! case 'C':
! if (args[1][n] == ',')
! c = 199;
! else
! c = 'C';
! break;
! case 'c':
! if (args[1][n] == ',')
! c = 231;
! else
! c = 'c';
! break;
! case 'E':
! switch (args[1][n]) {
! case '`':
! c = 200;
! break;
! case '\'':
! c = 201;
! break;
! case '^':
! c = 202;
! break;
! case ':':
! c = 203;
! break;
! default:
! c = 'E';
! }
! break;
! case 'e':
! switch (args[1][n]) {
! case '`':
! c = 232;
! break;
! case '\'':
! c = 233;
! break;
! case '^':
! c = 234;
! break;
! case ':':
! c = 235;
! break;
! default:
! c = 'e';
! }
! break;
! case 'I':
! switch (args[1][n]) {
! case '`':
! c = 204;
! break;
! case '\'':
! c = 205;
! break;
! case '^':
! c = 206;
! break;
! case ':':
! c = 207;
! break;
! default:
! c = 'I';
! }
! break;
! case 'i':
! switch (args[1][n]) {
! case '`':
! c = 236;
! break;
! case '\'':
! c = 237;
! break;
! case '^':
! c = 238;
! break;
! case ':':
! c = 239;
! break;
! default:
! c = 'i';
! }
! break;
! case 'N':
! if (args[1][n] == '~')
! c = 209;
! else
! c = 'N';
! break;
! case 'n':
! if (args[1][n] == '~')
! c = 241;
! else
! c = 'n';
! break;
! case 'O':
! switch (args[1][n]) {
! case '`':
! c = 210;
! break;
! case '\'':
! c = 211;
! break;
! case '^':
! c = 212;
! break;
! case '~':
! c = 213;
! break;
! case ':':
! c = 214;
! break;
! default:
! c = 'O';
! }
! break;
! case 'o':
! switch (args[1][n]) {
! case '`':
! c = 242;
! break;
! case '\'':
! c = 243;
! break;
! case '^':
! c = 244;
! break;
! case '~':
! c = 245;
! break;
! case ':':
! c = 246;
! break;
! default:
! c = 'o';
! }
! break;
! case 'U':
! switch (args[1][n]) {
! case '`':
! c = 217;
! break;
! case '\'':
! c = 218;
! break;
! case '^':
! c = 219;
! break;
! case ':':
! c = 220;
! break;
! default:
! c = 'U';
! }
! break;
! case 'u':
! switch (args[1][n]) {
! case '`':
! c = 249;
! break;
! case '\'':
! c = 250;
! break;
! case '^':
! c = 251;
! break;
! case ':':
! c = 252;
! break;
! default:
! c = 'u';
! }
! break;
! case 'Y':
! if (args[1][n] == '\'')
! c = 221;
! else
! c = 'Y';
! break;
! case 'y':
! if (args[1][n] == '\'')
! c = 253;
! else if (args[1][n] == ':')
! c = 255;
! else
! c = 'y';
! break;
! default:
! c = args[0][n];
! }
! if (isprint(c))
! safe_chr((char) c, buff, bp);
! else
! safe_chr(args[0][n], buff, bp);
! }
}
FUNCTION(fun_stripaccents)
--- 1039,1049 ----
FUNCTION(fun_accent)
{
if (arglens[0] != arglens[1]) {
safe_str(T("#-1 STRING LENGTHS MUST BE EQUAL"), buff, bp);
return;
}
! safe_accent(args[0], args[1], arglens[0], buff, bp);
}
FUNCTION(fun_stripaccents)
*** 1_7_5.134/src/funmisc.c Fri, 04 Jan 2002 15:23:43 -0600 dunemush (pennmush/c/14_funmisc.c 1.31 660)
--- 1_7_5.158(w)/src/funmisc.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/c/14_funmisc.c 1.30.1.1.1.2 660)
***************
*** 49,55 ****
else if (!strcasecmp(args[0], "name"))
safe_boolean(ok_name(args[1]), buff, bp);
else if (!strcasecmp(args[0], "attrname"))
! safe_boolean(good_atr_name(args[1]), buff, bp);
else if (!strcasecmp(args[0], "playername"))
safe_boolean(ok_player_name(args[1]), buff, bp);
else
--- 49,55 ----
else if (!strcasecmp(args[0], "name"))
safe_boolean(ok_name(args[1]), buff, bp);
else if (!strcasecmp(args[0], "attrname"))
! safe_boolean(good_atr_name(upcasestr(args[1])), buff, bp);
else if (!strcasecmp(args[0], "playername"))
safe_boolean(ok_player_name(args[1]), buff, bp);
else
***************
*** 389,394 ****
--- 389,395 ----
tbuf1[1] = '\0';
tbuf1[2] = '\0';
tbuf1[3] = '\0';
+
p = tbuf1;
q = upcasestr(remove_markup(str, NULL));
/* First character is just copied */
***************
*** 401,411 ****
p++;
/* Convert letters to soundex values, squash duplicates */
while (*q) {
! if (!isalpha(*q)) {
q++;
continue;
}
! *p = soundex_val[*q++ - 0x41] + '0';
if (*p != *(p - 1))
p++;
}
--- 402,412 ----
p++;
/* Convert letters to soundex values, squash duplicates */
while (*q) {
! if (!isalpha(*q) || !isascii(*q)) {
q++;
continue;
}
! *p = soundex_val[*q++ - 'A'] + '0';
if (*p != *(p - 1))
p++;
}
*** 1_7_5.134/src/funmath.c Mon, 28 Jan 2002 09:38:00 -0600 dunemush (pennmush/c/15_funmath.c 1.42 660)
--- 1_7_5.158(w)/src/funmath.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/c/15_funmath.c 1.39.1.1.1.2 660)
***************
*** 189,201 ****
int num;
char *p;
/* Handle the case of a pure number */
! if (is_integer(args[0])) {
safe_integer(parse_integer(args[0]) + 1, buff, bp);
return;
}
p = args[0] + arglens[0] - 1;
if (!isdigit(*p)) {
! safe_str(T("#-1 ARGUMENT MUST END IN AN INTEGER"), buff, bp);
return;
}
while ((isdigit(*p) || (*p == '-')) && p != args[0]) {
--- 189,211 ----
int num;
char *p;
/* Handle the case of a pure number */
! if (is_strict_integer(args[0])) {
safe_integer(parse_integer(args[0]) + 1, buff, bp);
return;
}
+ /* Handle a null string */
+ if (!*args[0]) {
+ safe_str(NULL_EQ_ZERO ? "1" : T("#-1 ARGUMENT MUST END IN AN INTEGER"),
+ buff, bp);
+ return;
+ }
p = args[0] + arglens[0] - 1;
if (!isdigit(*p)) {
! if (NULL_EQ_ZERO) {
! safe_str(args[0], buff, bp);
! safe_str("1", buff, bp);
! } else
! safe_str(T("#-1 ARGUMENT MUST END IN AN INTEGER"), buff, bp);
return;
}
while ((isdigit(*p) || (*p == '-')) && p != args[0]) {
***************
*** 221,233 ****
int num;
char *p;
/* Handle the case of a pure number */
! if (is_integer(args[0])) {
safe_integer(parse_integer(args[0]) - 1, buff, bp);
return;
}
p = args[0] + arglens[0] - 1;
if (!isdigit(*p)) {
! safe_str(T("#-1 ARGUMENT MUST END IN AN INTEGER"), buff, bp);
return;
}
while ((isdigit(*p) || (*p == '-')) && p != args[0]) {
--- 231,253 ----
int num;
char *p;
/* Handle the case of a pure number */
! if (is_strict_integer(args[0])) {
safe_integer(parse_integer(args[0]) - 1, buff, bp);
return;
}
+ /* Handle a null string */
+ if (!*args[0]) {
+ safe_str(NULL_EQ_ZERO ? "-1" : T("#-1 ARGUMENT MUST END IN AN INTEGER"),
+ buff, bp);
+ return;
+ }
p = args[0] + arglens[0] - 1;
if (!isdigit(*p)) {
! if (NULL_EQ_ZERO) {
! safe_str(args[0], buff, bp);
! safe_str("-1", buff, bp);
! } else
! safe_str(T("#-1 ARGUMENT MUST END IN AN INTEGER"), buff, bp);
return;
}
while ((isdigit(*p) || (*p == '-')) && p != args[0]) {
*** 1_7_5.134/src/funlist.c Mon, 11 Mar 2002 18:22:55 -0600 dunemush (pennmush/c/16_funlist.c 1.3.1.1.1.5.1.2.1.1.1.1.1.4.1.2.1.2.1.19.1.2.1.1.1.2.1.5.1.1.1.1.1.1.1.1.1.1.2.1.1.3.1.3 660)
--- 1_7_5.158(w)/src/funlist.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/c/16_funlist.c 1.3.1.1.1.5.1.2.1.1.1.1.1.4.1.2.1.2.1.19.1.2.1.1.1.2.1.5.1.1.1.1.1.1.1.1.1.1.2.1.1.3.1.2.1.1.1.1.1.2 660)
***************
*** 613,656 ****
int nptrs;
{
int sort_type, i;
- char *p;
sort_type = NUMERIC_LIST;
for (i = 0; i < nptrs; i++) {
switch (sort_type) {
case NUMERIC_LIST:
! if (!is_strict_number(ptrs[i])) {
! /* If we get something non-numeric, switch to an
! * alphanumeric guess, unless this is the first
! * element and we have a dbref.
! */
! if (i == 0) {
! p = ptrs[i];
! if (*p++ != NUMBER_TOKEN)
! return ALPHANUM_LIST;
! else if (is_strict_number(p))
sort_type = DBREF_LIST;
else
return ALPHANUM_LIST;
- } else {
- return ALPHANUM_LIST;
}
! } else if (strchr(ptrs[i], '.'))
! sort_type = FLOAT_LIST;
break;
case FLOAT_LIST:
if (!is_strict_number(ptrs[i]))
return ALPHANUM_LIST;
break;
case DBREF_LIST:
! /* If what we get following the '#' sign isn't a number,
! * we sort on alphanumeric.
! */
! p = ptrs[i];
! if (*p++ != NUMBER_TOKEN)
! return ALPHANUM_LIST;
! if (!is_strict_number(p))
return ALPHANUM_LIST;
break;
default:
--- 613,647 ----
int nptrs;
{
int sort_type, i;
sort_type = NUMERIC_LIST;
for (i = 0; i < nptrs; i++) {
switch (sort_type) {
case NUMERIC_LIST:
! if (!is_strict_integer(ptrs[i])) {
! /* If it's not an integer, see if it's a floating-point number */
! if (is_strict_number(ptrs[i])) {
! sort_type = FLOAT_LIST;
! } else if (i == 0) {
!
! /* If we get something non-numeric, switch to an
! * alphanumeric guess, unless this is the first
! * element and we have a dbref.
! */
! if (is_dbref(ptrs[i]))
sort_type = DBREF_LIST;
else
return ALPHANUM_LIST;
}
! }
break;
case FLOAT_LIST:
if (!is_strict_number(ptrs[i]))
return ALPHANUM_LIST;
break;
case DBREF_LIST:
! if (!is_dbref(ptrs[i]))
return ALPHANUM_LIST;
break;
default:
***************
*** 807,812 ****
--- 798,814 ----
}
}
+ int qparse_dbref _((const char *s));
+ int
+ qparse_dbref(s)
+ const char *s;
+ {
+ /* Version of parse_dbref() that doesn't do GoodObject checks */
+ if (!s || (*s != NUMBER_TOKEN) || !*(s + 1))
+ return NOTHING;
+ return parse_integer(s + 1);
+ }
+
void
do_gensort(s, n, sort_type)
char *s[];
***************
*** 836,842 ****
ip = (i_rec *) mush_malloc(n * sizeof(i_rec), "do_gensort.dbref_list");
for (i = 0; i < n; i++) {
ip[i].str = s[i];
! ip[i].num = parse_dbref(s[i]);
}
qsort((void *) ip, n, sizeof(i_rec), i_comp);
for (i = 0; i < n; i++)
--- 838,844 ----
ip = (i_rec *) mush_malloc(n * sizeof(i_rec), "do_gensort.dbref_list");
for (i = 0; i < n; i++) {
ip[i].str = s[i];
! ip[i].num = qparse_dbref(s[i]);
}
qsort((void *) ip, n, sizeof(i_rec), i_comp);
for (i = 0; i < n; i++)
***************
*** 2037,2046 ****
while (lp) {
if (*place) {
safe_str(outsep, buff, bp);
- if (*bp == oldbp && pe_info->fun_invocations == funccount)
- break;
- funccount = pe_info->fun_invocations;
- oldbp = *bp;
}
*place = *place + 1;
iter_rep[inum] = tbuf1 = split_token(&lp, sep);
--- 2039,2044 ----
***************
*** 2050,2055 ****
--- 2048,2057 ----
sp = tbuf2;
process_expression(buff, bp, &sp, executor, caller, enactor,
PE_DEFAULT, PT_DEFAULT, pe_info);
+ if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount)
+ break;
+ funccount = pe_info->fun_invocations;
+ oldbp = *bp;
mush_free((Malloc_t) tbuf2, "replace_string.buff");
}
*place = 0;
***************
*** 2190,2196 ****
ap = asave;
process_expression(buff, bp, &ap, thing, executor, enactor,
PE_DEFAULT, PT_DEFAULT, pe_info);
! if (*bp == oldbp && pe_info->fun_invocations == funccount)
break;
oldbp = *bp;
funccount = pe_info->fun_invocations;
--- 2192,2198 ----
ap = asave;
process_expression(buff, bp, &ap, thing, executor, enactor,
PE_DEFAULT, PT_DEFAULT, pe_info);
! if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount)
break;
oldbp = *bp;
funccount = pe_info->fun_invocations;
***************
*** 2262,2268 ****
ap = asave;
process_expression(buff, bp, &ap, thing, executor, enactor,
PE_DEFAULT, PT_DEFAULT, pe_info);
! if (*bp == oldbp && pe_info->fun_invocations == funccount)
break;
oldbp = *bp;
funccount = pe_info->fun_invocations;
--- 2264,2270 ----
ap = asave;
process_expression(buff, bp, &ap, thing, executor, enactor,
PE_DEFAULT, PT_DEFAULT, pe_info);
! if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount)
break;
oldbp = *bp;
funccount = pe_info->fun_invocations;
***************
*** 2354,2360 ****
ap = asave;
process_expression(buff, bp, &ap, thing, executor, enactor,
PE_DEFAULT, PT_DEFAULT, pe_info);
! if (*bp == oldbp && pe_info->fun_invocations == funccount)
break;
oldbp = *bp;
funccount = pe_info->fun_invocations;
--- 2356,2362 ----
ap = asave;
process_expression(buff, bp, &ap, thing, executor, enactor,
PE_DEFAULT, PT_DEFAULT, pe_info);
! if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount)
break;
oldbp = *bp;
funccount = pe_info->fun_invocations;
*** 1_7_5.134/src/fundb.c Mon, 28 Jan 2002 09:38:00 -0600 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.5 660)
--- 1_7_5.158(w)/src/fundb.c Sun, 28 Apr 2002 15:08:52 -0500 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.5.1.1 660)
***************
*** 1308,1316 ****
}
if (nameformat(executor, it, tbuf1))
safe_str(tbuf1, buff, bp);
! else
safe_str(shortname(it), buff, bp);
! }
}
/* ARGSUSED */
--- 1308,1319 ----
}
if (nameformat(executor, it, tbuf1))
safe_str(tbuf1, buff, bp);
! else if (IsExit(it))
safe_str(shortname(it), buff, bp);
! else
! safe_str(accented_name(it), buff, bp);
! } else
! safe_str(T(e_match), buff, bp);
}
/* ARGSUSED */
*** 1_7_5.134/src/function.c Sun, 27 Jan 2002 16:28:10 -0600 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.12 660)
--- 1_7_5.158(w)/src/function.c Sun, 28 Apr 2002 15:08:51 -0500 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.13 660)
***************
*** 439,444 ****
--- 439,445 ----
{"T", fun_t, 1, 1, FN_REG},
{"TABLE", fun_table, 1, 5, FN_REG},
{"TEL", fun_tel, 2, 2, FN_REG},
+ {"TEXTFILE", fun_textfile, 2, 2, FN_REG},
{"TIME", fun_time, 0, 1, FN_REG},
{"TIMEFMT", fun_timefmt, 1, 2, FN_REG},
{"TIMESTRING", fun_timestring, 1, 2, FN_REG},
*** 1_7_5.134/src/extchat.c Sun, 06 Jan 2002 20:49:01 -0600 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.2 660)
--- 1_7_5.158(w)/src/extchat.c Sun, 28 Apr 2002 15:08:51 -0500 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.2 660)
***************
*** 1154,1163 ****
arg1 = arg1 + 1;
channel_broadcast(chan, player, 0, "<%s> %s%s%s%s%s%s", ChanName(chan),
title ? title : "", title ? ANSI_NORMAL : "",
! title ? " " : "", Name(player), gap, arg1);
if (!canhear)
notify(player, tprintf(T("To channel %s: %s%s%s"), ChanName(chan),
! Name(player), gap, arg1));
break;
default:
if (CHAT_STRIP_QUOTE && (*arg1 == SAY_TOKEN))
--- 1154,1163 ----
arg1 = arg1 + 1;
channel_broadcast(chan, player, 0, "<%s> %s%s%s%s%s%s", ChanName(chan),
title ? title : "", title ? ANSI_NORMAL : "",
! title ? " " : "", accented_name(player), gap, arg1);
if (!canhear)
notify(player, tprintf(T("To channel %s: %s%s%s"), ChanName(chan),
! accented_name(player), gap, arg1));
break;
default:
if (CHAT_STRIP_QUOTE && (*arg1 == SAY_TOKEN))
***************
*** 1165,1175 ****
channel_broadcast(chan, player, 0, T("<%s> %s%s%s%s says, \"%s\""),
ChanName(chan), title ? title : "",
title ? ANSI_NORMAL : "", title ? " " : "",
! Name(player), arg1);
if (!canhear)
notify(player,
tprintf(T("To channel %s: %s says, \"%s\""), ChanName(chan),
! Name(player), arg1));
break;
}
--- 1165,1175 ----
channel_broadcast(chan, player, 0, T("<%s> %s%s%s%s says, \"%s\""),
ChanName(chan), title ? title : "",
title ? ANSI_NORMAL : "", title ? " " : "",
! accented_name(player), arg1);
if (!canhear)
notify(player,
tprintf(T("To channel %s: %s says, \"%s\""), ChanName(chan),
! accented_name(player), arg1));
break;
}
***************
*** 1547,1552 ****
--- 1547,1553 ----
{
CHAN *c = NULL;
CHANUSER *u;
+ const char *scan;
if (!name || !*name) {
notify(player, T("You must specify a channel."));
***************
*** 1555,1560 ****
--- 1556,1568 ----
if (strlen(title) >= CU_TITLE_LEN) {
notify(player, T("Title too long."));
return;
+ }
+ /* Stomp newlines and other weird whitespace */
+ for (scan = title; *scan; scan++) {
+ if ((isspace(*scan) && (*scan != ' ')) || (*scan == BEEP_CHAR)) {
+ notify(player, T("Invalid character in title."));
+ return;
+ }
}
test_channel(player, name, c);
u = onchannel(player, c);
*** 1_7_5.134/src/create.c Mon, 25 Feb 2002 15:04:41 -0600 dunemush (pennmush/c/27_create.c 1.27.1.3.1.1.1.1.1.1.1.3 660)
--- 1_7_5.158(w)/src/create.c Sun, 28 Apr 2002 15:08:51 -0500 dunemush (pennmush/c/27_create.c 1.27.1.3.1.1.1.1.1.1.1.2.1.2 660)
***************
*** 155,164 ****
void
do_open(dbref player, const char *direction, char **links)
{
! do_real_open(player, direction, links[1], NOTHING);
! if (links[2]) {
! do_real_open(player, links[2], "here",
! parse_linkable_room(player, links[1]));
}
}
--- 155,164 ----
void
do_open(dbref player, const char *direction, char **links)
{
! dbref forward;
! forward = do_real_open(player, direction, links[1], NOTHING);
! if (links[2] && GoodObject(forward) && GoodObject(Location(forward))) {
! do_real_open(player, links[2], "here", Location(forward));
}
}
*** 1_7_5.134/src/cque.c Mon, 25 Mar 2002 11:01:50 -0600 dunemush (pennmush/c/28_cque.c 1.36.1.5.1.1.1.1.1.1.1.3 660)
--- 1_7_5.158(w)/src/cque.c Sun, 28 Apr 2002 15:08:51 -0500 dunemush (pennmush/c/28_cque.c 1.36.1.5.1.1.1.1.1.1.1.4 660)
***************
*** 553,559 ****
}
static int
! drain_helper(dbref player, dbref thing, char const *pattern, ATTR *atr,
void *args __attribute__ ((__unused__)))
{
if (waitable_attr(thing, AL_NAME(atr)))
--- 553,560 ----
}
static int
! drain_helper(dbref player __attribute__ ((__unused__)), dbref thing,
! char const *pattern __attribute__ ((__unused__)), ATTR *atr,
void *args __attribute__ ((__unused__)))
{
if (waitable_attr(thing, AL_NAME(atr)))
*** 1_7_5.134/src/conf.c Thu, 14 Mar 2002 09:02:59 -0600 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.5 660)
--- 1_7_5.158(w)/src/conf.c Sun, 28 Apr 2002 15:08:51 -0500 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.6 660)
***************
*** 658,663 ****
--- 658,681 ----
return 0;
}
return 1;
+ } else if (!strcasecmp(opt, "attribute_alias")) {
+ for (p = val; *p && !isspace(*p); p++) ;
+ if (*p) {
+ *p++ = '\0';
+ if (!alias_attribute(val, p)) {
+ if (source == 0) {
+ do_rawlog(LT_ERR, T("CONFIG: Couldn't alias %s to %s.\n"), p, val);
+ }
+ return 0;
+ }
+ } else {
+ if (source == 0) {
+ do_rawlog(LT_ERR,
+ T("CONFIG: attribute_alias %s requires an alias.\n"), val);
+ }
+ return 0;
+ }
+ return 1;
} else if (!strcasecmp(opt, "function_alias")) {
for (p = val; *p && !isspace(*p); p++) ;
if (*p) {
*** 1_7_5.134/src/bsd.c Mon, 11 Mar 2002 18:22:55 -0600 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.4 660)
--- 1_7_5.158(w)/src/bsd.c Sun, 28 Apr 2002 15:08:51 -0500 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.2 660)
***************
*** 5,18 ****
#include <stdio.h>
#include <stdarg.h>
- #ifdef I_MEMORY
- #include <memory.h>
- #endif
#ifdef I_SYS_TYPES
#include <sys/types.h>
#endif
#ifdef WIN32
#define FD_SETSIZE 256
#include <winsock.h>
#include <io.h>
#undef OPAQUE /* Clashes with flags.h */
--- 5,16 ----
#include <stdio.h>
#include <stdarg.h>
#ifdef I_SYS_TYPES
#include <sys/types.h>
#endif
#ifdef WIN32
#define FD_SETSIZE 256
+ #include <windows.h>
#include <winsock.h>
#include <io.h>
#undef OPAQUE /* Clashes with flags.h */
***************
*** 20,27 ****
#define EWOULDBLOCK WSAEWOULDBLOCK
#define MAXHOSTNAMELEN 32
#define LC_MESSAGES 6
! void shutdown_checkpoint _((void));
! #else /* WIN32 */
#ifdef I_SYS_FILE
#include <sys/file.h>
#endif
--- 18,25 ----
#define EWOULDBLOCK WSAEWOULDBLOCK
#define MAXHOSTNAMELEN 32
#define LC_MESSAGES 6
! void shutdown_checkpoint(void);
! #else /* !WIN32 */
#ifdef I_SYS_FILE
#include <sys/file.h>
#endif
***************
*** 29,48 ****
#include <sys/time.h>
#endif
#include <sys/ioctl.h>
- #ifdef I_ERRNO
#include <errno.h>
! #else
! #ifdef I_SYS_ERRNO
! #include <sys/errno.h>
! #endif
! #endif
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#ifdef I_SYS_PARAM
#include <sys/param.h>
#endif
! #endif /* WIN32 */
#include <time.h>
#ifdef I_SYS_WAIT
#include <sys/wait.h>
--- 27,49 ----
#include <sys/time.h>
#endif
#include <sys/ioctl.h>
#include <errno.h>
! #ifdef I_SYS_SOCKET
#include <sys/socket.h>
+ #endif
+ #ifdef I_NETINET_IN
#include <netinet/in.h>
+ #endif
+ #ifdef I_NETDB
#include <netdb.h>
+ #endif
#ifdef I_SYS_PARAM
#include <sys/param.h>
#endif
! #ifdef I_SYS_STAT
! #include <sys/stat.h>
! #endif
! #endif /* !WIN32 */
#include <time.h>
#ifdef I_SYS_WAIT
#include <sys/wait.h>
***************
*** 326,332 ****
static int maxd = 0;
char ccom[BUFFER_LEN];
dbref cplr;
- DESC *cdesc = 0;
#ifdef INFO_SLAVE
static fd_set info_pending;
--- 327,332 ----
***************
*** 337,349 ****
static time_t info_queue_time = 0;
#endif
- #ifdef HAS_SIG_ATOMIC_T
sig_atomic_t signal_shutdown_flag = 0;
sig_atomic_t signal_dump_flag = 0;
- #else
- int signal_shutdown_flag = 0;
- int signal_dump_flag = 0;
- #endif
#ifdef HAS_GETRLIMIT
static void init_rlimit _((void));
--- 337,344 ----
***************
*** 374,386 ****
void shovechars _((Port_t port));
DESC *new_connection _((int oldsock));
void clearstrings _((DESC *d));
! void fcache_dump _((DESC *d, FBLOCK *fp[]));
! int fcache_read _((FBLOCK **cp, char *filename));
! void logout_sock _((DESC *d));
! void shutdownsock _((DESC *d));
! DESC *initializesock _((int s, char *addr, char *ip));
! struct text_block *make_text_block _((const char *s, int n));
! void free_text_block _((struct text_block * t));
void add_to_queue(struct text_queue *q, const char *b, int n);
int flush_queue(struct text_queue *q, int n);
int queue_write(DESC *d, const char *b, int n);
--- 369,398 ----
void shovechars _((Port_t port));
DESC *new_connection _((int oldsock));
void clearstrings _((DESC *d));
! typedef struct fblock {
! char *buff;
! size_t len;
! } FBLOCK;
!
! struct fcache_entries {
! FBLOCK connect_fcache[2];
! FBLOCK motd_fcache[2];
! FBLOCK wizmotd_fcache[2];
! FBLOCK newuser_fcache[2];
! FBLOCK register_fcache[2];
! FBLOCK quit_fcache[2];
! FBLOCK down_fcache[2];
! FBLOCK full_fcache[2];
! FBLOCK guest_fcache[2];
! };
! static struct fcache_entries fcache;
! void fcache_dump(DESC *d, FBLOCK fp[2]);
! int fcache_read(FBLOCK *cp, const char *filename);
! void logout_sock(DESC *d);
! void shutdownsock(DESC *d);
! DESC *initializesock(int s, char *addr, char *ip);
! struct text_block *make_text_block(const char *s, int n);
! void free_text_block(struct text_block *t);
void add_to_queue(struct text_queue *q, const char *b, int n);
int flush_queue(struct text_queue *q, int n);
int queue_write(DESC *d, const char *b, int n);
***************
*** 403,411 ****
void parse_connect _((const char *msg, char *command, char *user, char *pass));
void close_sockets _((void));
dbref find_player_by_desc _((int port));
! Signal_t bailout _((int sig)) __attribute__ ((__noreturn__));
! Signal_t signal_shutdown _((int sig));
! Signal_t signal_dump _((int sig));
void dump_users _((DESC *call_by, char *match, int doing));
const char *time_format_1 _((long int dt));
const char *time_format_2 _((long int dt));
--- 415,423 ----
void parse_connect _((const char *msg, char *command, char *user, char *pass));
void close_sockets _((void));
dbref find_player_by_desc _((int port));
! void bailout(int sig) __attribute__ ((__noreturn__));
! void signal_shutdown(int sig);
! void signal_dump(int sig);
void dump_users _((DESC *call_by, char *match, int doing));
const char *time_format_1 _((long int dt));
const char *time_format_2 _((long int dt));
***************
*** 653,659 ****
restarting = 1;
fclose(newerr);
}
- init_process_expression();
if (init_game_dbs() < 0) {
do_rawlog(LT_ERR, T("ERROR: Couldn't load databases! Exiting."));
--- 665,670 ----
***************
*** 833,857 ****
void
set_signals()
{
- /*#ifdef macintosh
- int i;
-
- for ( i = 0; i < NSIG; i++ )
- signal( i, SIG_IGN );
-
- return;
- #endif*/
#ifndef WIN32
/* we don't care about SIGPIPE, we notice it in select() and write() */
signal(SIGPIPE, SIG_IGN);
/* win32 doesn't support SIGUSR2 */
! signal(SIGUSR2, (void *) signal_dump);
#endif
/* standard termination signals */
! signal(SIGINT, (void *) signal_shutdown);
! signal(SIGTERM, (void *) bailout);
}
enum na_type {
--- 844,860 ----
void
set_signals()
{
#ifndef WIN32
/* we don't care about SIGPIPE, we notice it in select() and write() */
signal(SIGPIPE, SIG_IGN);
/* win32 doesn't support SIGUSR2 */
! signal(SIGUSR2, signal_dump);
#endif
/* standard termination signals */
! signal(SIGINT, signal_shutdown);
! signal(SIGTERM, bailout);
}
enum na_type {
***************
*** 881,886 ****
--- 884,890 ----
struct notify_strings {
char *message;
+ size_t len;
int made;
};
***************
*** 889,894 ****
--- 893,900 ----
static void ansi_change_state(char *t, char **o, int color, int *state,
int *newstate);
static enum na_type notify_type(DESC *d);
+ static void free_strings(struct notify_strings messages[]);
+ static void zero_strings(struct notify_strings messages[]);
static char *notify_makestring(char *message,
struct notify_strings messages[],
enum na_type type);
***************
*** 1014,1019 ****
--- 1020,1045 ----
0xC0C0C0
};
+ static void
+ zero_strings(struct notify_strings messages[])
+ {
+ int n;
+ for (n = 0; n < MESSAGE_TYPES; n++) {
+ messages[n].message = NULL;
+ messages[n].len = 0;
+ messages[n].made = 0;
+ }
+ }
+
+ static void
+ free_strings(struct notify_strings messages[])
+ {
+ int n;
+ for (n = 0; n < MESSAGE_TYPES; n++)
+ if (messages[n].message)
+ mush_free(messages[n].message, "string");
+ }
+
static char *
notify_makestring(char *message, struct notify_strings messages[],
enum na_type type)
***************
*** 1036,1046 ****
return messages[type].message;
messages[type].made = 1;
- #ifdef macintosh
- p = (unsigned char *) message;
- #else
p = message;
- #endif
o = tbuf;
t = o;
--- 1062,1068 ----
***************
*** 1067,1072 ****
--- 1089,1095 ----
}
*o = '\0';
messages[type].message = mush_strdup(tbuf, "string");
+ messages[type].len = o - tbuf;
return messages[type].message;
case NA_NPASCII:
strip = 1;
***************
*** 1108,1113 ****
--- 1131,1137 ----
}
*o = '\0';
messages[type].message = mush_strdup(tbuf, "string");
+ messages[type].len = o - tbuf;
return messages[type].message;
case NA_NPUEBLO:
***************
*** 1252,1257 ****
--- 1276,1285 ----
while (*p) {
switch ((unsigned char) *p) {
case IAC:
+ if (changed) {
+ changed = 0;
+ ansi_change_state(t, &o, color, state, newstate);
+ }
if (type == NA_TANSI || type == NA_TCOLOR)
safe_str("\xFF\xFF", t, &o);
else if (strip)
***************
*** 1299,1346 ****
*o = '\0';
messages[type].message = mush_strdup(tbuf, "string");
return messages[type].message;
}
dbref
! na_one(current, data)
! dbref current;
! void *data;
{
if (current == NOTHING)
! return (dbref) data;
else
return NOTHING;
}
dbref
! na_next(current, data)
! dbref current;
! void *data;
{
if (current == NOTHING)
! return (dbref) data;
else
return Next(current);
}
dbref
! na_loc(current, data)
! dbref current;
! void *data;
{
if (current == NOTHING)
! return (dbref) data;
! else if (current == (dbref) data)
return Contents(current);
else
return Next(current);
}
dbref
! na_nextbut(current, data)
! dbref current;
! void *data;
{
dbref *dbrefs = data;
--- 1327,1368 ----
*o = '\0';
messages[type].message = mush_strdup(tbuf, "string");
+ messages[type].len = o - tbuf;
return messages[type].message;
}
dbref
! na_one(dbref current, void *data)
{
if (current == NOTHING)
! return *((dbref *) data);
else
return NOTHING;
}
dbref
! na_next(dbref current, void *data)
{
if (current == NOTHING)
! return *((dbref *) data);
else
return Next(current);
}
dbref
! na_loc(dbref current, void *data)
{
+ dbref loc = *((dbref *) data);
if (current == NOTHING)
! return loc;
! else if (current == loc)
return Contents(current);
else
return Next(current);
}
dbref
! na_nextbut(dbref current, void *data)
{
dbref *dbrefs = data;
***************
*** 1354,1362 ****
}
dbref
! na_except(current, data)
! dbref current;
! void *data;
{
dbref *dbrefs = data;
--- 1376,1382 ----
}
dbref
! na_except(dbref current, void *data)
{
dbref *dbrefs = data;
***************
*** 1372,1380 ****
}
dbref
! na_except2(current, data)
! dbref current;
! void *data;
{
dbref *dbrefs = data;
--- 1392,1398 ----
}
dbref
! na_except2(dbref current, void *data)
{
dbref *dbrefs = data;
***************
*** 1395,1403 ****
* dbrefs[2] and up are the exceptions.
*/
dbref
! na_exceptN(current, data)
! dbref current;
! void *data;
{
dbref *dbrefs = data;
int i, check;
--- 1413,1419 ----
* dbrefs[2] and up are the exceptions.
*/
dbref
! na_exceptN(dbref current, void *data)
{
dbref *dbrefs = data;
int i, check;
***************
*** 1485,1498 ****
}
void
! notify_anything(speaker, func, fdata, nsfunc, flags, message)
! dbref speaker;
! dbref (*func) (dbref current, void *data);
! void *fdata;
! char *(*nsfunc)
! (dbref speaker, dbref (*func) (dbref, void *), void *fdata, int para);
! int flags;
! const char *message;
{
dbref target;
dbref passalong[3];
--- 1501,1510 ----
}
void
! notify_anything(dbref speaker, na_lookup func,
! void *fdata, char *(*nsfunc) (dbref, na_lookup func, void *,
! int), int flags,
! const char *message)
{
dbref target;
dbref passalong[3];
***************
*** 1503,1508 ****
--- 1515,1521 ----
DESC *d;
enum na_type poutput;
char *pstring;
+ size_t plen;
char *bp;
ATTR *a;
char const *asave, *ap;
***************
*** 1556,1577 ****
havepara = 1;
}
pstring = notify_makestring(paranoid, paranoids, poutput);
} else {
if (!havespoof) {
nospoof = nsfunc(speaker, func, fdata, 0);
havespoof = 1;
}
pstring = notify_makestring(nospoof, nospoofs, poutput);
}
! queue_newwrite(d, pstring, strlen(pstring));
}
pstring = notify_makestring(msgbuf, messages, poutput);
if (pstring && *pstring
&& ((d->conn_flags & CONN_HTML) || !(flags & NA_NOENTER)
|| ((flags & NA_PUPPET2)
&& nohtml_strlen(msgbuf, puppet) > 0))) {
! queue_newwrite(d, pstring, strlen(pstring));
}
if (!(flags & NA_NOENTER)) {
if ((poutput == NA_PUEBLO) || (poutput == NA_NPUEBLO)) {
--- 1569,1593 ----
havepara = 1;
}
pstring = notify_makestring(paranoid, paranoids, poutput);
+ plen = paranoids[poutput].len;
} else {
if (!havespoof) {
nospoof = nsfunc(speaker, func, fdata, 0);
havespoof = 1;
}
pstring = notify_makestring(nospoof, nospoofs, poutput);
+ plen = nospoofs[poutput].len;
}
! queue_newwrite(d, pstring, plen);
}
pstring = notify_makestring(msgbuf, messages, poutput);
+ plen = messages[poutput].len;
if (pstring && *pstring
&& ((d->conn_flags & CONN_HTML) || !(flags & NA_NOENTER)
|| ((flags & NA_PUPPET2)
&& nohtml_strlen(msgbuf, puppet) > 0))) {
! queue_newwrite(d, pstring, plen);
}
if (!(flags & NA_NOENTER)) {
if ((poutput == NA_PUEBLO) || (poutput == NA_NPUEBLO)) {
***************
*** 1598,1604 ****
safe_str("> ", tbuf1, &bp);
safe_str(msgbuf, tbuf1, &bp);
*bp = '\0';
! notify_anything(speaker, na_one, (void *) Owner(target), NULL,
flags | NA_NORELAY | NA_PUPPET2, tbu