[PENNMUSH-ANNOUNCE] 1.7.4-patch17
dunemush@pennmush.org
dunemush at pennmush.org
Mon, 22 Apr 2002 11:17:21 -0500
This is patch17 to PennMUSH 1.7.4. After applying this patch, you will
have version 1.7.4p17
To apply this patch, save it to a file in your top-level MUSH directory,
and do the following:
patch -p1 < 1.7.4-patch17
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:
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.
Prereq: 1.7.4p16
*** 1_7_4.244/Patchlevel Mon, 11 Mar 2002 18:21:52 -0600 dunemush (pennmush/5_Patchlevel 1.34 600)
--- 1_7_4.258(w)/Patchlevel Sun, 14 Apr 2002 21:52:21 -0500 dunemush (pennmush/5_Patchlevel 1.34 600)
***************
*** 1,2 ****
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.4p16
--- 1,2 ----
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.4p17
*** 1_7_4.244/CHANGES Sat, 16 Mar 2002 09:31:59 -0600 dunemush (pennmush/8_CHANGES 1.219.1.72.1.21 600)
--- 1_7_4.258(w)/CHANGES Sun, 14 Apr 2002 21:52:08 -0500 dunemush (pennmush/8_CHANGES 1.219.1.72.1.34 600)
***************
*** 18,23 ****
--- 18,58 ----
==========================================================================
+ 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_4.244/game/txt/hlp/pennvers.hlp Sun, 17 Mar 2002 13:17:29 -0600 dunemush (pennmush/12_pennvers.h 1.169.1.42.1.3.1.2.2.2.1.1.1.3.1.1 600)
--- 1_7_4.258(w)/game/txt/hlp/pennvers.hlp Sun, 14 Apr 2002 21:52:25 -0500 dunemush (pennmush/12_pennvers.h 1.169.1.42.1.3.1.2.2.2.1.1.1.3.1.1.1.2 600)
***************
*** 1,5 ****
& changes
! & 1.7.4p16
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.4p17
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,52 ----
A list of the patchlevels associated with each release can
be read in 'help patchlevels'.
+ 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
Minor changes:
***************
*** 5027,5033 ****
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.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
--- 5063,5069 ----
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.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
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_4.244/game/txt/hlp/penntop.hlp Mon, 04 Mar 2002 15:15:49 -0600 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1 600)
--- 1_7_4.258(w)/game/txt/hlp/penntop.hlp Sat, 06 Apr 2002 22:48:13 -0600 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.1 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
*** 1_7_4.244/game/txt/hlp/pennfunc.hlp Mon, 11 Mar 2002 18:20:47 -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.2 600)
--- 1_7_4.258(w)/game/txt/hlp/pennfunc.hlp Thu, 04 Apr 2002 15:04:09 -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.3 600)
***************
*** 788,793 ****
--- 788,796 ----
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)]
*** 1_7_4.244/game/txt/hlp/penncmd.hlp Sat, 16 Mar 2002 09:29:58 -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.1 600)
--- 1_7_4.258(w)/game/txt/hlp/penncmd.hlp Thu, 04 Apr 2002 15:20:52 -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.1.1.1.1.1 600)
***************
*** 2051,2058 ****
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
--- 2051,2058 ----
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
***************
*** 2061,2071 ****
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>]
--- 2061,2073 ----
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>]
***************
*** 3278,3289 ****
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
--- 3280,3293 ----
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_4.244/src/strutil.c Sat, 23 Feb 2002 14:40:55 -0600 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.7.2.1.1.2.1.1 660)
--- 1_7_4.258(w)/src/strutil.c Sun, 14 Apr 2002 21:52:43 -0500 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.7.2.1.1.2.1.1.1.1 660)
***************
*** 370,382 ****
APPEND_TO_BUF(maxlen);
}
!
int
safe_fill(x, n, buff, bp)
char x;
Size_t n;
char *buff;
char **bp;
{
Size_t blen;
int ret = 0;
--- 370,386 ----
APPEND_TO_BUF(maxlen);
}
! #ifdef CAN_NEWSTYLE
! int
! safe_fill(char x, Size_t n, char *buff, char **bp)
! #else
int
safe_fill(x, n, buff, bp)
char x;
Size_t n;
char *buff;
char **bp;
+ #endif
{
Size_t blen;
int ret = 0;
*** 1_7_4.244/src/set.c Sun, 10 Feb 2002 09:30:30 -0600 dunemush (pennmush/b/38_set.c 1.26.1.5.1.1.2.1 660)
--- 1_7_4.258(w)/src/set.c Sun, 14 Apr 2002 21:52:43 -0500 dunemush (pennmush/b/38_set.c 1.26.1.5.1.1.2.1.1.1 660)
***************
*** 988,994 ****
COMMAND (cmd_with) {
dbref what;
! what = match_thing(player, arg_left);
if (!GoodObject(what))
return;
--- 988,994 ----
COMMAND (cmd_with) {
dbref what;
! what = noisy_match_result(player, arg_left, NOTYPE, MAT_NEARBY);
if (!GoodObject(what))
return;
*** 1_7_4.244/src/player.c Mon, 13 Aug 2001 19:51:56 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.4 660)
--- 1_7_4.258(w)/src/player.c Sun, 14 Apr 2002 21:52:43 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.4.1.1 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_4.244/src/game.c Mon, 04 Mar 2002 15:15:49 -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.1 660)
--- 1_7_4.258(w)/src/game.c Sun, 14 Apr 2002 21:52:42 -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.1 660)
***************
*** 785,790 ****
--- 785,793 ----
}
#endif
+ if (panicdb)
+ db_close(f);
+
/* now do access file stuff */
read_access_file();
*** 1_7_4.244/src/funmisc.c Mon, 13 Aug 2001 19:51:56 -0500 dunemush (pennmush/c/14_funmisc.c 1.30 660)
--- 1_7_4.258(w)/src/funmisc.c Sun, 14 Apr 2002 21:52:42 -0500 dunemush (pennmush/c/14_funmisc.c 1.30.1.1.1.1 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
***************
*** 401,407 ****
p++;
/* Convert letters to soundex values, squash duplicates */
while (*q) {
! if (!isalpha(*q)) {
q++;
continue;
}
--- 401,407 ----
p++;
/* Convert letters to soundex values, squash duplicates */
while (*q) {
! if (!isalpha(*q) || !isascii(*q)) {
q++;
continue;
}
*** 1_7_4.244/src/funmath.c Tue, 20 Mar 2001 12:21:04 -0600 dunemush (pennmush/c/15_funmath.c 1.39 660)
--- 1_7_4.258(w)/src/funmath.c Sun, 14 Apr 2002 21:52:42 -0500 dunemush (pennmush/c/15_funmath.c 1.39.1.1 660)
***************
*** 200,212 ****
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] + strlen(args[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]) {
--- 200,222 ----
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] + strlen(args[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]) {
***************
*** 232,244 ****
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] + strlen(args[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]) {
--- 242,264 ----
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] + strlen(args[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_4.244/src/funlist.c Thu, 28 Feb 2002 23:07:29 -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.2 660)
--- 1_7_4.258(w)/src/funlist.c Sun, 14 Apr 2002 21:52:42 -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 660)
***************
*** 593,636 ****
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:
--- 593,627 ----
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:
***************
*** 787,792 ****
--- 778,794 ----
}
}
+ 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[];
***************
*** 816,822 ****
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++)
--- 818,824 ----
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++)
***************
*** 1984,1993 ****
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);
--- 1986,1991 ----
***************
*** 1997,2002 ****
--- 1995,2004 ----
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;
***************
*** 2136,2142 ****
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;
--- 2138,2144 ----
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;
***************
*** 2200,2206 ****
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;
--- 2202,2208 ----
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;
***************
*** 2269,2275 ****
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;
--- 2271,2277 ----
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_4.244/src/extchat.c Sat, 05 Jan 2002 08:36:48 -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.1 660)
--- 1_7_4.258(w)/src/extchat.c Sun, 14 Apr 2002 21:52:42 -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 660)
***************
*** 1527,1532 ****
--- 1527,1533 ----
{
CHAN *c = NULL;
CHANUSER *u;
+ char *scan;
if (!name || !*name) {
notify(player, T("You must specify a channel."));
***************
*** 1535,1540 ****
--- 1536,1548 ----
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_4.244/src/create.c Sat, 23 Feb 2002 14:40:55 -0600 dunemush (pennmush/c/27_create.c 1.27.1.3.1.1.1.1.1.1.1.2 660)
--- 1_7_4.258(w)/src/create.c Sun, 14 Apr 2002 21:52:41 -0500 dunemush (pennmush/c/27_create.c 1.27.1.3.1.1.1.1.1.1.1.2.1.1 660)
***************
*** 173,182 ****
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]));
}
}
--- 173,182 ----
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_4.244/src/bsd.c Thu, 07 Mar 2002 15:45:58 -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.3 660)
--- 1_7_4.258(w)/src/bsd.c Sun, 14 Apr 2002 21:52:41 -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 660)
***************
*** 1104,1114 ****
return messages[type].message;
messages[type].made = 1;
- #ifdef macintosh
- p = (unsigned char *) message;
- #else
p = message;
- #endif
o = tbuf;
t = o;
--- 1104,1110 ----
***************
*** 3654,3661 ****
notify(player, T("Your HAVEN flag is set. You cannot receive pages."));
#ifdef VACATION_FLAG
if (Vacation(player)) {
! notify(player, T("Welcome back from vacation!"));
! set_flag(player, player, (char *) "ON-VACATION", 1, 0, 0);
}
#endif
local_connect(player, isnew, num);
--- 3650,3658 ----
notify(player, T("Your HAVEN flag is set. You cannot receive pages."));
#ifdef VACATION_FLAG
if (Vacation(player)) {
! notify(player,
! T
! ("Welcome back from vacation! Don't forget to unset your ON-VACATION flag"));
}
#endif
local_connect(player, isnew, num);
*** 1_7_4.244/hdrs/version.h Mon, 11 Mar 2002 18:21:52 -0600 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.1.1.5 660)
--- 1_7_4.258(w)/hdrs/version.h Sun, 14 Apr 2002 21:52:44 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.1.1.5 660)
***************
*** 1,2 ****
! #define VERSION "PennMUSH version 1.7.4 patchlevel 16 [03/11/2002]"
! #define SHORTVN "PennMUSH 1.7.4p16"
--- 1,2 ----
! #define VERSION "PennMUSH version 1.7.4 patchlevel 17 [04/14/2002]"
! #define SHORTVN "PennMUSH 1.7.4p17"
*** 1_7_4.244/src/timer.c Mon, 11 Mar 2002 09:34:10 -0600 dunemush (pennmush/b/29_timer.c 1.28 660)
--- 1_7_4.260(w)/src/timer.c Mon, 15 Apr 2002 21:37:36 -0500 dunemush (pennmush/b/29_timer.c 1.29.1.1 660)
***************
*** 29,34 ****
--- 29,35 ----
#include "conf.h"
#include "match.h"
#include "externs.h"
+ #include "flags.h"
#include "access.h"
#ifdef MEM_CHECK
#include "memcheck.h"
***************
*** 151,156 ****
--- 152,162 ----
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) {