[PENNMUSH-ANNOUNCE] 1.7.4-patch02
dunemush@pennmush.org
dunemush at pennmush.org
Thu, 5 Apr 2001 11:10:34 -0500
This is patch02 to PennMUSH 1.7.4. After applying this patch, you will
have version 1.7.4p2
To apply this patch, save it to a file in your top-level MUSH directory,
and do the following:
patch -p1 < 1.7.4-patch02
re-run Configure
make update
make install
If you use GNU patch 2.2, you probably want the above to be 'patch -b -p1',
not just 'patch -p1'.
Then @shutdown and restart your MUSH.
- Alan/Javelin
In this patch:
Major changes:
* The object matching routines have been modified. Some things you may
notice:
* Ambiguous cases are more often reported as such (rather than you
getting one of the ambiguous matches arbitrarily).
* locate() now returns #-2 as promised. Reported by Jeff Ferrell.
* A few functions that used accept player names now require
the use of *playername to match the player (e.g. mail(), hidden()).
(This is generally more consistent).
Minor changes:
* @tr of a nonexistent attribute now reports that. Report by Matrim@M*U*S*H.
* TEL_OK is an alias for JUMP_OK. Suggested by Kyieren@M*U*S*H.
* Added 'help i18n' (aka help translation). Suggested by Kyieren@M*U*S*H.
* When you use 'teach' and, as a result, run the command you are teaching,
it is treated as if the command were run by a player from the socket --
that is, attribute sets are not evaluated. Suggested by Xyrxwyrth@M*U*S*H.
* See_All players can see all channels and their members, too.
Suggested by Oriens@Alexandria.
* When trying to join yourself to a channel, we only check channels
you're not on; when trying to leave a channel, we only check channels
that you are on. This is handy for disambiguating similar prefixes.
Suggested by Oriens@Alexandria.
* When you're following a leader and the leader moves, you're told that
that you're following them before you attempt to move. Suggested by
Oriens@Alexandria.
* @stats/table is no longer restricted.
Fixes:
* @grep/iprint produced highlighted strings matching the case you
gave, not the case actually found. Reported by Reagan@NF
* @search/lsearch by powers could sometimes get you the equivalent
flag-bit instead of power-bit. Reported by Reagan@NF
* Configure fix.
* hpux-gcc hint file now included.
* Nested ansi() broke again in p1. Fixed now. Reported by Intrevis@M*U*S*H
* Added Configure check for <netdb.h> to help Cygwin builds.
Reported by Xyrxwyrth@M*U*S*H.
* Help fix or two.
* Grammatical correction by Eratl@M*U*S*H in @boot/me error message.
* Cosmetics of @mail with folders > 9 improved. Reported by Bellemore@M*U*S*H
* One could be disconnected at the connect screen under some conditions
for no good reason. Reported by Oriens@Alexandria. [SW]
* Compile error when ROYALTY_FLAG not defined patched by Noltar@Korongil.
* Fixed infinite loop reported by Xyrxwyrth@M*U*S*H. [SW]
* It's no longer posible to connect to a GOING player.
Prereq: 1.7.4p1
*** 1_7_4.47/Patchlevel Mon, 12 Mar 2001 14:44:39 -0600 dunemush (pennmush/5_Patchlevel 1.19 600)
--- 1_7_4.72(w)/Patchlevel Fri, 23 Mar 2001 11:01:32 -0600 dunemush (pennmush/5_Patchlevel 1.20 600)
***************
*** 1,2 ****
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.4p1
--- 1,2 ----
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.4p2
*** 1_7_4.47/CHANGES Fri, 23 Mar 2001 10:25:52 -0600 dunemush (pennmush/8_CHANGES 1.180 600)
--- 1_7_4.72(w)/CHANGES Thu, 05 Apr 2001 11:06:28 -0500 dunemush (pennmush/8_CHANGES 1.196 600)
***************
*** 17,22 ****
--- 17,69 ----
==========================================================================
+ Version 1.7.4 patchlevel 2 March 23, 2001
+
+ Major changes:
+ * The object matching routines have been modified. Some things you may
+ notice:
+ * Ambiguous cases are more often reported as such (rather than you
+ getting one of the ambiguous matches arbitrarily).
+ * locate() now returns #-2 as promised. Reported by Jeff Ferrell.
+ * A few functions that used accept player names now require
+ the use of *playername to match the player (e.g. mail(), hidden()).
+ (This is generally more consistent).
+ Minor changes:
+ * @tr of a nonexistent attribute now reports that. Report by Matrim@M*U*S*H.
+ * TEL_OK is an alias for JUMP_OK. Suggested by Kyieren@M*U*S*H.
+ * Added 'help i18n' (aka help translation). Suggested by Kyieren@M*U*S*H.
+ * When you use 'teach' and, as a result, run the command you are teaching,
+ it is treated as if the command were run by a player from the socket --
+ that is, attribute sets are not evaluated. Suggested by Xyrxwyrth@M*U*S*H.
+ * See_All players can see all channels and their members, too.
+ Suggested by Oriens@Alexandria.
+ * When trying to join yourself to a channel, we only check channels
+ you're not on; when trying to leave a channel, we only check channels
+ that you are on. This is handy for disambiguating similar prefixes.
+ Suggested by Oriens@Alexandria.
+ * When you're following a leader and the leader moves, you're told that
+ that you're following them before you attempt to move. Suggested by
+ Oriens@Alexandria.
+ * @stats/table is no longer restricted.
+ Fixes:
+ * @grep/iprint produced highlighted strings matching the case you
+ gave, not the case actually found. Reported by Reagan@NF
+ * @search/lsearch by powers could sometimes get you the equivalent
+ flag-bit instead of power-bit. Reported by Reagan@NF
+ * Configure fix.
+ * hpux-gcc hint file now included.
+ * Nested ansi() broke again in p1. Fixed now. Reported by Intrevis@M*U*S*H
+ * Added Configure check for <netdb.h> to help Cygwin builds.
+ Reported by Xyrxwyrth@M*U*S*H.
+ * Help fix or two.
+ * Grammatical correction by Eratl@M*U*S*H in @boot/me error message.
+ * Cosmetics of @mail with folders > 9 improved. Reported by Bellemore@M*U*S*H
+ * One could be disconnected at the connect screen under some conditions
+ for no good reason. Reported by Oriens@Alexandria. [SW]
+ * Compile error when ROYALTY_FLAG not defined patched by Noltar@Korongil.
+ * Fixed infinite loop reported by Xyrxwyrth@M*U*S*H. [SW]
+ * It's no longer posible to connect to a GOING player.
+
Version 1.7.4 patchlevel 1 March 17, 2001
Minor changes:
*** 1_7_4.47/game/txt/hlp/pennvers.hlp Tue, 20 Mar 2001 14:58:17 -0600 dunemush (pennmush/12_pennvers.h 1.132 600)
--- 1_7_4.72(w)/game/txt/hlp/pennvers.hlp Thu, 05 Apr 2001 11:06:30 -0500 dunemush (pennmush/12_pennvers.h 1.145 600)
***************
*** 1,5 ****
& changes
! & 1.7.4p1
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.4p2
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,64 ----
A list of the patchlevels associated with each release can
be read in 'help patchlevels'.
+ Version 1.7.4 patchlevel 2 March 23, 2001
+
+ Major changes:
+ * The object matching routines have been modified. Some things you may
+ notice:
+ * Ambiguous cases are more often reported as such (rather than you
+ getting one of the ambiguous matches arbitrarily).
+ * locate() now returns #-2 as promised. Reported by Jeff Ferrell.
+ * A few functions that used accept player names now require
+ the use of *playername to match the player (e.g. mail(), hidden()).
+ (This is generally more consistent).
+ Minor changes:
+ * @tr of a nonexistent attribute now reports that. Report by Matrim@M*U*S*H.
+ * TEL_OK is an alias for JUMP_OK. Suggested by Kyieren@M*U*S*H.
+ * Added 'help i18n' (aka help translation). Suggested by Kyieren@M*U*S*H.
+ * When you use 'teach' and, as a result, run the command you are teaching,
+ it is treated as if the command were run by a player from the socket --
+ that is, attribute sets are not evaluated. Suggested by Xyrxwyrth@M*U*S*H.
+ * See_All players can see all channels and their members, too.
+ Suggested by Oriens@Alexandria.
+ * When trying to join yourself to a channel, we only check channels
+ you're not on; when trying to leave a channel, we only check channels
+ that you are on. This is handy for disambiguating similar prefixes.
+ Suggested by Oriens@Alexandria.
+ * When you're following a leader and the leader moves, you're told that
+ that you're following them before you attempt to move. Suggested by
+ Oriens@Alexandria.
+ * @stats/table is no longer restricted.
+ Fixes:
+ * @grep/iprint produced highlighted strings matching the case you
+ gave, not the case actually found. Reported by Reagan@NF
+ * @search/lsearch by powers could sometimes get you the equivalent
+ flag-bit instead of power-bit. Reported by Reagan@NF
+ * Configure fix.
+ * hpux-gcc hint file now included.
+ * Nested ansi() broke again in p1. Fixed now. Reported by Intrevis@M*U*S*H
+ * Added Configure check for <netdb.h> to help Cygwin builds.
+ Reported by Xyrxwyrth@M*U*S*H.
+ * Help fix or two.
+ * Grammatical correction by Eratl@M*U*S*H in @boot/me error message.
+ * Cosmetics of @mail with folders > 9 improved. Reported by Bellemore@M*U*S*H
+ * One could be disconnected at the connect screen under some conditions
+ for no good reason. Reported by Oriens@Alexandria. [SW]
+ * Compile error when ROYALTY_FLAG not defined patched by Noltar@Korongil.
+ * Fixed infinite loop reported by Xyrxwyrth@M*U*S*H. [SW]
+ * It's no longer posible to connect to a GOING player.
+
+ & 1.7.4p1
Version 1.7.4 patchlevel 1 March 17, 2001
Minor changes:
***************
*** 21,27 ****
Fixes:
* The restrict_command for rob has been removed from restrict.cnf
Reported by Kyieren@M*U*S*H.
! * Help fixes by Kyieren, rodregis, and Luke @ M*U*S*H, and Datron@SW2.
* stripansi() didn't correctly handle multiple ansi codes in
sequence. Reported by CU5@WCX.
* Linting for warnings in pcre. [SW]
--- 69,76 ----
Fixes:
* The restrict_command for rob has been removed from restrict.cnf
Reported by Kyieren@M*U*S*H.
! * Help fixes by Kyieren, rodregis, and Luke @ M*U*S*H, Datron@SW2,
! and Noltar@Korongil.
* stripansi() didn't correctly handle multiple ansi codes in
sequence. Reported by CU5@WCX.
* Linting for warnings in pcre. [SW]
***************
*** 4538,4544 ****
is configurable.
& patchlevels
! 1.7.4: 0, 1
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
--- 4587,4593 ----
is configurable.
& patchlevels
! 1.7.4: 0, 1, 2
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.47/game/txt/hlp/pennfunc.hlp Fri, 16 Mar 2001 17:15:01 -0600 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2 600)
--- 1_7_4.72(w)/game/txt/hlp/pennfunc.hlp Wed, 04 Apr 2001 13:10:50 -0500 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.3 600)
***************
*** 1066,1077 ****
--- 1066,1080 ----
& GRAB()
& REGRAB()
+ & REGRABI()
grab(<list>, <pattern>[, <delimiter>])
regrab(<list>, <regexp>[, <delimiter>])
+ regrabi(<list>, <regexp>[, <delimiter>])
This function returns the first word in list which matches the pattern.
For grab(), the pattern is specified as in match(); i.e., it
can contain wildcards. For regrab(), the pattern is a regular expression.
+ regrabi() is case-insensitive.
Basically, this is a much more efficient way to do:
extract(list, match(list, pattern, delimiter), 1) or
***************
*** 1079,1090 ****
& GRABALL()
& REGRABALL()
graball(<string>,<pattern>[,<delim>])
! graball(<string>,<regexp>[,<delim>])
! These functions work identically to the grab() and regrab() functions,
! save that they return all matches, not just the first: They return all
! words in the list <string> which match <pattern>.
If none match, an empty string is returned.
Examples:
--- 1082,1095 ----
& GRABALL()
& REGRABALL()
+ & REGRABALLI()
graball(<string>,<pattern>[,<delim>])
! regraball(<string>,<regexp>[,<delim>])
! regraballi(<string>,<regexp>[,<delim>])
! These functions work identically to the grab() and regrab()/regrabi()
! functions, save that they return all matches, not just the first: They
! return all words in the list <string> which match <pattern>.
If none match, an empty string is returned.
Examples:
***************
*** 1113,1119 ****
"special" characters will need to be escaped out. In grep(),
<pattern> is NOT wildcard matched.
! This function is case-sensitive. grepi() is a case-insensitive version.
& GREPI()
grepi(<object>,<attrs>,<pattern>)
regrepi(<object>,<attrs>,<regexp>)
--- 1118,1124 ----
"special" characters will need to be escaped out. In grep(),
<pattern> is NOT wildcard matched.
! These functions are case-sensitive. grepi()/regrepi() are case-insensitive.
& GREPI()
grepi(<object>,<attrs>,<pattern>)
regrepi(<object>,<attrs>,<regexp>)
***************
*** 2133,2142 ****
parent(<object>[, <new parent>])
This function returns the dbref number of an object's parent. You
! must control the object. The parent of a player is always #-1. If
! you specify a second argument, it tries to re-parent the object.
!
!
& PEMIT()
pemit(<object list>,<message>)
--- 2138,2146 ----
parent(<object>[, <new parent>])
This function returns the dbref number of an object's parent. You
! must be able to examine the object to do this.
! If you specify a second argument, it tries to re-parent the object.
! In this case, you must control the object.
& PEMIT()
pemit(<object list>,<message>)
*** 1_7_4.47/game/txt/hlp/pennflag.hlp Mon, 12 Mar 2001 14:44:39 -0600 dunemush (pennmush/17_pennflag.h 1.1.1.1.1.2.1.1.1.2.1.1.1.2.1.1 600)
--- 1_7_4.72(w)/game/txt/hlp/pennflag.hlp Wed, 28 Mar 2001 10:28:28 -0600 dunemush (pennmush/17_pennflag.h 1.1.1.1.1.2.1.1.1.2.1.1.1.2.1.1.2.1 600)
***************
*** 358,364 ****
RP system. Or they may not be compiled in. See @config for more
information.
& JUMP_OK
! Flag: JUMP_OK (rooms)
When a room is set JUMP_OK, then that room can be teleported into
by anyone. See @teleport.
--- 358,365 ----
RP system. Or they may not be compiled in. See @config for more
information.
& JUMP_OK
! & TEL_OK
! Flag: JUMP_OK (or TEL_OK) (rooms)
When a room is set JUMP_OK, then that room can be teleported into
by anyone. See @teleport.
*** 1_7_4.47/game/txt/hlp/penncmd.hlp Fri, 23 Feb 2001 12:19:03 -0600 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1 600)
--- 1_7_4.72(w)/game/txt/hlp/penncmd.hlp Fri, 23 Mar 2001 13:45:25 -0600 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.1 600)
***************
*** 3086,3093 ****
teach <command>
Shows <command> (unparsed) to others in your room and then causes
! you to execute <command> as if you'd typed it in. Useful for
! helping newbies:
> say To do a pose, use :<action>
You say "To do a pose, use :<action>"
--- 3086,3093 ----
teach <command>
Shows <command> (unparsed) to others in your room and then causes
! you to execute <command> as if you'd typed it in directly from
! the socket (even if you're an object). Useful for helping newbies:
> say To do a pose, use :<action>
You say "To do a pose, use :<action>"
*** 1_7_4.47/hints/solaris_2.sh Sat, 15 Apr 2000 10:56:00 -0500 dunemush (pennmush/b/4_solaris_2. 1.1 600)
--- 1_7_4.72(w)/hints/solaris_2.sh Mon, 26 Mar 2001 13:48:12 -0600 dunemush (pennmush/b/4_solaris_2. 1.2 600)
***************
*** 1,2 ****
ccflags="-DNO_SIGCONTEXT"
! libs="-lnsl -lsocket -lm -lc -lcrypt -lresolv"
--- 1,2 ----
ccflags="-DNO_SIGCONTEXT"
! libs="-lnsl -lsocket -lm -lc -lresolv"
*** 1_7_4.47/config_h.SH Wed, 14 Mar 2001 14:29:38 -0600 dunemush (pennmush/b/17_config_h.S 1.17.1.1 660)
--- 1_7_4.72(w)/config_h.SH Mon, 26 Mar 2001 15:53:04 -0600 dunemush (pennmush/b/17_config_h.S 1.17.1.2 660)
***************
*** 758,763 ****
--- 758,769 ----
*/
#$i_memory I_MEMORY /**/
+ /* I_NETDB:
+ * This symbol, if defined, indicates to the C program that it can
+ * include <errno.h>.
+ */
+ #$i_netdb I_NETDB /**/
+
/* I_SETJMP:
* This symbol, if defined, indicates to the C program that it can
* include <setjmp.h> and have things work right.
*** 1_7_4.47/src/wiz.c Sun, 25 Feb 2001 13:37:15 -0600 dunemush (pennmush/b/23_wiz.c 1.42 660)
--- 1_7_4.72(w)/src/wiz.c Thu, 05 Apr 2001 11:06:09 -0500 dunemush (pennmush/b/23_wiz.c 1.44 660)
***************
*** 806,812 ****
/* check for more errors */
if (!d) {
if (flag == 2)
! notify(player, T("None of your connections has been idle."));
else
notify(player, T("That player isn't connected!"));
} else if (d == cdesc) {
--- 806,812 ----
/* check for more errors */
if (!d) {
if (flag == 2)
! notify(player, T("None of your connections are idle."));
else
notify(player, T("That player isn't connected!"));
} else if (d == cdesc) {
***************
*** 1653,1658 ****
--- 1653,1659 ----
(*result)[nresults++] = (dbref) n;
}
}
+ break;
case S_FLAG:
for (n = low; n < high; n++) {
if ((restrict_owner == ANY_OWNER || Owner(n) == restrict_owner)
***************
*** 1672,1677 ****
--- 1673,1679 ----
(*result)[nresults++] = (dbref) n;
}
}
+ break;
}
return (int) nresults;
*** 1_7_4.47/src/strutil.c Mon, 12 Mar 2001 14:51:51 -0600 dunemush (pennmush/b/33_strutil.c 1.28.1.3 660)
--- 1_7_4.72(w)/src/strutil.c Thu, 05 Apr 2001 11:06:08 -0500 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.1 660)
***************
*** 700,710 ****
switch (*q) {
case ESC_CHAR:
/* Skip over ansi */
! while (*q && *q != 'm') q++;
break;
case TAG_START:
/* Skip over HTML */
! while (*q && *q != TAG_END) q++;
break;
default:
safe_chr(*q, buff, &bp);
--- 700,712 ----
switch (*q) {
case ESC_CHAR:
/* Skip over ansi */
! while (*q && *q != 'm')
! q++;
break;
case TAG_START:
/* Skip over HTML */
! while (*q && *q != TAG_END)
! q++;
break;
default:
safe_chr(*q, buff, &bp);
*** 1_7_4.47/src/speech.c Wed, 24 Jan 2001 16:56:43 -0600 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.6 660)
--- 1_7_4.72(w)/src/speech.c Thu, 05 Apr 2001 11:06:08 -0500 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7 660)
***************
*** 129,135 ****
tprintf(T("%s types --> %s%s%s"), spname(player),
ANSI_HILITE, tbuf1, ANSI_NORMAL));
strcpy(command, tbuf1); /* process_command is destructive */
! process_command(player, command, cause, 0);
recurse = 0; /* Ok, we can be called again safely */
}
--- 129,135 ----
tprintf(T("%s types --> %s%s%s"), spname(player),
ANSI_HILITE, tbuf1, ANSI_NORMAL));
strcpy(command, tbuf1); /* process_command is destructive */
! process_command(player, command, cause, 1);
recurse = 0; /* Ok, we can be called again safely */
}
*** 1_7_4.47/src/set.c Fri, 23 Feb 2001 12:19:03 -0600 dunemush (pennmush/b/38_set.c 1.24 660)
--- 1_7_4.72(w)/src/set.c Thu, 05 Apr 2001 11:06:08 -0500 dunemush (pennmush/b/38_set.c 1.25 660)
***************
*** 833,841 ****
for (a = 0; a < 10; a++)
wnxt[a] = argv[a + 1];
! charge_action(player, thing, upcasestr(s));
! if (!Quiet(player) && !Quiet(thing))
! notify(player, tprintf("%s - Triggered.", Name(thing)));
}
--- 833,844 ----
for (a = 0; a < 10; a++)
wnxt[a] = argv[a + 1];
! if (charge_action(player, thing, upcasestr(s))) {
! if (!Quiet(player) && !Quiet(thing))
! notify(player, tprintf("%s - Triggered.", Name(thing)));
! } else {
! notify(player, T("No such attribute."));
! }
}
*** 1_7_4.47/src/predicat.c Mon, 12 Feb 2001 16:29:23 -0600 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1 660)
--- 1_7_4.72(w)/src/predicat.c Thu, 05 Apr 2001 11:06:08 -0500 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1.1.3 660)
***************
*** 151,157 ****
return (eval_lock(player, thing, Basic_Lock));
}
! void
charge_action(player, thing, awhat)
dbref player;
dbref thing;
--- 151,158 ----
return (eval_lock(player, thing, Basic_Lock));
}
! /* 1.7.4p2: Return value changed from void to int */
! int
charge_action(player, thing, awhat)
dbref player;
dbref thing;
***************
*** 162,188 ****
int num;
if (!awhat || !*awhat)
! return;
/* check if object has # of charges */
b = atr_get_noparent(thing, "CHARGES");
if (!b) {
/* no charges set, just execute the action */
! queue_attribute(thing, awhat, player);
! return;
} else {
strcpy(tbuf2, uncompress(AL_STR(b)));
num = atoi(tbuf2);
if (num) {
/* charges left, decrement and execute */
! if (queue_attribute(thing, awhat, player))
(void) atr_add(thing, "CHARGES", tprintf("%d", num - 1),
Owner(b->creator), NOTHING);
! return;
} else {
/* no charges left, try to execute runout */
! (void) queue_attribute(thing, "RUNOUT", player);
}
}
}
--- 163,189 ----
int num;
if (!awhat || !*awhat)
! return 0;
/* check if object has # of charges */
b = atr_get_noparent(thing, "CHARGES");
if (!b) {
/* no charges set, just execute the action */
! return queue_attribute(thing, awhat, player);
} else {
strcpy(tbuf2, uncompress(AL_STR(b)));
num = atoi(tbuf2);
if (num) {
/* charges left, decrement and execute */
! int res;
! if ((res = queue_attribute(thing, awhat, player)))
(void) atr_add(thing, "CHARGES", tprintf("%d", num - 1),
Owner(b->creator), NOTHING);
! return res;
} else {
/* no charges left, try to execute runout */
! return queue_attribute(thing, "RUNOUT", player);
}
}
}
***************
*** 1016,1021 ****
--- 1017,1023 ----
int found;
char *s;
char tbuf1[BUFFER_LEN];
+ char buf[BUFFER_LEN];
char *tbp;
found = 0;
***************
*** 1026,1033 ****
if ((gh->insensitive && !strncasecmp(gh->lookfor, s, gh->len)) ||
(!gh->insensitive && !strncmp(gh->lookfor, s, gh->len))) {
found = 1;
! safe_format(tbuf1, &tbp, "%s%s%s", ANSI_HILITE, gh->lookfor, ANSI_NORMAL);
s += gh->len;
} else {
safe_chr(*s, tbuf1, &tbp);
s++;
--- 1028,1037 ----
if ((gh->insensitive && !strncasecmp(gh->lookfor, s, gh->len)) ||
(!gh->insensitive && !strncmp(gh->lookfor, s, gh->len))) {
found = 1;
! strncpy(buf, s, gh->len);
! buf[gh->len] = '\0';
s += gh->len;
+ safe_format(tbuf1, &tbp, "%s%s%s", ANSI_HILITE, buf, ANSI_NORMAL);
} else {
safe_chr(*s, tbuf1, &tbp);
s++;
*** 1_7_4.47/src/player.c Sun, 25 Feb 2001 13:37:15 -0600 dunemush (pennmush/b/47_player.c 1.15.1.1 660)
--- 1_7_4.72(w)/src/player.c Thu, 05 Apr 2001 11:06:08 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1 660)
***************
*** 124,129 ****
--- 124,135 ----
return NOTHING;
/* See if player is allowed to connect like this */
+ if (Going(player) || Going_Twice(player)) {
+ do_log(LT_CONN, 0, 0,
+ T("Connection to GOING player %s not allowed from %s (%s)"), name,
+ host, ip);
+ return NOTHING;
+ }
if (Guest(player) && (!Site_Can_Guest(host) || !Site_Can_Guest(ip))) {
if (!Deny_Silent_Site(host, AMBIGUOUS) && !Deny_Silent_Site(ip, AMBIGUOUS)) {
do_log(LT_CONN, 0, 0,
*** 1_7_4.47/src/move.c Sat, 06 Jan 2001 12:01:09 -0600 dunemush (pennmush/b/51_move.c 1.1.1.18.1.5.1.13 660)
--- 1_7_4.72(w)/src/move.c Thu, 05 Apr 2001 11:06:08 -0500 dunemush (pennmush/b/51_move.c 1.1.1.18.1.5.1.13.1.2 660)
***************
*** 785,796 ****
}
/* Are we already following them? */
if (is_following(player, leader)) {
! notify(player, T("You're already following them."));
return;
}
/* Ok, are we allowed to follow them? */
if (!eval_lock(player, leader, Follow_Lock)) {
! notify(player, T("You're not allowed to follow them."));
return;
}
/* Ok, looks good */
--- 785,797 ----
}
/* Are we already following them? */
if (is_following(player, leader)) {
! notify_format(player, T("You're already following %s."), Name(leader));
return;
}
/* Ok, are we allowed to follow them? */
if (!eval_lock(player, leader, Follow_Lock)) {
! notify_format(player, T("You're not allowed to follow %s."),
! Name(leader));
return;
}
/* Ok, looks good */
***************
*** 821,827 ****
}
/* Are we following them? */
if (!is_following(player, leader)) {
! notify(player, T("You're not following that person."));
return;
}
/* Ok, looks good */
--- 822,828 ----
}
/* Are we following them? */
if (!is_following(player, leader)) {
! notify_format(player, T("You're not following %s"), Name(leader));
return;
}
/* Ok, looks good */
***************
*** 1124,1129 ****
--- 1125,1131 ----
(!(DarkLegal(leader) || (Dark(Location(follower)) && !Light(leader))) ||
See_All(follower))) {
/* This is a follower who was in the room with the leader. Follow. */
+ notify_format(follower, T("You follow %s."), Name(leader));
process_command(follower, com, follower, 0);
}
}
*** 1_7_4.47/src/match.c Wed, 06 Sep 2000 20:09:35 -0500 dunemush (pennmush/c/2_match.c 1.14 660)
--- 1_7_4.72(w)/src/match.c Thu, 05 Apr 2001 11:06:08 -0500 dunemush (pennmush/c/2_match.c 1.17 660)
***************
*** 85,91 ****
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));
static dbref match_remote_contents _((const dbref who, const char *name,
const int type, const long int flags,
dbref *last_match, int *match_count));
--- 85,92 ----
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));
***************
*** 95,101 ****
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));
--- 96,103 ----
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));
***************
*** 215,258 ****
if (flags & MAT_POSSESSION) {
match = choose_thing(who, type, flags, match,
match_possession(who, name, type, flags,
! &last_match, &match_count));
}
- if (GoodObject(match))
- return match;
if (flags & MAT_EXIT) {
! match = match_exit(who, name, type, flags);
! if (GoodObject(match))
! return match;
}
- /* Miscellaneous ones */
if (flags & MAT_CONTAINER) {
! match = match_container(who, name, type, flags, &last_match, &match_count);
}
if (flags & MAT_CARRIED_EXIT) {
! match = match_exit_internal(who, name, type, flags, who);
}
if ((flags & MAT_ENGLISH) && (!GoodObject(match))) {
match = match_english(who, name, type, flags);
}
- /* If we've got an exact match, we'll return it */
- if (GoodObject(match))
- return match;
-
- /* If it's a last_match_result, just return last_match */
- if (flags & MAT_LAST)
- return last_match;
-
/* Set up the default match_result behavior */
switch (match_count) {
case 0:
! match = NOTHING;
break;
case 1:
! match = last_match;
break;
default:
! match = AMBIGUOUS;
break;
}
--- 217,259 ----
if (flags & MAT_POSSESSION) {
match = choose_thing(who, type, flags, match,
match_possession(who, name, type, flags,
! &last_match, &match_count),
! &match_count);
}
if (flags & MAT_EXIT) {
! match = choose_thing(who, type, flags, match,
! match_exit(who, name, type, flags), &match_count);
}
if (flags & MAT_CONTAINER) {
! match = choose_thing(who, type, flags, match,
! match_container(who, name, type, flags, &last_match,
! &match_count), &match_count);
}
if (flags & MAT_CARRIED_EXIT) {
! match = choose_thing(who, type, flags, match,
! match_exit_internal(who, name, type, flags, who,
! &match_count), &match_count);
}
if ((flags & MAT_ENGLISH) && (!GoodObject(match))) {
match = match_english(who, name, type, flags);
}
/* Set up the default match_result behavior */
+ /* If we already have an exact match, it's in match */
switch (match_count) {
case 0:
! if (!GoodObject(match))
! match = NOTHING;
break;
case 1:
! if (!GoodObject(match))
! match = last_match;
break;
default:
! if (flags & MAT_LAST)
! match = last_match;
! else
! match = AMBIGUOUS;
break;
}
***************
*** 343,351 ****
return first;
} else if (!strcasecmp(Name(first), match_name)) {
/* if there are multiple exact matches, randomly choose one */
! the_match = choose_thing(match_who, type, flags, the_match, first);
} else if (GoodObject(alias_match) && (alias_match == first)) {
! the_match = choose_thing(match_who, type, flags, the_match, first);
} else if (string_match(Name(first), match_name)) {
*last_match = first;
*match_count += 1;
--- 344,354 ----
return first;
} else if (!strcasecmp(Name(first), match_name)) {
/* if there are multiple exact matches, randomly choose one */
! the_match =
! choose_thing(match_who, type, flags, the_match, first, match_count);
} else if (GoodObject(alias_match) && (alias_match == first)) {
! the_match =
! choose_thing(match_who, type, flags, the_match, first, match_count);
} else if (string_match(Name(first), match_name)) {
*last_match = first;
*match_count += 1;
***************
*** 397,418 ****
if (DO_GLOBALS) {
if (flags & MAT_REMOTES) {
if (GoodObject(loc))
! return match_exit_internal(who, name, type, flags, Zone(loc));
else
return NOTHING;
} else if (flags & MAT_GLOBAL)
! return match_exit_internal(who, name, type, flags, MASTER_ROOM);
}
! return match_exit_internal(who, name, type, flags, loc);
}
static dbref
! match_exit_internal(match_who, match_name, type, flags, loc)
const dbref match_who;
const char *match_name;
const int type;
const long int flags;
const dbref loc;
{
dbref exit_tmp;
dbref absolute;
--- 400,422 ----
if (DO_GLOBALS) {
if (flags & MAT_REMOTES) {
if (GoodObject(loc))
! return match_exit_internal(who, name, type, flags, Zone(loc), NULL);
else
return NOTHING;
} else if (flags & MAT_GLOBAL)
! return match_exit_internal(who, name, type, flags, MASTER_ROOM, NULL);
}
! return match_exit_internal(who, name, type, flags, loc, NULL);
}
static dbref
! match_exit_internal(match_who, match_name, type, flags, loc, match_count)
const dbref match_who;
const char *match_name;
const int type;
const long int flags;
const dbref loc;
+ int *match_count;
{
dbref exit_tmp;
dbref absolute;
***************
*** 445,451 ****
if (*match == '\0' || *match == EXIT_DELIMITER) {
/* we got it */
the_match =
! choose_thing(match_who, type, flags, the_match, exit_tmp);
goto next_exit;
}
}
--- 449,456 ----
if (*match == '\0' || *match == EXIT_DELIMITER) {
/* we got it */
the_match =
! choose_thing(match_who, type, flags, the_match, exit_tmp,
! match_count);
goto next_exit;
}
}
***************
*** 597,608 ****
}
static dbref
! choose_thing(match_who, preferred_type, flags, thing1, thing2)
const dbref match_who;
const int preferred_type;
long int flags;
dbref thing1;
dbref thing2;
{
int has1;
int has2;
--- 602,614 ----
}
static dbref
! choose_thing(match_who, preferred_type, flags, thing1, thing2, match_count)
const dbref match_who;
const int preferred_type;
long int flags;
dbref thing1;
dbref thing2;
+ int *match_count;
{
int has1;
int has2;
***************
*** 631,635 ****
--- 637,643 ----
}
/* else fall through */
}
+ if (match_count)
+ (*match_count)++;
return (get_random_long(0, 1) ? thing1 : thing2);
}
*** 1_7_4.47/src/game.c Wed, 14 Mar 2001 14:29:38 -0600 dunemush (pennmush/c/10_game.c 1.50.1.8.1.1.1.1 660)
--- 1_7_4.72(w)/src/game.c Thu, 05 Apr 2001 11:06:07 -0500 dunemush (pennmush/c/10_game.c 1.50.1.8.1.1.1.1.2.1 660)
***************
*** 299,306 ****
--- 299,310 ----
/* The dump failed. Disk might be full or something went bad with the
compression slave. Boo! */
do_rawlog(LT_ERR, T("ERROR! Database save failed."));
+ #ifdef ROYALTY_FLAG
flag_broadcast(WIZARD | ROYALTY, 0,
T("GAME: ERROR! Database save failed!"));
+ #else
+ flag_broadcast(WIZARD, 0, T("GAME: ERROR! Database save failed!"));
+ #endif
} else {
#endif
local_dump_database();
*** 1_7_4.47/src/funstr.c Thu, 15 Mar 2001 13:31:39 -0600 dunemush (pennmush/c/13_funstr.c 1.28.1.1.1.2 660)
--- 1_7_4.72(w)/src/funstr.c Thu, 05 Apr 2001 11:06:07 -0500 dunemush (pennmush/c/13_funstr.c 1.28.1.1.1.2.1.2 660)
***************
*** 515,521 ****
while (times) {
if (times & 1) {
if (safe_str(args[0], buff, bp) != 0)
! break;
}
safe_str(args[0], args[0], &ap);
*ap = '\0';
--- 515,521 ----
while (times) {
if (times & 1) {
if (safe_str(args[0], buff, bp) != 0)
! break;
}
safe_str(args[0], args[0], &ap);
*ap = '\0';
***************
*** 954,959 ****
--- 954,961 ----
FUNCTION(fun_ansi)
{
static char tbuff[BUFFER_LEN], slots[7];
+ static char sbuff[BUFFER_LEN], *sbp = sbuff;
+ char *old_sbp = sbp;
char const *arg0, *arg1;
char *tbp;
int j;
***************
*** 1010,1085 ****
for (j = 0; j < 7; j++) {
switch (slots[j]) {
case 'n': /* normal */
! safe_str(ANSI_NORMAL, buff, bp);
break;
case 'f': /* flash */
! safe_str(ANSI_BLINK, buff, bp);
break;
case 'h': /* hilite */
! safe_str(ANSI_HILITE, buff, bp);
break;
case 'i': /* inverse */
! safe_str(ANSI_INVERSE, buff, bp);
break;
case 'u': /* underscore */
! safe_str(ANSI_UNDERSCORE, buff, bp);
break;
case 'x': /* black fg */
! safe_str(ANSI_BLACK, buff, bp);
break;
case 'r': /* red fg */
! safe_str(ANSI_RED, buff, bp);
break;
case 'g': /* green fg */
! safe_str(ANSI_GREEN, buff, bp);
break;
case 'y': /* yellow fg */
! safe_str(ANSI_YELLOW, buff, bp);
break;
case 'b': /* blue fg */
! safe_str(ANSI_BLUE, buff, bp);
break;
case 'm': /* magenta fg */
! safe_str(ANSI_MAGENTA, buff, bp);
break;
case 'c': /* cyan fg */
! safe_str(ANSI_CYAN, buff, bp);
break;
case 'w': /* white fg */
! safe_str(ANSI_WHITE, buff, bp);
break;
case 'X': /* black bg */
! safe_str(ANSI_BBLACK, buff, bp);
break;
case 'R': /* red bg */
! safe_str(ANSI_BRED, buff, bp);
break;
case 'G': /* green bg */
! safe_str(ANSI_BGREEN, buff, bp);
break;
case 'Y': /* yellow bg */
! safe_str(ANSI_BYELLOW, buff, bp);
break;
case 'B': /* blue bg */
! safe_str(ANSI_BBLUE, buff, bp);
break;
case 'M': /* magenta bg */
! safe_str(ANSI_BMAGENTA, buff, bp);
break;
case 'C': /* cyan bg */
! safe_str(ANSI_BCYAN, buff, bp);
break;
case 'W': /* white bg */
! safe_str(ANSI_BWHITE, buff, bp);
break;
}
}
arg1 = args[1];
process_expression(buff, bp, &arg1, executor, caller, enactor,
PE_DEFAULT, PT_DEFAULT, pe_info);
safe_str(ANSI_NORMAL, buff, bp);
}
/* ARGSUSED */
--- 1012,1093 ----
for (j = 0; j < 7; j++) {
switch (slots[j]) {
case 'n': /* normal */
! safe_str(ANSI_NORMAL, sbuff, &sbp);
break;
case 'f': /* flash */
! safe_str(ANSI_BLINK, sbuff, &sbp);
break;
case 'h': /* hilite */
! safe_str(ANSI_HILITE, sbuff, &sbp);
break;
case 'i': /* inverse */
! safe_str(ANSI_INVERSE, sbuff, &sbp);
break;
case 'u': /* underscore */
! safe_str(ANSI_UNDERSCORE, sbuff, &sbp);
break;
case 'x': /* black fg */
! safe_str(ANSI_BLACK, sbuff, &sbp);
break;
case 'r': /* red fg */
! safe_str(ANSI_RED, sbuff, &sbp);
break;
case 'g': /* green fg */
! safe_str(ANSI_GREEN, sbuff, &sbp);
break;
case 'y': /* yellow fg */
! safe_str(ANSI_YELLOW, sbuff, &sbp);
break;
case 'b': /* blue fg */
! safe_str(ANSI_BLUE, sbuff, &sbp);
break;
case 'm': /* magenta fg */
! safe_str(ANSI_MAGENTA, sbuff, &sbp);
break;
case 'c': /* cyan fg */
! safe_str(ANSI_CYAN, sbuff, &sbp);
break;
case 'w': /* white fg */
! safe_str(ANSI_WHITE, sbuff, &sbp);
break;
case 'X': /* black bg */
! safe_str(ANSI_BBLACK, sbuff, &sbp);
break;
case 'R': /* red bg */
! safe_str(ANSI_BRED, sbuff, &sbp);
break;
case 'G': /* green bg */
! safe_str(ANSI_BGREEN, sbuff, &sbp);
break;
case 'Y': /* yellow bg */
! safe_str(ANSI_BYELLOW, sbuff, &sbp);
break;
case 'B': /* blue bg */
! safe_str(ANSI_BBLUE, sbuff, &sbp);
break;
case 'M': /* magenta bg */
! safe_str(ANSI_BMAGENTA, sbuff, &sbp);
break;
case 'C': /* cyan bg */
! safe_str(ANSI_BCYAN, sbuff, &sbp);
break;
case 'W': /* white bg */
! safe_str(ANSI_BWHITE, sbuff, &sbp);
break;
}
}
+ *sbp = 0;
+ safe_str(old_sbp, buff, bp);
arg1 = args[1];
process_expression(buff, bp, &arg1, executor, caller, enactor,
PE_DEFAULT, PT_DEFAULT, pe_info);
safe_str(ANSI_NORMAL, buff, bp);
+
+ sbp = old_sbp;
+ *sbp = 0;
+ safe_str(sbuff, buff, bp);
}
/* ARGSUSED */
*** 1_7_4.47/src/funlist.c Mon, 05 Mar 2001 12:11:07 -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 660)
--- 1_7_4.72(w)/src/funlist.c Thu, 05 Apr 2001 11:06:07 -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.1 660)
***************
*** 2459,2464 ****
--- 2459,2467 ----
}
start = args[0] + offsets[1];
match_offset = offsets[1];
+ /* Make sure we advance at least 1 char */
+ if (offsets[0] == match_offset)
+ match_offset++;
} while (all && (subpatterns =
pcre_exec(re, study, args[0], len, match_offset,
0, offsets, 99)) >= 0);
*** 1_7_4.47/src/flags.c Sun, 25 Feb 2001 13:37:15 -0600 dunemush (pennmush/c/20_flags.c 1.1.1.1.1.1.1.1.1.1.1.1.1.6.1.2.1.1.1.1.1.2.2.2 660)
--- 1_7_4.72(w)/src/flags.c Thu, 05 Apr 2001 11:06:07 -0500 dunemush (pennmush/c/20_flags.c 1.1.1.1.1.1.1.1.1.1.1.1.1.6.1.2.1.1.1.1.1.2.2.2.2.1 660)
***************
*** 423,428 ****
--- 423,431 ----
{"JUM", "JUMP_OK"},
{"JU", "JUMP_OK"},
{"J", "JUMP_OK"},
+ {"TEL_OK", "JUMP_OK"},
+ {"TELOK", "JUMP_OK"},
+ {"TEL-OK", "JUMP_OK"},
{"NO_TE", "NO_TEL"},
{"NO_T", "NO_TEL"},
{"Z_TE", "Z_TEL"},
*** 1_7_4.47/src/filecopy.c Tue, 06 Mar 2001 13:33:39 -0600 dunemush (pennmush/c/21_filecopy.c 1.74.1.6 660)
--- 1_7_4.72(w)/src/filecopy.c Thu, 05 Apr 2001 11:06:07 -0500 dunemush (pennmush/c/21_filecopy.c 1.74.1.11 660)
***************
*** 29,35 ****
static char buff[1024];
! BOOL ConcatenateFiles(const char *path, const char *outputfile)
{
HANDLE filscan;
WIN32_FIND_DATA fildata;
--- 29,36 ----
static char buff[1024];
! BOOL
! ConcatenateFiles(const char *path, const char *outputfile)
{
HANDLE filscan;
WIN32_FIND_DATA fildata;
*** 1_7_4.47/src/extmail.c Fri, 23 Feb 2001 12:19:03 -0600 dunemush (pennmush/c/22_extmail.c 1.43 660)
--- 1_7_4.72(w)/src/extmail.c Thu, 05 Apr 2001 11:06:07 -0500 dunemush (pennmush/c/22_extmail.c 1.44 660)
***************
*** 540,546 ****
notify(player,
tprintf
(T
! ("--------------------------- MAIL (folder %d) ------------------------------"),
folder));
for (mp = find_exact_starting_point(player); mp && (mp->to == player);
mp = mp->next) {
--- 540,546 ----
notify(player,
tprintf
(T
! ("--------------------------- MAIL (folder %2d) ------------------------------"),
folder));
for (mp = find_exact_starting_point(player); mp && (mp->to == player);
mp = mp->next) {
*** 1_7_4.47/src/extchat.c Mon, 26 Feb 2001 11:53:44 -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 660)
--- 1_7_4.72(w)/src/extchat.c Thu, 05 Apr 2001 11:06:07 -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.2 660)
***************
*** 65,72 ****
--- 65,76 ----
static int canstilladd _((dbref player));
static int find_channel_partial_on
_((const char *name, CHAN **chan, dbref player));
+ static int find_channel_partial_off
+ _((const char *name, CHAN **chan, dbref player));
static char *list_cflags _((CHAN *c));
static char *list_cuflags _((CHANUSER *u));
+ static void channel_join_self _((dbref player, const char *name));
+ static void channel_leave_self _((dbref player, const char *name));
#define YES 1
#define NO 0
***************
*** 732,737 ****
--- 736,777 ----
return CMATCH_AMBIG;
}
+ /* Given a name and a chan pointer, set chan pointer to point
+ * to channel if found and the player is NOT on it.
+ * If the channel is ambiguous, return the first match.
+ */
+ static int
+ find_channel_partial_off(name, chan, player)
+ const char *name;
+ CHAN **chan;
+ dbref player;
+ {
+ CHAN *p;
+ int count = 0;
+
+ *chan = NULL;
+ if (!name || !*name)
+ return CMATCH_NONE;
+ for (p = channels; p; p = p->next) {
+ if (!strcasecmp(name, ChanName(p))) {
+ *chan = p;
+ return CMATCH_EXACT;
+ }
+ if (string_prefix(ChanName(p), name) && !onchannel(player, p)) {
+ if (!*chan)
+ *chan = p;
+ count++;
+ }
+ }
+ switch (count) {
+ case 0:
+ return CMATCH_NONE;
+ case 1:
+ return CMATCH_PARTIAL;
+ }
+ return CMATCH_AMBIG;
+ }
+
/*--------------------------------------------------------------*
* User commands:
* do_channel - @channel/on,off,who
***************
*** 763,768 ****
--- 803,820 ----
notify(player, T("What do you want to do with that channel?"));
return;
}
+
+ /* Quickly catch two common cases and handle separately */
+ if (!target || !*target) {
+ if (!strcasecmp(com, "on") || !strcasecmp(com, "join")) {
+ channel_join_self(player, name);
+ return;
+ } else if (!strcasecmp(com, "off") || !strcasecmp(com, "leave")) {
+ channel_leave_self(player, name);
+ return;
+ }
+ }
+
test_channel(player, name, chan);
if (!Chan_Can_See(chan, player)) {
if (onchannel(player, chan))
***************
*** 884,889 ****
--- 936,1023 ----
} else {
notify(player, T("I don't understand what you want to do."));
return;
+ }
+ }
+
+ static void
+ channel_join_self(dbref player, const char *name)
+ {
+ CHAN *chan = NULL;
+ if (Guest(player)) {
+ notify(player, T("Guests are not allowed to join channels."));
+ return;
+ }
+ switch (find_channel_partial_off(name, &chan, player)) {
+ case CMATCH_NONE:
+ notify(player, T("CHAT: I don't recognize that channel."));
+ return;
+ case CMATCH_AMBIG:
+ notify(player, T("CHAT: I don't know which channel you mean."));
+ return;
+ }
+ if (!Chan_Can_See(chan, player)) {
+ notify(player, T("CHAT: I don't recognize that channel."));
+ return;
+ }
+ if (!Chan_Ok_Type(chan, player)) {
+ notify(player,
+ tprintf(T("Sorry, wrong type of thing for channel <%s>."),
+ ChanName(chan)));
+ return;
+ }
+ /* Does victim pass the joinlock? */
+ if (!Chan_Can_Join(chan, player)) {
+ if (Wizard(player)) {
+ /* Wizards can override join locks */
+ notify(player,
+ T
+ ("CHAT: Warning: You don't meet channel join permissions (joining anyway)"));
+ } else {
+ notify(player, T("Permission to join denied."));
+ return;
+ }
+ }
+ if (insert_user_by_dbref(player, chan)) {
+ notify(player, tprintf(T("CHAT: You join channel <%s>."), ChanName(chan)));
+ if (!Channel_Quiet(chan) && !DarkLegal(player))
+ channel_broadcast(chan, player, 1,
+ T("<%s> %s has joined this channel."), ChanName(chan),
+ Name(player));
+ ChanNumUsers(chan)++;
+ } else {
+ /* Should never happen */
+ notify(player,
+ tprintf(T("%s is already on channel <%s>."), Name(player),
+ ChanName(chan)));
+ }
+ }
+
+ static void
+ channel_leave_self(dbref player, const char *name)
+ {
+ CHAN *chan = NULL;
+ if (Guest(player)) {
+ notify(player, T("Guests are not allowed to leave channels."));
+ return;
+ }
+ switch (find_channel_partial_on(name, &chan, player)) {
+ case CMATCH_NONE:
+ notify(player, T("CHAT: I don't recognize that channel."));
+ return;
+ case CMATCH_AMBIG:
+ notify(player, T("CHAT: I don't know which channel you mean."));
+ return;
+ }
+ if (remove_user_by_dbref(player, chan)) {
+ if (!Channel_Quiet(chan) && !DarkLegal(player))
+ channel_broadcast(chan, player, 1,
+ T("<%s> %s has left this channel."), ChanName(chan),
+ Name(player));
+ notify(player, tprintf(T("CHAT: You leave channel <%s>."), ChanName(chan)));
+ } else {
+ /* Should never happen */
+ notify(player, tprintf(T("%s is not on channel <%s>."), Name(player),
+ ChanName(chan)));
}
}
*** 1_7_4.47/src/cmds.c Fri, 02 Mar 2001 10:50:52 -0600 dunemush (pennmush/c/37_cmds.c 1.33.1.1 660)
--- 1_7_4.72(w)/src/cmds.c Thu, 05 Apr 2001 11:06:06 -0500 dunemush (pennmush/c/37_cmds.c 1.33.1.1.1.1 660)
***************
*** 762,773 ****
}
COMMAND (cmd_stats) {
! if (SW_ISSET(sw, SWITCH_TABLES)) {
! if (Hasprivs(player))
! do_list_memstats(player);
! else
! notify(player, T("Just who do you think you are?"));
! } else
do_stats(player, arg_left);
}
--- 762,770 ----
}
COMMAND (cmd_stats) {
! if (SW_ISSET(sw, SWITCH_TABLES))
! do_list_memstats(player);
! else
do_stats(player, arg_left);
}
*** 1_7_4.47/src/bsd.c Tue, 06 Mar 2001 13:33:39 -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 660)
--- 1_7_4.72(w)/src/bsd.c Thu, 05 Apr 2001 11:06:06 -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.6 660)
***************
*** 430,436 ****
#endif /* HAS_GETRLIMIT */
#ifdef NT_TCP
! BOOL IsValidAddress(const void *lp, UINT nBytes, BOOL bReadWrite)
{
return (lp != NULL &&
!IsBadReadPtr(lp, nBytes) &&
--- 430,437 ----
#endif /* HAS_GETRLIMIT */
#ifdef NT_TCP
! BOOL
! IsValidAddress(const void *lp, UINT nBytes, BOOL bReadWrite)
{
return (lp != NULL &&
!IsBadReadPtr(lp, nBytes) &&
***************
*** 2484,2490 ****
d->raw_input = 0;
d->raw_input_at = 0;
d->quota = COMMAND_BURST_SIZE;
! d->last_time = 0;
d->cmds = 0;
d->hide = 0;
d->doing[0] = '\0';
--- 2485,2491 ----
d->raw_input = 0;
d->raw_input_at = 0;
d->quota = COMMAND_BURST_SIZE;
! d->last_time = mudtime;
d->cmds = 0;
d->hide = 0;
d->doing[0] = '\0';
***************
*** 2615,2621 ****
d->raw_input = 0;
d->raw_input_at = 0;
d->quota = COMMAND_BURST_SIZE;
! d->last_time = 0;
d->cmds = 0;
d->hide = 0;
d->doing[0] = '\0';
--- 2616,2622 ----
d->raw_input = 0;
d->raw_input_at = 0;
d->quota = COMMAND_BURST_SIZE;
! d->last_time = mudtime;
d->cmds = 0;
d->hide = 0;
d->doing[0] = '\0';
*** 1_7_4.47/hdrs/version.h Fri, 16 Mar 2001 17:19:49 -0600 dunemush (pennmush/c/47_version.h 1.32.1.2.1.2 660)
--- 1_7_4.72(w)/hdrs/version.h Thu, 05 Apr 2001 11:06:09 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.3 660)
***************
*** 1,2 ****
! #define VERSION "PennMUSH version 1.7.4 patchlevel 1 [03/17/2001]"
! #define SHORTVN "PennMUSH 1.7.4p1"
--- 1,2 ----
! #define VERSION "PennMUSH version 1.7.4 patchlevel 2 [03/23/2001]"
! #define SHORTVN "PennMUSH 1.7.4p2"
*** 1_7_4.47/hdrs/externs.h Sun, 11 Feb 2001 17:04:36 -0600 dunemush (pennmush/d/16_externs.h 1.1.1.53 660)
--- 1_7_4.72(w)/hdrs/externs.h Thu, 05 Apr 2001 11:06:09 -0500 dunemush (pennmush/d/16_externs.h 1.1.1.53.1.1 660)
***************
*** 241,247 ****
extern char *grep_util _((dbref player, dbref thing, char *pattern,
char *lookfor, int len, int insensitive));
extern dbref where_is _((dbref thing));
! void charge_action _((dbref player, dbref thing, const char *awhat));
dbref first_visible _((dbref player, dbref thing));
/* From set.c */
--- 241,247 ----
extern char *grep_util _((dbref player, dbref thing, char *pattern,
char *lookfor, int len, int insensitive));
extern dbref where_is _((dbref thing));
! extern int charge_action _((dbref player, dbref thing, const char *awhat));
dbref first_visible _((dbref player, dbref thing));
/* From set.c */
*** 1_7_4.47/hdrs/extchat.h Wed, 06 Sep 2000 20:09:35 -0500 dunemush (pennmush/d/17_extchat.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1 660)
--- 1_7_4.72(w)/hdrs/extchat.h Thu, 05 Apr 2001 11:06:09 -0500 dunemush (pennmush/d/17_extchat.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 660)
***************
*** 155,161 ****
(!Guest(p) && Chan_Can_Access(c,p) && \
(eval_boolexp(p,ChanModLock(c),p,0,"ChanModlock"))))
#define Chan_Can_See(c,p) \
! (Hasprivs(p) || (Chan_Can_Access(c,p) && \
(eval_boolexp(p,ChanSeeLock(c),p,0,"ChanSeelock"))))
#define Chan_Can_Hide(c,p) \
(Can_Hide(p) || (Channel_CanHide(c) && Chan_Can_Access(c,p) && \
--- 155,161 ----
(!Guest(p) && Chan_Can_Access(c,p) && \
(eval_boolexp(p,ChanModLock(c),p,0,"ChanModlock"))))
#define Chan_Can_See(c,p) \
! (Hasprivs(p) || See_All(p) || (Chan_Can_Access(c,p) && \
(eval_boolexp(p,ChanSeeLock(c),p,0,"ChanSeelock"))))
#define Chan_Can_Hide(c,p) \
(Can_Hide(p) || (Channel_CanHide(c) && Chan_Can_Access(c,p) && \
*** 1_7_4.47/Configure Thu, 15 Mar 2001 13:31:39 -0600 dunemush (pennmush/d/32_Configure 1.21.1.2 710)
--- 1_7_4.72(w)/Configure Mon, 26 Mar 2001 15:53:04 -0600 dunemush (pennmush/d/32_Configure 1.21.1.4 710)
***************
*** 357,362 ****
--- 357,363 ----
i_locale=''
i_malloc=''
i_memory=''
+ i_netdb=''
i_niin=''
i_sysin=''
i_setjmp=''
***************
*** 4027,4033 ****
dflt='4096'
case "$d_getpagsz" in
"$define")
! if $cc $ccflags page.c -o page $libs >/dev/null 2>&1; then
dflt=`./page`
guess=''
else
--- 4028,4034 ----
dflt='4096'
case "$d_getpagsz" in
"$define")
! if $cc $ccflags $ldflags page.c -o page $libs >/dev/null 2>&1; then
dflt=`./page`
guess=''
else
***************
*** 4035,4041 ****
fi
;;
*)
! if $cc $ccflags page.c -o page $libs -lPW >/dev/null 2>&1; then
dflt=`./page`
guess=''
echo "(For your eyes only: I used the getpagesize() from -lPW.)"
--- 4036,4042 ----
fi
;;
*)
! if $cc $ccflags $ldflags page.c -o page $libs -lPW >/dev/null 2>&1; then
dflt=`./page`
guess=''
echo "(For your eyes only: I used the getpagesize() from -lPW.)"
***************
*** 4049,4055 ****
printf("%d\n", PAGESIZE);
}
EOP
! if $cc $ccflags page.c -o page $libs >/dev/null 2>&1; then
dflt=`./page`
guess=''
echo "(Using value of PAGESIZE found in <sys/param.h>.)"
--- 4050,4056 ----
printf("%d\n", PAGESIZE);
}
EOP
! if $cc $ccflags $ldflags page.c -o page $libs >/dev/null 2>&1; then
dflt=`./page`
guess=''
echo "(Using value of PAGESIZE found in <sys/param.h>.)"
***************
*** 4070,4076 ****
printf("%d\n", res ? -1 : pgsize);
}
EOP
! if $cc $ccflags page.c -o page $libs >/dev/null 2>&1; then
dflt=`./page`
if $test $dflt -gt 0; then
guess=''
--- 4071,4077 ----
printf("%d\n", res ? -1 : pgsize);
}
EOP
! if $cc $ccflags $ldflags page.c -o page $libs >/dev/null 2>&1; then
dflt=`./page`
if $test $dflt -gt 0; then
guess=''
***************
*** 5650,5655 ****
--- 5651,5659 ----
set i_memory
eval $setvar
+ : see if netdb.h can be included
+ set netdb.h i_netdb
+ eval $inhdr
: see if setjmp.h can be included
set setjmp.h i_setjmp
eval $inhdr
***************
*** 6643,6648 ****
--- 6647,6653 ----
i_locale='$i_locale'
i_malloc='$i_malloc'
i_memory='$i_memory'
+ i_netdb='$i_netdb'
i_niin='$i_niin'
i_setjmp='$i_setjmp'
i_sgtty='$i_sgtty'
*** 1_7_4.47/options.h.dist Wed, 24 Jan 2001 16:56:43 -0600 dunemush (pennmush/d/33_options.h. 1.10.1.1.1.1.1.2.1.1 600)
--- 1_7_4.72(w)/options.h.dist Thu, 29 Mar 2001 15:44:40 -0600 dunemush (pennmush/d/33_options.h. 1.10.1.1.1.1.1.2.1.1.1.1 600)
***************
*** 4,10 ****
#define __OPTIONS_H
/* *********** READ THIS BEFORE YOU MODIFY ANYTHING IN THIS FILE *********** */
! /* WARNING: All options in this file have the ability to signifigantly change
* the look and feel and sometimes even internal behavior of the program.
* The ones shipped as the default have been extensively tested. Others have
* been tested to a (usually) lesser degree, and therefore might still have
--- 4,10 ----
#define __OPTIONS_H
/* *********** READ THIS BEFORE YOU MODIFY ANYTHING IN THIS FILE *********** */
! /* WARNING: All options in this file have the ability to significantly change
* the look and feel and sometimes even internal behavior of the program.
* The ones shipped as the default have been extensively tested. Others have
* been tested to a (usually) lesser degree, and therefore might still have
*** 1_7_4.47/MANIFEST Thu, 08 Feb 2001 23:01:41 -0600 dunemush (pennmush/d/34_MANIFEST 1.21 600)
--- 1_7_4.72(w)/MANIFEST Sat, 24 Mar 2001 12:12:17 -0600 dunemush (pennmush/d/34_MANIFEST 1.21.1.1 600)
***************
*** 131,136 ****
--- 131,137 ----
hints/dec_osf.sh
hints/freebsd.sh
hints/hpux.sh
+ hints/hpux-gcc.sh
hints/irix.sh
hints/linux_2.sh
hints/next.sh
*** 1_7_4.47/src/pcre.c Wed, 14 Mar 2001 14:29:38 -0600 dunemush (pennmush/d/36_pcre.c 1.4.1.3.1.3.1.1.1.1 660)
--- 1_7_4.72(w)/src/pcre.c Thu, 05 Apr 2001 11:06:08 -0500 dunemush (pennmush/d/36_pcre.c 1.4.1.3.1.3.1.1.1.1.1.1 660)
***************
*** 5110,5185 ****
BOOL anchored = ((re->options | options) & PCRE_ANCHORED) != 0;
BOOL startline = (re->options & PCRE_STARTLINE) != 0;
! if ((options & ~PUBLIC_EXEC_OPTIONS) != 0)
! return PCRE_ERROR_BADOPTION;
! if (re == NULL || subject == NULL || (offsets == NULL && offsetcount > 0))
! return PCRE_ERROR_NULL;
! if (re->magic_number != MAGIC_NUMBER)
! return PCRE_ERROR_BADMAGIC;
!
! match_block.start_pattern = re->code;
! match_block.start_subject = (const uschar *) subject;
! match_block.end_subject = match_block.start_subject + length;
! end_subject = match_block.end_subject;
!
! match_block.endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;
! match_block.utf8 = (re->options & PCRE_UTF8) != 0;
!
! match_block.notbol = (options & PCRE_NOTBOL) != 0;
! match_block.noteol = (options & PCRE_NOTEOL) != 0;
! match_block.notempty = (options & PCRE_NOTEMPTY) != 0;
! match_block.errorcode = PCRE_ERROR_NOMATCH; /* Default error */
! match_block.lcc = re->tables + lcc_offset;
! match_block.ctypes = re->tables + ctypes_offset;
/* The ims options can vary during the matching as a result of the presence
of (?ims) items in the pattern. They are kept in a local variable so that
restoring at the exit of a group is easy. */
! ims = re->options & (PCRE_CASELESS | PCRE_MULTILINE | PCRE_DOTALL);
/* If the expression has got more back references than the offsets supplied can
hold, we get a temporary bit of working store to use during the matching.
Otherwise, we can use the vector supplied, rounding down its size to a multiple
of 3. */
! ocount = offsetcount - (offsetcount % 3);
! if (re->top_backref > 0 && re->top_backref >= ocount / 3) {
! ocount = re->top_backref * 3 + 3;
! match_block.offset_vector = (int *) malloc(ocount * sizeof(int));
! if (match_block.offset_vector == NULL)
! return PCRE_ERROR_NOMEMORY;
! using_temporary_offsets = TRUE;
! DPRINTF(("Got memory to hold back references\n"));
! } else
! match_block.offset_vector = offsets;
!
! match_block.offset_end = ocount;
! match_block.offset_max = (2 * ocount) / 3;
! match_block.offset_overflow = FALSE;
/* Compute the minimum number of offsets that we need to reset each time. Doing
this makes a huge difference to execution time when there aren't many brackets
in the pattern. */
! resetcount = 2 + re->top_bracket * 2;
! if (resetcount > offsetcount)
! resetcount = ocount;
/* Reset the working variable associated with each extraction. These should
never be used unless previously set, but they get saved and restored, and so we
initialize them to avoid reading uninitialized locations. */
! if (match_block.offset_vector != NULL) {
! register int *iptr = match_block.offset_vector + ocount;
! register int *iend = iptr - resetcount / 2 + 1;
! while (--iptr >= iend)
! *iptr = -1;
! }
/* Set up the first character to match, if available. The first_char value is
never set for an anchored regular expression, but the anchoring may be forced
--- 5110,5185 ----
BOOL anchored = ((re->options | options) & PCRE_ANCHORED) != 0;
BOOL startline = (re->options & PCRE_STARTLINE) != 0;
! if ((options & ~PUBLIC_EXEC_OPTIONS) != 0)
! return PCRE_ERROR_BADOPTION;
! if (re == NULL || subject == NULL || (offsets == NULL && offsetcount > 0))
! return PCRE_ERROR_NULL;
! if (re->magic_number != MAGIC_NUMBER)
! return PCRE_ERROR_BADMAGIC;
!
! match_block.start_pattern = re->code;
! match_block.start_subject = (const uschar *) subject;
! match_block.end_subject = match_block.start_subject + length;
! end_subject = match_block.end_subject;
!
! match_block.endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;
! match_block.utf8 = (re->options & PCRE_UTF8) != 0;
!
! match_block.notbol = (options & PCRE_NOTBOL) != 0;
! match_block.noteol = (options & PCRE_NOTEOL) != 0;
! match_block.notempty = (options & PCRE_NOTEMPTY) != 0;
! match_block.errorcode = PCRE_ERROR_NOMATCH; /* Default error */
! match_block.lcc = re->tables + lcc_offset;
! match_block.ctypes = re->tables + ctypes_offset;
/* The ims options can vary during the matching as a result of the presence
of (?ims) items in the pattern. They are kept in a local variable so that
restoring at the exit of a group is easy. */
! ims = re->options & (PCRE_CASELESS | PCRE_MULTILINE | PCRE_DOTALL);
/* If the expression has got more back references than the offsets supplied can
hold, we get a temporary bit of working store to use during the matching.
Otherwise, we can use the vector supplied, rounding down its size to a multiple
of 3. */
! ocount = offsetcount - (offsetcount % 3);
! if (re->top_backref > 0 && re->top_backref >= ocount / 3) {
! ocount = re->top_backref * 3 + 3;
! match_block.offset_vector = (int *) malloc(ocount * sizeof(int));
! if (match_block.offset_vector == NULL)
! return PCRE_ERROR_NOMEMORY;
! using_temporary_offsets = TRUE;
! DPRINTF(("Got memory to hold back references\n"));
! } else
! match_block.offset_vector = offsets;
!
! match_block.offset_end = ocount;
! match_block.offset_max = (2 * ocount) / 3;
! match_block.offset_overflow = FALSE;
/* Compute the minimum number of offsets that we need to reset each time. Doing
this makes a huge difference to execution time when there aren't many brackets
in the pattern. */
! resetcount = 2 + re->top_bracket * 2;
! if (resetcount > offsetcount)
! resetcount = ocount;
/* Reset the working variable associated with each extraction. These should
never be used unless previously set, but they get saved and restored, and so we
initialize them to avoid reading uninitialized locations. */
! if (match_block.offset_vector != NULL) {
! register int *iptr = match_block.offset_vector + ocount;
! register int *iend = iptr - resetcount / 2 + 1;
! while (--iptr >= iend)
! *iptr = -1;
! }
/* Set up the first character to match, if available. The first_char value is
never set for an anchored regular expression, but the anchoring may be forced
***************
*** 5187,5203 ****
an unanchored pattern, of course. If there's no first char and the pattern was
studied, there may be a bitmap of possible first characters. */
! if (!anchored) {
! if ((re->options & PCRE_FIRSTSET) != 0) {
! first_char = re->first_char;
! if ((ims & PCRE_CASELESS) != 0)
! first_char = match_block.lcc[first_char];
}
- else
- if (!startline && extra != NULL &&
- (extra->options & PCRE_STUDY_MAPPED) != 0)
- start_bits = extra->start_bits;
- }
/* For anchored or unanchored matches, there may be a "last known required
character" set. If the PCRE_CASELESS is set, implying that the match starts
--- 5187,5203 ----
an unanchored pattern, of course. If there's no first char and the pattern was
studied, there may be a bitmap of possible first characters. */
! if (!anchored) {
! if ((re->options & PCRE_FIRSTSET) != 0) {
! first_char = re->first_char;
! if ((ims & PCRE_CASELESS) != 0)
! first_char = match_block.lcc[first_char];
! }
! else
! if (!startline && extra != NULL &&
! (extra->options & PCRE_STUDY_MAPPED) != 0)
! start_bits = extra->start_bits;
}
/* For anchored or unanchored matches, there may be a "last known required
character" set. If the PCRE_CASELESS is set, implying that the match starts
***************
*** 5207,5374 ****
majority of cases. It will be suboptimal when the case flag changes in a regex
and the required character in fact is caseful. */
! if ((re->options & PCRE_REQCHSET) != 0) {
! req_char = re->req_char;
! req_char2 = ((re->options & (PCRE_CASELESS | PCRE_ICHANGED)) != 0) ?
! (re->tables + fcc_offset)[req_char] : req_char;
! }
/* Loop for handling unanchored repeated matching attempts; for anchored regexs
the loop runs just once. */
! do {
! int rc;
! register int *iptr = match_block.offset_vector;
! register int *iend = iptr + resetcount;
!
! /* Reset the maximum number of extractions we might see. */
!
! while (iptr < iend)
! *iptr++ = -1;
!
! /* Advance to a unique first char if possible */
!
! if (first_char >= 0) {
! if ((ims & PCRE_CASELESS) != 0)
! while (start_match < end_subject &&
! match_block.lcc[*start_match] != first_char) start_match++;
! else
! while (start_match < end_subject && *start_match != first_char)
! start_match++;
! }
! /* Or to just after \n for a multiline match if possible */
! else if (startline) {
! if (start_match > match_block.start_subject + start_offset) {
! while (start_match < end_subject && start_match[-1] != '\n')
! start_match++;
}
- }
! /* Or to a non-unique first char after study */
! else if (start_bits != NULL) {
! while (start_match < end_subject) {
! register int c = *start_match;
! if ((start_bits[c / 8] & (1 << (c & 7))) == 0)
! start_match++;
! else
! break;
}
- }
#ifdef DEBUG /* Sigh. Some compilers never learn. */
! printf(">>>> Match against: ");
! pchars(start_match, end_subject - start_match, TRUE, &match_block);
! printf("\n");
#endif
! /* If req_char is set, we know that that character must appear in the subject
! for the match to succeed. If the first character is set, req_char must be
! later in the subject; otherwise the test starts at the match point. This
! optimization can save a huge amount of backtracking in patterns with nested
! unlimited repeats that aren't going to match. We don't know what the state of
! case matching may be when this character is hit, so test for it in both its
! cases if necessary. However, the different cased versions will not be set up
! unless PCRE_CASELESS was given or the casing state changes within the regex.
! Writing separate code makes it go faster, as does using an autoincrement and
! backing off on a match. */
!
! if (req_char >= 0) {
! register const uschar *p = start_match + ((first_char >= 0) ? 1 : 0);
!
! /* We don't need to repeat the search if we haven't yet reached the
! place we found it at last time. */
!
! if (p > req_char_ptr) {
! /* Do a single test if no case difference is set up */
!
! if (req_char == req_char2) {
! while (p < end_subject) {
! if (*p++ == req_char) {
! p--;
! break;
}
}
- }
! /* Otherwise test for either case */
! else {
! while (p < end_subject) {
! register int pp = *p++;
! if (pp == req_char || pp == req_char2) {
! p--;
! break;
}
}
- }
! /* If we can't find the required character, break the matching loop */
! if (p >= end_subject)
! break;
! /* If we have found the required character, save the point where we
! found it, so that we don't search again next time round the loop if
! the start hasn't passed this character yet. */
! req_char_ptr = p;
}
- }
-
- /* When a match occurs, substrings will be set for all internal extractions;
- we just need to set up the whole thing as substring 0 before returning. If
- there were too many extractions, set the return code to zero. In the case
- where we had to get some local store to hold offsets for backreferences, copy
- those back references that we can. In this case there need not be overflow
- if certain parts of the pattern were not used. */
-
- match_block.start_match = start_match;
- if (!match
- (start_match, re->code, 2, &match_block, ims, NULL,
- match_isgroup)) continue;
! /* Copy the offset information from temporary store if necessary */
! if (using_temporary_offsets) {
! if (offsetcount >= 4) {
! memcpy(offsets + 2, match_block.offset_vector + 2,
! (offsetcount - 2) * sizeof(int));
! DPRINTF(("Copied offsets from temporary memory\n"));
}
- if (match_block.end_offset_top > offsetcount)
- match_block.offset_overflow = TRUE;
! DPRINTF(("Freeing temporary memory\n"));
! free(match_block.offset_vector);
! }
! rc = match_block.offset_overflow ? 0 : match_block.end_offset_top / 2;
! if (match_block.offset_end < 2)
! rc = 0;
! else {
! offsets[0] = start_match - match_block.start_subject;
! offsets[1] = match_block.end_match_ptr - match_block.start_subject;
}
- DPRINTF((">>>> returning %d\n", rc));
- return rc;
- }
-
/* This "while" is the end of the "do" above */
! while (!anchored &&
! match_block.errorcode == PCRE_ERROR_NOMATCH &&
! start_match++ < end_subject);
!
! if (using_temporary_offsets) {
! DPRINTF(("Freeing temporary memory\n"));
! free(match_block.offset_vector);
! }
! DPRINTF((">>>> returning %d\n", match_block.errorcode));
}
--- 5207,5374 ----
majority of cases. It will be suboptimal when the case flag changes in a regex
and the required character in fact is caseful. */
! if ((re->options & PCRE_REQCHSET) != 0) {
! req_char = re->req_char;
! req_char2 = ((re->options & (PCRE_CASELESS | PCRE_ICHANGED)) != 0) ?
! (re->tables + fcc_offset)[req_char] : req_char;
! }
/* Loop for handling unanchored repeated matching attempts; for anchored regexs
the loop runs just once. */
! do {
! int rc;
! register int *iptr = match_block.offset_vector;
! register int *iend = iptr + resetcount;
!
! /* Reset the maximum number of extractions we might see. */
!
! while (iptr < iend)
! *iptr++ = -1;
!
! /* Advance to a unique first char if possible */
!
! if (first_char >= 0) {
! if ((ims & PCRE_CASELESS) != 0)
! while (start_match < end_subject &&
! match_block.lcc[*start_match] != first_char) start_match++;
! else
! while (start_match < end_subject && *start_match != first_char)
! start_match++;
! }
! /* Or to just after \n for a multiline match if possible */
! else if (startline) {
! if (start_match > match_block.start_subject + start_offset) {
! while (start_match < end_subject && start_match[-1] != '\n')
! start_match++;
! }
}
! /* Or to a non-unique first char after study */
! else if (start_bits != NULL) {
! while (start_match < end_subject) {
! register int c = *start_match;
! if ((start_bits[c / 8] & (1 << (c & 7))) == 0)
! start_match++;
! else
! break;
! }
}
#ifdef DEBUG /* Sigh. Some compilers never learn. */
! printf(">>>> Match against: ");
! pchars(start_match, end_subject - start_match, TRUE, &match_block);
! printf("\n");
#endif
! /* If req_char is set, we know that that character must appear in the subject
! for the match to succeed. If the first character is set, req_char must be
! later in the subject; otherwise the test starts at the match point. This
! optimization can save a huge amount of backtracking in patterns with nested
! unlimited repeats that aren't going to match. We don't know what the state of
! case matching may be when this character is hit, so test for it in both its
! cases if necessary. However, the different cased versions will not be set up
! unless PCRE_CASELESS was given or the casing state changes within the regex.
! Writing separate code makes it go faster, as does using an autoincrement and
! backing off on a match. */
!
! if (req_char >= 0) {
! register const uschar *p = start_match + ((first_char >= 0) ? 1 : 0);
!
! /* We don't need to repeat the search if we haven't yet reached the
! place we found it at last time. */
!
! if (p > req_char_ptr) {
! /* Do a single test if no case difference is set up */
!
! if (req_char == req_char2) {
! while (p < end_subject) {
! if (*p++ == req_char) {
! p--;
! break;
! }
}
}
! /* Otherwise test for either case */
! else {
! while (p < end_subject) {
! register int pp = *p++;
! if (pp == req_char || pp == req_char2) {
! p--;
! break;
! }
}
}
! /* If we can't find the required character, break the matching loop */
! if (p >= end_subject)
! break;
! /* If we have found the required character, save the point where we
! found it, so that we don't search again next time round the loop if
! the start hasn't passed this character yet. */
! req_char_ptr = p;
! }
}
! /* When a match occurs, substrings will be set for all internal extractions;
! we just need to set up the whole thing as substring 0 before returning. If
! there were too many extractions, set the return code to zero. In the case
! where we had to get some local store to hold offsets for backreferences, copy
! those back references that we can. In this case there need not be overflow
! if certain parts of the pattern were not used. */
!
! match_block.start_match = start_match;
! if (!match
! (start_match, re->code, 2, &match_block, ims, NULL,
! match_isgroup)) continue;
!
! /* Copy the offset information from temporary store if necessary */
!
! if (using_temporary_offsets) {
! if (offsetcount >= 4) {
! memcpy(offsets + 2, match_block.offset_vector + 2,
! (offsetcount - 2) * sizeof(int));
! DPRINTF(("Copied offsets from temporary memory\n"));
! }
! if (match_block.end_offset_top > offsetcount)
! match_block.offset_overflow = TRUE;
! DPRINTF(("Freeing temporary memory\n"));
! free(match_block.offset_vector);
}
! rc = match_block.offset_overflow ? 0 : match_block.end_offset_top / 2;
! if (match_block.offset_end < 2)
! rc = 0;
! else {
! offsets[0] = start_match - match_block.start_subject;
! offsets[1] = match_block.end_match_ptr - match_block.start_subject;
! }
! DPRINTF((">>>> returning %d\n", rc));
! return rc;
}
/* This "while" is the end of the "do" above */
! while (!anchored &&
! match_block.errorcode == PCRE_ERROR_NOMATCH &&
! start_match++ < end_subject);
!
! if (using_temporary_offsets) {
! DPRINTF(("Freeing temporary memory\n"));
! free(match_block.offset_vector);
! }
! DPRINTF((">>>> returning %d\n", match_block.errorcode));
}
*** 1_7_4.47/game/txt/hlp/penncode.hlp Thu, 23 Nov 2000 09:11:27 -0600 dunemush (pennmush/d/40_penncode.h 1.3 600)
--- 1_7_4.72(w)/game/txt/hlp/penncode.hlp Fri, 23 Mar 2001 13:41:47 -0600 dunemush (pennmush/d/40_penncode.h 1.4 600)
***************
*** 1,23 ****
& Code
! The latest version of this MUSH code is available via anonymous FTP, at
! ftp.pennmush.org, directory /pub/PennMUSH/Source. It will
! be called something like pennmush-1.7.3p0.tar.Z, or similar,
! depending on the version number.
!
! For information about changes in versions of the code, see
! 'help changes'.
Also on that site is the MUSH manual, in /pub/PennMUSH/Manuals. It
should be called mushman.2.008.tar.Z or something similar; you should
attempt to get at least version 2.007.
-
Also on that site is Javelin's Guide for PennMUSH Gods, in
/pub/PennMUSH/Guide. A better way to read it is on the Web at
http://www.pennmush.org/~alansz/guide.html
This code version is being maintained by Javelin, aka Alan Schwartz.
Suggestions, comments, and bug reports are welcome; send email to
! dunemush@pennmush.org.
& copyright
& copyrite
& license
--- 1,41 ----
& Code
! The latest version of this MUSH code is available via anonymous
! FTP, at ftp.pennmush.org, directory /pub/PennMUSH/Source. It will
! be called something like pennmush-1.7.4p0.tar.Z, or similar,
! depending on the version number. You will also find files
! of translations of server messages into various languages in
! /pub/PennMUSH/Source/translations/<version>. See help i18n for more.
Also on that site is the MUSH manual, in /pub/PennMUSH/Manuals. It
should be called mushman.2.008.tar.Z or something similar; you should
attempt to get at least version 2.007.
Also on that site is Javelin's Guide for PennMUSH Gods, in
/pub/PennMUSH/Guide. A better way to read it is on the Web at
http://www.pennmush.org/~alansz/guide.html
This code version is being maintained by Javelin, aka Alan Schwartz.
Suggestions, comments, and bug reports are welcome; send email to
! dunemush@pennmush.org. For information about changes in versions of the
! code, see 'help changes'.
! & i18n
! & internationalization
! & locale
! & translation
! Internationalization support in PennMUSH includes:
! * Support for (8-bit) locale-based character sets, including translation
! of iso-8859-1 characters to html entities for Pueblo
! * Support for locale-based date/time formats
! * Support for locale-based message sets for translations of server
! messages. There are active translation teams (and you can join!)
! and several languages have practically complete translation files
! available from the PennMUSH ftp site.
! * Some support for locale-based string collation
! * The ability to alias command and function names, so you can generate
! a set of translated commands/functions.
!
! Most of these features get enabled by setting an appropriate environment
! variable in the PennMUSH restart script.
!
& copyright
& copyrite
& license
*** 1_7_4.47/src/mysocket.c Wed, 14 Mar 2001 14:29:38 -0600 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1 660)
--- 1_7_4.72(w)/src/mysocket.c Thu, 05 Apr 2001 11:06:08 -0500 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1.1.4 660)
***************
*** 52,58 ****
#endif
#endif
! #ifndef WIN32
#include <netdb.h>
#endif
--- 52,58 ----
#endif
#endif
! #ifdef I_NETDB
#include <netdb.h>
#endif
***************
*** 137,143 ****
hi.port = port;
return &hi;
}
! #endif /* INFOSALVE */
/* Open a tcp connection to a given host and port. Basically
* tcp_connect from UNPv1
--- 137,143 ----
hi.port = port;
return &hi;
}
! #endif /* INFOSLAVE */
/* Open a tcp connection to a given host and port. Basically
* tcp_connect from UNPv1
***************
*** 253,260 ****
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_flags = AI_PASSIVE;
#ifdef FORCE_IPV4
! hints.ai_family = AF_INET; /* OpenBSD apparently doesn't properly
! map IPv4 connections to IPv6 servers. */
#else
hints.ai_family = AF_UNSPEC; /* Try to use IPv6 if available */
#endif
--- 253,260 ----
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_flags = AI_PASSIVE;
#ifdef FORCE_IPV4
! hints.ai_family = AF_INET; /* OpenBSD apparently doesn't properly
! map IPv4 connections to IPv6 servers. */
#else
hints.ai_family = AF_UNSPEC; /* Try to use IPv6 if available */
#endif
*** 1_7_4.47/win32/funs.h Thu, 08 Feb 2001 23:01:41 -0600 dunemush (pennmush/f/12_funs.h 1.11.1.9.2.8 660)
--- 1_7_4.72(w)/win32/funs.h Mon, 26 Mar 2001 15:33:13 -0600 dunemush (pennmush/f/12_funs.h 1.11.1.9.2.8.2.1 660)
***************
*** 293,295 ****
--- 293,296 ----
FUNCTION_PROTO(fun_zemit);
FUNCTION_PROTO(fun_zfun);
FUNCTION_PROTO(fun_zone);
+ FUNCTION_PROTO(local_fun_silly);
*** 1_7_4.47/win32/cmds.h Thu, 08 Feb 2001 23:01:41 -0600 dunemush (pennmush/f/15_cmds.h 1.9.1.4.1.1.1.1.1.1.1.1 660)
--- 1_7_4.72(w)/win32/cmds.h Mon, 26 Mar 2001 15:33:13 -0600 dunemush (pennmush/f/15_cmds.h 1.9.1.4.1.1.1.1.1.1.1.1.2.1 660)
***************
*** 58,63 ****
--- 58,64 ----
COMMAND_PROTO(cmd_link);
COMMAND_PROTO(cmd_list);
COMMAND_PROTO(cmd_listmotd);
+ COMMAND_PROTO(cmd_local_silly);
COMMAND_PROTO(cmd_lock);
COMMAND_PROTO(cmd_log);
COMMAND_PROTO(cmd_logwipe);
*** 1_7_4.47/hints/hpux-gcc.sh Thu, 05 Apr 2001 11:09:58 -0500 dunemush ()
--- 1_7_4.72(w)/hints/hpux-gcc.sh Sat, 24 Mar 2001 12:12:00 -0600 dunemush (pennmush/g/5_hpux-gcc.s 1.1 600)
***************
*** 0 ****
--- 1,2 ----
+ cc="gcc"
+ ccflags="-D_INCLUDE_POSIX_SOURCE -D_INCLUDE_HPUX_SOURCE -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_AES_SOURCE -D_XOPEN_SOURCE_EXTENDED"