This is patch33 to PennMUSH 1.7.7. After applying this patch, you will have version 1.7.7p33 To apply this patch, save it to a file in your top-level MUSH directory, and do the following: patch -p1 < 1.7.7-patch33 make clean 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. On the off chance they appear not to be, simply rm them and re-run make. Then @shutdown and restart your MUSH. - Alan/Javelin In this patch: Minor changes (internals): * IsPlayer, etc. macros rewritten for clarity by Luke@M*U*S*H. * Use enums in place of some more #defines and magic numbers. [SW] * New did_it_with() hc function simplifies passing a dbref as %0 to did_it actions. [SW] Fixes: * The SQL_OK power could get double-added. If this happened to you, delete one of them and double-check that all sql-using objects still have the power set. Report by Mordie@M*U*S*H. * Missing include in game.c fixed. * Improper include in bufferq.c fixed. Report by Leona and Walker@M*U*S*H. * Obsolete bzero() uses removed. [SW] * New win32/pennmush.dsp. * Help fix by bleeder@M*U*S*H. * Mac OS X linting [SW]. Prereq: 1.7.7p32 *** 1_7_7.1051/Patchlevel Wed, 26 May 2004 13:09:07 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.34 600) --- 1_7_7.1061(w)/Patchlevel Thu, 03 Jun 2004 16:51:36 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.35 600) *************** *** 1,2 **** Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.7p32 --- 1,2 ---- Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.7p33 *** 1_7_7.1051/CHANGES.177 Mon, 31 May 2004 08:43:56 -0500 dunemush (pennmush/g/23_CHANGES 1.48.1.258.1.14.1.104 600) --- 1_7_7.1061(w)/CHANGES.177 Sun, 06 Jun 2004 20:03:59 -0500 dunemush (pennmush/g/23_CHANGES 1.48.1.258.1.14.1.111 600) *************** *** 18,23 **** --- 18,42 ---- ========================================================================== + Version 1.7.7 patchlevel 33 June 3, 2004 + + Minor changes (internals): + * IsPlayer, etc. macros rewritten for clarity by Luke@M*U*S*H. + * Use enums in place of some more #defines and magic numbers. [SW] + * New did_it_with() hc function simplifies passing a dbref as %0 + to did_it actions. [SW] + Fixes: + * The SQL_OK power could get double-added. If this happened to you, + delete one of them and double-check that all sql-using objects + still have the power set. Report by Mordie@M*U*S*H. + * Missing include in game.c fixed. + * Improper include in bufferq.c fixed. Report by Leona and Walker@M*U*S*H. + * Obsolete bzero() uses removed. [SW] + * New win32/pennmush.dsp. + * Help fix by bleeder@M*U*S*H. + * Mac OS X linting [SW]. + + Version 1.7.7 patchlevel 32 May 26, 2004 Major Changes: *** 1_7_7.1051/game/txt/hlp/penncmd.hlp Mon, 24 May 2004 20:08:21 -0500 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.3.1.4.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.10.1.1.1.1.1.1.1.1.1.1.1.33 600) --- 1_7_7.1061(w)/game/txt/hlp/penncmd.hlp Sat, 05 Jun 2004 19:58:47 -0500 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.3.1.4.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.10.1.1.1.1.1.1.1.1.1.1.1.34 600) *************** *** 2643,2649 **** applies, and may be 'any' or one or more of 'room', 'thing', 'player', or 'exit'. It defaults to 'any'. specifies the space-separated list of permissions for who can ! set and/or see the power. See 'help power permissions' for details. It defaults to 'any' specifies the space-separated list of permissions for who can clear the power on an object they control. It defaults to --- 2643,2649 ---- applies, and may be 'any' or one or more of 'room', 'thing', 'player', or 'exit'. It defaults to 'any'. specifies the space-separated list of permissions for who can ! set and/or see the power. See 'help flag permissions' for details. It defaults to 'any' specifies the space-separated list of permissions for who can clear the power on an object they control. It defaults to *** 1_7_7.1051/src/wiz.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.1.1.1.1.1.1.1.1.1.1.8.1.2.2.2.1.2.1.1.1.1.1.1.1.2.1.1.1.2.2.17.1.9.1.18 660) --- 1_7_7.1061(w)/src/wiz.c Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.1.1.1.1.1.1.1.1.1.1.8.1.2.2.2.1.2.1.1.1.1.1.1.1.2.1.1.1.2.2.17.1.9.1.20 660) *************** *** 740,764 **** * \endverbatim * \param player the enactor. * \param name name of the player or descriptor to boot. ! * \param flag 0=normal, 1=boot by descriptor, 2=self-boot */ void ! do_boot(dbref player, const char *name, int flag) { dbref victim; DESC *d = NULL; victim = NOTHING; switch (flag) { ! case 2: /* self boot */ victim = player; break; ! case 1: /* boot by descriptor */ victim = find_player_by_desc(atoi(name)); if (victim == player) ! flag = 2; else if (victim == NOTHING) { d = port_desc(atoi(name)); if (!d) { --- 740,764 ---- * \endverbatim * \param player the enactor. * \param name name of the player or descriptor to boot. ! * \param flag the type of booting to do. */ void ! do_boot(dbref player, const char *name, enum boot_type flag) { dbref victim; DESC *d = NULL; victim = NOTHING; switch (flag) { ! case BOOT_SELF: /* self boot */ victim = player; break; ! case BOOT_DESC: /* boot by descriptor */ victim = find_player_by_desc(atoi(name)); if (victim == player) ! flag = BOOT_SELF; else if (victim == NOTHING) { d = port_desc(atoi(name)); if (!d) { *************** *** 768,774 **** victim = AMBIGUOUS; } break; ! case 0: /* boot by name */ if ((victim = noisy_match_result(player, name, TYPE_PLAYER, --- 768,774 ---- victim = AMBIGUOUS; } break; ! case BOOT_NAME: /* boot by name */ if ((victim = noisy_match_result(player, name, TYPE_PLAYER, *************** *** 777,783 **** return; } if (victim == player) ! flag = 2; break; } --- 777,783 ---- return; } if (victim == player) ! flag = BOOT_SELF; break; } *************** *** 791,816 **** } /* look up descriptor */ switch (flag) { ! case 0: d = player_desc(victim); break; ! case 1: d = port_desc(atoi(name)); break; ! case 2: d = inactive_desc(victim); break; } /* 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 { do_log(LT_WIZ, player, victim, "*** BOOT ***"); ! if (flag == 2) notify(player, T("You boot an idle self.")); else if (victim == AMBIGUOUS) notify_format(player, T("You booted unconnected port %s!"), name); --- 791,816 ---- } /* look up descriptor */ switch (flag) { ! case BOOT_NAME: d = player_desc(victim); break; ! case BOOT_DESC: d = port_desc(atoi(name)); break; ! case BOOT_SELF: d = inactive_desc(victim); break; } /* check for more errors */ if (!d) { ! if (flag == BOOT_SELF) notify(player, T("None of your connections are idle.")); else notify(player, T("That player isn't connected!")); } else { do_log(LT_WIZ, player, victim, "*** BOOT ***"); ! if (flag == BOOT_SELF) notify(player, T("You boot an idle self.")); else if (victim == AMBIGUOUS) notify_format(player, T("You booted unconnected port %s!"), name); *** 1_7_7.1051/src/version.c Tue, 08 Apr 2003 22:03:08 -0500 dunemush (pennmush/b/26_version.c 1.9 660) --- 1_7_7.1061(w)/src/version.c Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/b/26_version.c 1.10 660) *************** *** 41,47 **** buff[strlen(buff) - 1] = '\0'; /* eat the newline */ notify_format(player, T("Last restarted: %s"), buff); ! notify_format(player, "%s", VERSION); #ifdef PATCHES notify_format(player, "Patches: %s", PATCHES); #endif --- 41,48 ---- buff[strlen(buff) - 1] = '\0'; /* eat the newline */ notify_format(player, T("Last restarted: %s"), buff); ! notify_format(player, "PennMUSH version %s patchlevel %s %s", VERSION, ! PATCHLEVEL, PATCHDATE); #ifdef PATCHES notify_format(player, "Patches: %s", PATCHES); #endif *** 1_7_7.1051/src/rob.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/b/42_rob.c 1.18.1.2.1.3.1.3.1.23 660) --- 1_7_7.1061(w)/src/rob.c Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/b/42_rob.c 1.18.1.2.1.3.1.3.1.24 660) *************** *** 145,152 **** char *s; char tbuf1[BUFFER_LEN]; char *bp; - char *myenv[10]; - int i; /* If we have a recipient, but no amnt, try parsing for * 'give to ' instead of 'give =' --- 145,150 ---- *************** *** 210,227 **** moveto(thing, who); /* Notify the giver with their GIVE message */ - myenv[0] = (char *) mush_malloc(BUFFER_LEN, "dbref"); - myenv[1] = (char *) mush_malloc(BUFFER_LEN, "dbref"); - sprintf(myenv[0], "#%d", thing); - sprintf(myenv[1], "#%d", who); - for (i = 2; i < 10; i++) - myenv[i] = NULL; bp = tbuf1; safe_format(tbuf1, &bp, T("You gave %s to %s."), Name(thing), Name(who)); *bp = '\0'; ! real_did_it(player, player, "GIVE", tbuf1, "OGIVE", NULL, ! "AGIVE", NOTHING, myenv, NA_INTER_SEE); /* Notify the object that it's been given */ notify_format(thing, T("%s gave you to %s."), Name(player), Name(who)); --- 208,219 ---- moveto(thing, who); /* Notify the giver with their GIVE message */ bp = tbuf1; safe_format(tbuf1, &bp, T("You gave %s to %s."), Name(thing), Name(who)); *bp = '\0'; ! did_it_with(player, player, "GIVE", tbuf1, "OGIVE", NULL, ! "AGIVE", NOTHING, thing, who, NA_INTER_SEE); /* Notify the object that it's been given */ notify_format(thing, T("%s gave you to %s."), Name(player), Name(who)); *************** *** 233,244 **** safe_format(tbuf1, &bp, T("%s gave you %s."), Name(player), Name(thing)); *bp = '\0'; ! sprintf(myenv[1], "#%d", player); ! real_did_it(who, who, "RECEIVE", tbuf1, "ORECEIVE", NULL, ! "ARECEIVE", NOTHING, myenv, NA_INTER_SEE); ! ! mush_free(myenv[0], "dbref"); ! mush_free(myenv[1], "dbref"); } else notify(player, T("Permission denied.")); } --- 225,232 ---- safe_format(tbuf1, &bp, T("%s gave you %s."), Name(player), Name(thing)); *bp = '\0'; ! did_it_with(who, who, "RECEIVE", tbuf1, "ORECEIVE", NULL, ! "ARECEIVE", NOTHING, thing, player, NA_INTER_SEE); } else notify(player, T("Permission denied.")); } *************** *** 267,273 **** if (!Moneybags(player) && !payfor(player, amount)) { notify_format(player, T("You don't have that many %s to give!"), MONIES); } else { ! char *pay_env[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; char paid[SBUF_LEN], *pb; pay_env[0] = pb = paid; --- 255,261 ---- if (!Moneybags(player) && !payfor(player, amount)) { notify_format(player, T("You don't have that many %s to give!"), MONIES); } else { ! char *pay_env[10] = { NULL }; char paid[SBUF_LEN], *pb; pay_env[0] = pb = paid; *** 1_7_7.1051/src/predicat.c Wed, 19 May 2004 21:34:39 -0500 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1.1.3.1.4.2.38.1.11 660) --- 1_7_7.1061(w)/src/predicat.c Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1.1.3.1.4.2.38.1.12 660) *************** *** 151,161 **** const char *owhat, const char *odef, const char *awhat, dbref loc) { /* Bunch o' nulls */ ! static char *myenv[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; return real_did_it(player, thing, what, def, owhat, odef, awhat, loc, myenv, NA_INTER_HEAR); } /** A wrapper for did_it that can pass interaction flags. * \param player the enactor. --- 151,202 ---- const char *owhat, const char *odef, const char *awhat, dbref loc) { /* Bunch o' nulls */ ! static char *myenv[10] = { NULL }; return real_did_it(player, thing, what, def, owhat, odef, awhat, loc, myenv, NA_INTER_HEAR); } + /** A wrapper for real_did_it that can set %0 and %1 to dbrefs. + * \param player the enactor. + * \param thing object being triggered. + * \param what message attribute for enactor. + * \param def default message to enactor. + * \param owhat message attribute for others. + * \param odef default message to others. + * \param awhat action attribute to trigger. + * \param loc location in which action is taking place. + * \param env0 dbref to pass as %0, or NOTHING. + * \param env1 dbref to pass as %1, or NOTHING. + * \param flags interaction flags to pass to real_did_it. + * \retval 0 no attributes were present, only defaults were used if given. + * \retval 1 some attributes were evaluated and used. + */ + int + did_it_with(dbref player, dbref thing, const char *what, const char *def, + const char *owhat, const char *odef, const char *awhat, + dbref loc, dbref env0, dbref env1, int flags) + { + char *myenv[10] = { NULL }; + char e0[SBUF_LEN], e1[SBUF_LEN], *ep; + + if (env0 != NOTHING) { + ep = e0; + safe_dbref(env0, e0, &ep); + *ep = '\0'; + myenv[0] = e0; + } + + if (env1 != NOTHING) { + ep = e1; + safe_dbref(env1, e1, &ep); + *ep = '\0'; + myenv[1] = e1; + } + + return real_did_it(player, thing, what, def, owhat, odef, awhat, loc, myenv, + flags); + } + /** A wrapper for did_it that can pass interaction flags. * \param player the enactor. *************** *** 176,182 **** dbref loc, int flags) { /* Bunch o' nulls */ ! static char *myenv[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; return real_did_it(player, thing, what, def, owhat, odef, awhat, loc, myenv, flags); } --- 217,223 ---- dbref loc, int flags) { /* Bunch o' nulls */ ! static char *myenv[10] = { NULL }; return real_did_it(player, thing, what, def, owhat, odef, awhat, loc, myenv, flags); } *** 1_7_7.1051/src/move.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/b/51_move.c 1.1.1.18.1.5.1.13.1.3.1.9.1.1.1.1.1.2.1.1.1.1.1.29 660) --- 1_7_7.1061(w)/src/move.c Sun, 06 Jun 2004 20:04:13 -0500 dunemush (pennmush/b/51_move.c 1.1.1.18.1.5.1.13.1.3.1.9.1.1.1.1.1.2.1.1.1.1.1.30 660) *************** *** 514,521 **** char tbuf1[BUFFER_LEN], tbuf2[BUFFER_LEN], *tp; long match_flags = MAT_NEIGHBOR | MAT_ABSOLUTE | MAT_CHECK_KEYS | MAT_NEAR | MAT_ENGLISH; ! char *myenv[10]; ! int i; if (!IsRoom(loc) && !EnterOk(loc) && !controls(player, loc)) { notify(player, T("Permission denied.")); return; --- 514,520 ---- char tbuf1[BUFFER_LEN], tbuf2[BUFFER_LEN], *tp; long match_flags = MAT_NEIGHBOR | MAT_ABSOLUTE | MAT_CHECK_KEYS | MAT_NEAR | MAT_ENGLISH; ! if (!IsRoom(loc) && !EnterOk(loc) && !controls(player, loc)) { notify(player, T("Permission denied.")); return; *************** *** 567,579 **** moveto(thing, player); did_it(player, thing, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, "ASUCCESS", NOTHING); ! myenv[0] = (char *) mush_malloc(BUFFER_LEN, "dbref"); ! sprintf(myenv[0], "#%d", thing); ! for (i = 1; i < 10; i++) ! myenv[i] = NULL; ! real_did_it(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, ! "ARECEIVE", NOTHING, myenv, NA_INTER_SEE); ! mush_free(myenv[0], "dbref"); } else fail_lock(player, thing, Basic_Lock, T("You can't take that from there."), NOTHING); --- 566,573 ---- moveto(thing, player); did_it(player, thing, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, "ASUCCESS", NOTHING); ! did_it_with(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, ! "ARECEIVE", NOTHING, thing, NOTHING, NA_INTER_HEAR); } else fail_lock(player, thing, Basic_Lock, T("You can't take that from there."), NOTHING); *************** *** 614,626 **** *tp = '\0'; did_it(player, thing, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, "ASUCCESS", NOTHING); ! myenv[0] = (char *) mush_malloc(BUFFER_LEN, "dbref"); ! sprintf(myenv[0], "#%d", thing); ! for (i = 1; i < 10; i++) ! myenv[i] = NULL; ! real_did_it(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, ! "ARECEIVE", NOTHING, myenv, NA_INTER_SEE); ! mush_free(myenv[0], "dbref"); } else fail_lock(player, thing, Basic_Lock, T("You can't pick that up."), NOTHING); --- 608,615 ---- *tp = '\0'; did_it(player, thing, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, "ASUCCESS", NOTHING); ! did_it_with(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, ! "ARECEIVE", NOTHING, thing, NOTHING, NA_INTER_HEAR); } else fail_lock(player, thing, Basic_Lock, T("You can't pick that up."), NOTHING); *************** *** 774,782 **** } /* Now do the work, if we should. That includes triggering messages */ if (empty_ok) { - int i; char tbuf1[BUFFER_LEN], tbuf2[BUFFER_LEN], *tp; ! char *myenv[10]; count++; /* Get messages */ if (thing != player) { --- 763,770 ---- } /* Now do the work, if we should. That includes triggering messages */ if (empty_ok) { char tbuf1[BUFFER_LEN], tbuf2[BUFFER_LEN], *tp; ! count++; /* Get messages */ if (thing != player) { *************** *** 793,805 **** moveto(item, player); did_it(player, item, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, "ASUCCESS", NOTHING); ! myenv[0] = (char *) mush_malloc(BUFFER_LEN, "dbref"); ! sprintf(myenv[0], "#%d", item); ! for (i = 1; i < 10; i++) ! myenv[i] = NULL; ! real_did_it(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, ! "ARECEIVE", NOTHING, myenv, NA_INTER_SEE); ! mush_free(myenv[0], "dbref"); } /* Drop messages */ if (thing_loc != player) { --- 781,788 ---- moveto(item, player); did_it(player, item, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, "ASUCCESS", NOTHING); ! did_it_with(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, ! "ARECEIVE", NOTHING, item, NOTHING, NA_INTER_HEAR); } /* Drop messages */ if (thing_loc != player) { *** 1_7_7.1051/src/look.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/4_look.c 1.21.1.2.1.9.1.1.1.1.1.28 660) --- 1_7_7.1061(w)/src/look.c Sun, 06 Jun 2004 20:04:13 -0500 dunemush (pennmush/c/4_look.c 1.21.1.2.1.9.1.1.1.1.1.29 660) *************** *** 672,678 **** * \param all if 1, include veiled attributes. */ void ! do_examine(dbref player, const char *name, int brief, int all) { dbref thing; ATTR *a; --- 672,678 ---- * \param all if 1, include veiled attributes. */ void ! do_examine(dbref player, const char *name, enum exam_type flag, int all) { dbref thing; ATTR *a; *************** *** 714,720 **** look_atrs(player, thing, attrib_name, all); return; } ! if (brief == 2) { ok = 0; } else { ok = Can_Examine(player, thing); --- 714,720 ---- look_atrs(player, thing, attrib_name, all); return; } ! if (flag == EXAM_MORTAL) { ok = 0; } else { ok = Can_Examine(player, thing); *************** *** 742,748 **** if (FLAGS_ON_EXAMINE) notify(player, flag_description(player, thing)); } ! if (EX_PUBLIC_ATTRIBS && (brief != 1)) { a = atr_get_noparent(thing, "DESCRIBE"); if (a) { r = safe_atr_value(a); --- 742,748 ---- if (FLAGS_ON_EXAMINE) notify(player, flag_description(player, thing)); } ! if (EX_PUBLIC_ATTRIBS && (flag != EXAM_BRIEF)) { a = atr_get_noparent(thing, "DESCRIBE"); if (a) { r = safe_atr_value(a); *************** *** 780,793 **** } /* show attributes */ ! switch (brief) { ! case 0: /* Standard */ if (EX_PUBLIC_ATTRIBS || ok) look_atrs(player, thing, NULL, all); break; ! case 1: /* Brief */ break; ! case 2: /* Mortal */ if (EX_PUBLIC_ATTRIBS) mortal_look_atrs(player, thing, NULL, all); break; --- 780,793 ---- } /* show attributes */ ! switch (flag) { ! case EXAM_NORMAL: /* Standard */ if (EX_PUBLIC_ATTRIBS || ok) look_atrs(player, thing, NULL, all); break; ! case EXAM_BRIEF: /* Brief */ break; ! case EXAM_MORTAL: /* Mortal */ if (EX_PUBLIC_ATTRIBS) mortal_look_atrs(player, thing, NULL, all); break; *** 1_7_7.1051/src/log.c Thu, 20 May 2004 11:43:29 -0500 dunemush (pennmush/c/5_log.c 1.10.1.2.2.4.1.1.2.2.1.20 660) --- 1_7_7.1061(w)/src/log.c Sun, 06 Jun 2004 20:04:13 -0500 dunemush (pennmush/c/5_log.c 1.10.1.2.2.4.1.1.2.2.1.20 660) *************** *** 15,20 **** --- 15,21 ---- #endif #include #include + #include #ifdef I_SYS_TIME #include #endif *** 1_7_7.1051/src/game.c Thu, 27 May 2004 14:05:53 -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.1.2.1.1.1.2.1.1.1.1.1.1.1.1.1.5.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.3.1.7.1.2.2.1.1.17 660) --- 1_7_7.1061(w)/src/game.c Sun, 06 Jun 2004 20:04:13 -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.1.2.1.1.1.2.1.1.1.1.1.1.1.1.1.5.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.3.1.7.1.2.2.1.1.18 660) *************** *** 34,39 **** --- 34,40 ---- #include #endif #include + #include #ifdef I_UNISTD #include #endif *************** *** 528,533 **** --- 529,535 ---- va_end(args); mush_panic(c); + _exit(136); /* Not reached but kills warnings */ } /** Dump the database. *** 1_7_7.1051/src/funstr.c Wed, 26 May 2004 09:52:42 -0500 dunemush (pennmush/c/13_funstr.c 1.28.1.1.1.2.1.4.1.6.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.3.1.5.1.3.1.2.1.1.1.1.1.1.1.1.1.14.1.16 660) --- 1_7_7.1061(w)/src/funstr.c Sun, 06 Jun 2004 20:04:13 -0500 dunemush (pennmush/c/13_funstr.c 1.28.1.1.1.2.1.4.1.6.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.3.1.5.1.3.1.2.1.1.1.1.1.1.1.1.1.14.1.16 660) *************** *** 660,666 **** char instr[BUFFER_LEN], outstr[BUFFER_LEN]; char rawstr[BUFFER_LEN]; char *ip, *op; ! int i, len; char *c; ansi_string *as; --- 660,666 ---- char instr[BUFFER_LEN], outstr[BUFFER_LEN]; char rawstr[BUFFER_LEN]; char *ip, *op; ! size_t i, len; char *c; ansi_string *as; *** 1_7_7.1051/src/flags.c Thu, 27 May 2004 14:05:53 -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.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.3.1.9.1.2.2.1.1.2.1.56.1.12.1.1.1.21 660) --- 1_7_7.1061(w)/src/flags.c Sun, 06 Jun 2004 20:04:13 -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.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.3.1.9.1.2.2.1.1.2.1.56.1.12.1.1.1.22 660) *************** *** 1765,1771 **** FLAGSPACE *n; Flagspace_Lookup(n, ns); /* Don't double-add */ ! if ((f = match_flag_ns(n, name))) return f; f = new_flag(); f->name = mush_strdup(strupper(name), "flag name"); --- 1765,1771 ---- FLAGSPACE *n; Flagspace_Lookup(n, ns); /* Don't double-add */ ! if ((f = match_flag_ns(n, strupper(name)))) return f; f = new_flag(); f->name = mush_strdup(strupper(name), "flag name"); *** 1_7_7.1051/src/extmail.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/22_extmail.c 1.44.1.7.1.5.1.9.1.1.1.1.1.16 660) --- 1_7_7.1061(w)/src/extmail.c Sun, 06 Jun 2004 20:04:13 -0500 dunemush (pennmush/c/22_extmail.c 1.44.1.7.1.5.1.9.1.1.1.1.1.17 660) *************** *** 1221,1231 **** * \endverbatim * \param player the enactor. * \param name name of player whose mail stats are to be checked (NULL for all) ! * \param full level of verbosity: 0 = just count messages, 1 = break down by ! * read/unread, 2 = include space usage. */ void ! do_mail_stats(dbref player, char *name, int full) { dbref target; int fc, fr, fu, tc, tr, tu, fchars, tchars, cchars; --- 1221,1232 ---- * \endverbatim * \param player the enactor. * \param name name of player whose mail stats are to be checked (NULL for all) ! * \param full level of verbosity: MSTATS_COUNT = just count messages, ! * MSTATS_READ = break down by read/unread, MSTATS_SIZE = include ! * space usage. */ void ! do_mail_stats(dbref player, char *name, enum mail_stats_type full) { dbref target; int fc, fr, fu, tc, tr, tu, fchars, tchars, cchars; *************** *** 1271,1281 **** return; } if (target == AMBIGUOUS) { /* stats for all */ ! if (full == 0) { notify_format(player, T("There are %d messages in the mail spool."), mdb_top); return; ! } else if (full == 1) { for (mp = HEAD; mp != NULL; mp = mp->next) { if (Cleared(mp)) fc++; --- 1272,1282 ---- return; } if (target == AMBIGUOUS) { /* stats for all */ ! if (full == MSTATS_COUNT) { notify_format(player, T("There are %d messages in the mail spool."), mdb_top); return; ! } else if (full == MSTATS_READ) { for (mp = HEAD; mp != NULL; mp = mp->next) { if (Cleared(mp)) fc++; *************** *** 1318,1324 **** } /* individual stats */ ! if (full == 0) { /* just count number of messages */ for (mp = HEAD; mp != NULL; mp = mp->next) { if (was_sender(target, mp)) --- 1319,1325 ---- } /* individual stats */ ! if (full == MSTATS_COUNT) { /* just count number of messages */ for (mp = HEAD; mp != NULL; mp = mp->next) { if (was_sender(target, mp)) *************** *** 1339,1345 **** fr++; else fu++; ! if (full == 2) fchars += strlen(get_message(mp)); } if (mp->to == target) { --- 1340,1346 ---- fr++; else fu++; ! if (full == MSTATS_SIZE) fchars += strlen(get_message(mp)); } if (mp->to == target) { *************** *** 1351,1364 **** tr++; else tu++; ! if (full == 2) tchars += strlen(get_message(mp)); } } notify_format(player, T("Mail statistics for %s:"), Name(target)); ! if (full == 1) { notify_format(player, T("%d messages sent, %d unread, %d cleared."), fc + fr + fu, fu, fc); notify_format(player, T("%d messages received, %d unread, %d cleared."), --- 1352,1365 ---- tr++; else tu++; ! if (full == MSTATS_SIZE) tchars += strlen(get_message(mp)); } } notify_format(player, T("Mail statistics for %s:"), Name(target)); ! if (full == MSTATS_READ) { notify_format(player, T("%d messages sent, %d unread, %d cleared."), fc + fr + fu, fu, fc); notify_format(player, T("%d messages received, %d unread, %d cleared."), *** 1_7_7.1051/src/extchat.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.2.1.1.2.1.1.2.1.1.1.1.1.1.1.1.1.16.1.21 660) --- 1_7_7.1061(w)/src/extchat.c Sun, 06 Jun 2004 20:04:12 -0500 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.2.1.1.2.1.1.2.1.1.1.1.1.1.1.1.1.16.1.22 660) *************** *** 64,72 **** static void channel_wipe(dbref player, CHAN *chan); static int yesno(const char *str); 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); --- 64,73 ---- static void channel_wipe(dbref player, CHAN *chan); static int yesno(const char *str); static int canstilladd(dbref player); ! static enum cmatch_type find_channel_partial_on(const char *name, CHAN **chan, ! dbref player); ! static enum cmatch_type 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); *************** *** 149,154 **** --- 150,157 ---- notify(player, T("CHAT: I don't know which channel you mean.")); \ list_partial_matches(player, name, PMATCH_ALL); \ return; \ + default: \ + break; \ } \ } while (0) *************** *** 687,693 **** * \retval CMATCH_AMBIG multiple match of channel name. * \retval CMATCH_NONE no match for channel name. */ ! int find_channel(const char *name, CHAN **chan, dbref player) { CHAN *p; --- 690,696 ---- * \retval CMATCH_AMBIG multiple match of channel name. * \retval CMATCH_NONE no match for channel name. */ ! enum cmatch_type find_channel(const char *name, CHAN **chan, dbref player) { CHAN *p; *************** *** 742,748 **** * \retval CMATCH_AMBIG multiple match of channel name. * \retval CMATCH_NONE no match for channel name. */ ! int find_channel_partial(const char *name, CHAN **chan, dbref player) { CHAN *p; --- 745,751 ---- * \retval CMATCH_AMBIG multiple match of channel name. * \retval CMATCH_NONE no match for channel name. */ ! enum cmatch_type find_channel_partial(const char *name, CHAN **chan, dbref player) { CHAN *p; *************** *** 829,835 **** * \retval CMATCH_AMBIG multiple match of channel name. * \retval CMATCH_NONE no match for channel name. */ ! static int find_channel_partial_on(const char *name, CHAN **chan, dbref player) { CHAN *p; --- 832,838 ---- * \retval CMATCH_AMBIG multiple match of channel name. * \retval CMATCH_NONE no match for channel name. */ ! static enum cmatch_type find_channel_partial_on(const char *name, CHAN **chan, dbref player) { CHAN *p; *************** *** 878,884 **** * \retval CMATCH_AMBIG multiple match of channel name. * \retval CMATCH_NONE no match for channel name. */ ! static int find_channel_partial_off(const char *name, CHAN **chan, dbref player) { CHAN *p; --- 881,887 ---- * \retval CMATCH_AMBIG multiple match of channel name. * \retval CMATCH_NONE no match for channel name. */ ! static enum cmatch_type find_channel_partial_off(const char *name, CHAN **chan, dbref player) { CHAN *p; *************** *** 1109,1114 **** --- 1112,1119 ---- notify(player, T("CHAT: I don't know which channel you mean.")); list_partial_matches(player, name, PMATCH_OFF); return; + default: + break; } if (!Chan_Can_See(chan, player)) { notify(player, T("CHAT: I don't recognize that channel.")); *************** *** 1171,1176 **** --- 1176,1183 ---- notify(player, T("CHAT: I don't know which channel you mean.")); list_partial_matches(player, name, PMATCH_ON); return; + default: + break; } u = onchannel(player, chan); strcpy(title, (u &&CUtitle(u)) ? CUtitle(u) : ""); *************** *** 1396,1401 **** --- 1403,1410 ---- notify(player, T("I don't know which channel you mean.")); list_partial_matches(player, name, PMATCH_ALL); return; + default: + break; } if (!Chan_Can_See(chan, player)) { notify(player, T("CHAT: I don't recognize that channel.")); *************** *** 2426,2441 **** int first = 1; CHAN *chan = NULL; CHANUSER *u; - int i; dbref who; ! i = find_channel(args[0], &chan, executor); ! switch (i) { case CMATCH_NONE: notify(executor, T("No such channel.")); return; case CMATCH_AMBIG: notify(executor, T("I can't tell which channel you mean.")); return; } /* Feh. We need to do some sort of privilege checking, so that --- 2435,2451 ---- int first = 1; CHAN *chan = NULL; CHANUSER *u; dbref who; ! ! switch (find_channel(args[0], &chan, executor)) { case CMATCH_NONE: notify(executor, T("No such channel.")); return; case CMATCH_AMBIG: notify(executor, T("I can't tell which channel you mean.")); return; + default: + break; } /* Feh. We need to do some sort of privilege checking, so that *************** *** 2685,2690 **** --- 2695,2702 ---- case CMATCH_AMBIG: safe_str("#-2 AMBIGUOUS CHANNEL MATCH", buff, bp); return; + default: + break; } if (!strcasecmp(p, "JOIN")) { *** 1_7_7.1051/src/cque.c Sat, 01 May 2004 13:41:05 -0500 dunemush (pennmush/c/28_cque.c 1.36.1.5.1.1.1.1.1.1.1.2.1.6.1.17 660) --- 1_7_7.1061(w)/src/cque.c Sun, 06 Jun 2004 20:04:12 -0500 dunemush (pennmush/c/28_cque.c 1.36.1.5.1.1.1.1.1.1.1.2.1.6.1.18 660) *************** *** 893,899 **** * \param flag type of display. 0 - normal, 1 - all, 2 - summary, 3 - quick */ void ! do_queue(dbref player, const char *what, int flag) { dbref victim = NOTHING; int all = 0; --- 893,899 ---- * \param flag type of display. 0 - normal, 1 - all, 2 - summary, 3 - quick */ void ! do_queue(dbref player, const char *what, enum queue_type flag) { dbref victim = NOTHING; int all = 0; *************** *** 901,909 **** int dpq = 0, doq = 0, dwq = 0, dsq = 0; int pq = 0, oq = 0, wq = 0, sq = 0; int tpq = 0, toq = 0, twq = 0, tsq = 0; ! if (flag == 2 || flag == 3) quick = 1; ! if (flag == 1 || flag == 2) { all = 1; victim = player; } else if (LookQueue(player)) { --- 901,909 ---- int dpq = 0, doq = 0, dwq = 0, dsq = 0; int pq = 0, oq = 0, wq = 0, sq = 0; int tpq = 0, toq = 0, twq = 0, tsq = 0; ! if (flag == QUEUE_SUMMARY || flag == QUEUE_QUICK) quick = 1; ! if (flag == QUEUE_ALL || flag == QUEUE_SUMMARY) { all = 1; victim = player; } else if (LookQueue(player)) { *************** *** 927,933 **** default: if (!quick) { ! if (all == 1) notify(player, T("Queue for : all")); else notify_format(player, T("Queue for : %s"), Name(victim)); --- 927,933 ---- default: if (!quick) { ! if (all == QUEUE_ALL) notify(player, T("Queue for : all")); else notify_format(player, T("Queue for : %s"), Name(victim)); *** 1_7_7.1051/src/cmds.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/37_cmds.c 1.33.1.1.1.2.1.2.2.3.1.1.1.2.1.1.1.3.1.8.1.1.2.2.2.20.1.3.1.7.1.2.1.12 660) --- 1_7_7.1061(w)/src/cmds.c Sun, 06 Jun 2004 20:04:12 -0500 dunemush (pennmush/c/37_cmds.c 1.33.1.1.1.2.1.2.2.3.1.1.1.2.1.1.1.3.1.8.1.1.2.2.2.20.1.3.1.7.1.2.1.13 660) *************** *** 83,93 **** COMMAND (cmd_boot) { if (SW_ISSET(sw, SWITCH_PORT)) ! do_boot(player, arg_left, 1); else if (SW_ISSET(sw, SWITCH_ME)) ! do_boot(player, (char *) NULL, 2); else ! do_boot(player, arg_left, 0); } /** Has the break command been called? */ --- 83,93 ---- COMMAND (cmd_boot) { if (SW_ISSET(sw, SWITCH_PORT)) ! do_boot(player, arg_left, BOOT_DESC); else if (SW_ISSET(sw, SWITCH_ME)) ! do_boot(player, (char *) NULL, BOOT_SELF); else ! do_boot(player, arg_left, BOOT_NAME); } /** Has the break command been called? */ *************** *** 158,164 **** } COMMAND (cmd_create) { ! do_create(player, arg_left, atol(arg_right)); } COMMAND (cmd_clone) { --- 158,164 ---- } COMMAND (cmd_create) { ! do_create(player, arg_left, parse_integer(arg_right)); } COMMAND (cmd_clone) { *************** *** 473,483 **** int nosig = SW_ISSET(sw, SWITCH_NOSIG); /* First, mail commands that can be used even if you're gagged */ if (SW_ISSET(sw, SWITCH_STATS)) ! do_mail_stats(player, arg_left, 0); else if (SW_ISSET(sw, SWITCH_DSTATS)) ! do_mail_stats(player, arg_left, 1); else if (SW_ISSET(sw, SWITCH_FSTATS)) ! do_mail_stats(player, arg_left, 2); else if (SW_ISSET(sw, SWITCH_DEBUG)) do_mail_debug(player, arg_left, arg_right); else if (SW_ISSET(sw, SWITCH_NUKE)) --- 473,483 ---- int nosig = SW_ISSET(sw, SWITCH_NOSIG); /* First, mail commands that can be used even if you're gagged */ if (SW_ISSET(sw, SWITCH_STATS)) ! do_mail_stats(player, arg_left, MSTATS_COUNT); else if (SW_ISSET(sw, SWITCH_DSTATS)) ! do_mail_stats(player, arg_left, MSTATS_READ); else if (SW_ISSET(sw, SWITCH_FSTATS)) ! do_mail_stats(player, arg_left, MSTATS_SIZE); else if (SW_ISSET(sw, SWITCH_DEBUG)) do_mail_debug(player, arg_left, arg_right); else if (SW_ISSET(sw, SWITCH_NUKE)) *************** *** 670,682 **** COMMAND (cmd_ps) { if (SW_ISSET(sw, SWITCH_ALL)) ! do_queue(player, arg_left, 1); else if (SW_ISSET(sw, SWITCH_SUMMARY) || SW_ISSET(sw, SWITCH_COUNT)) ! do_queue(player, arg_left, 2); else if (SW_ISSET(sw, SWITCH_QUICK)) ! do_queue(player, arg_left, 3); else ! do_queue(player, arg_left, 0); } COMMAND (cmd_purge) { --- 670,682 ---- COMMAND (cmd_ps) { if (SW_ISSET(sw, SWITCH_ALL)) ! do_queue(player, arg_left, QUEUE_ALL); else if (SW_ISSET(sw, SWITCH_SUMMARY) || SW_ISSET(sw, SWITCH_COUNT)) ! do_queue(player, arg_left, QUEUE_SUMMARY); else if (SW_ISSET(sw, SWITCH_QUICK)) ! do_queue(player, arg_left, QUEUE_QUICK); else ! do_queue(player, arg_left, QUEUE_NORMAL); } COMMAND (cmd_purge) { *************** *** 792,806 **** do_list_memstats(player); else if (SW_ISSET(sw, SWITCH_CHUNKS)) { if (SW_ISSET(sw, SWITCH_REGIONS)) ! chunk_stats(player, 4); else ! chunk_stats(player, 0); } else if (SW_ISSET(sw, SWITCH_REGIONS)) ! chunk_stats(player, 1); else if (SW_ISSET(sw, SWITCH_PAGING)) ! chunk_stats(player, 2); else if (SW_ISSET(sw, SWITCH_FREESPACE)) ! chunk_stats(player, 3); else do_stats(player, arg_left); } --- 792,806 ---- do_list_memstats(player); else if (SW_ISSET(sw, SWITCH_CHUNKS)) { if (SW_ISSET(sw, SWITCH_REGIONS)) ! chunk_stats(player, CSTATS_REGION); else ! chunk_stats(player, CSTATS_SUMMARY); } else if (SW_ISSET(sw, SWITCH_REGIONS)) ! chunk_stats(player, CSTATS_REGIONG); else if (SW_ISSET(sw, SWITCH_PAGING)) ! chunk_stats(player, CSTATS_PAGINGG); else if (SW_ISSET(sw, SWITCH_FREESPACE)) ! chunk_stats(player, CSTATS_FREESPACEG); else do_stats(player, arg_left); } *************** *** 918,924 **** } COMMAND (cmd_brief) { ! do_examine(player, arg_left, 1, 0); } COMMAND (cmd_drop) { --- 918,924 ---- } COMMAND (cmd_brief) { ! do_examine(player, arg_left, EXAM_BRIEF, 0); } COMMAND (cmd_drop) { *************** *** 928,940 **** COMMAND (cmd_examine) { int all = SW_ISSET(sw, SWITCH_ALL); if (SW_ISSET(sw, SWITCH_BRIEF)) ! do_examine(player, arg_left, 1, all); else if (SW_ISSET(sw, SWITCH_DEBUG)) do_debug_examine(player, arg_left); else if (SW_ISSET(sw, SWITCH_MORTAL)) ! do_examine(player, arg_left, 2, all); else ! do_examine(player, arg_left, 0, all); } COMMAND (cmd_empty) { --- 928,940 ---- COMMAND (cmd_examine) { int all = SW_ISSET(sw, SWITCH_ALL); if (SW_ISSET(sw, SWITCH_BRIEF)) ! do_examine(player, arg_left, EXAM_BRIEF, all); else if (SW_ISSET(sw, SWITCH_DEBUG)) do_debug_examine(player, arg_left); else if (SW_ISSET(sw, SWITCH_MORTAL)) ! do_examine(player, arg_left, EXAM_MORTAL, all); else ! do_examine(player, arg_left, EXAM_NORMAL, all); } COMMAND (cmd_empty) { *** 1_7_7.1051/src/bsd.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.8.2.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.32 660) --- 1_7_7.1061(w)/src/bsd.c Sun, 06 Jun 2004 20:04:12 -0500 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.8.2.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.33 660) *************** *** 1670,1676 **** /* ARGSUSED */ static DESC * ! initializesock(int s, char *addr, char *ip, int use_ssl) { DESC *d; d = (DESC *) mush_malloc(sizeof(DESC), "descriptor"); --- 1670,1677 ---- /* ARGSUSED */ static DESC * ! initializesock(int s, char *addr, char *ip, int use_ssl ! __attribute__ ((__unused__))) { DESC *d; d = (DESC *) mush_malloc(sizeof(DESC), "descriptor"); *************** *** 2557,2563 **** /* ARGSUSED */ static int ! process_input(DESC *d, int output_ready) { int got = 0; char tbuf1[BUFFER_LEN]; --- 2558,2564 ---- /* ARGSUSED */ static int ! process_input(DESC *d, int output_ready __attribute__ ((__unused__))) { int got = 0; char tbuf1[BUFFER_LEN]; *************** *** 3386,3392 **** tprintf("Uptime: %s", show_time(first_start_time, 0))); queue_string_eol(call_by, tprintf("Connected: %d", count)); queue_string_eol(call_by, tprintf("Size: %d", db_top)); ! queue_string_eol(call_by, tprintf("Version: %s", SHORTVN)); #ifdef PATCHES queue_string_eol(call_by, tprintf("Patches: %s", PATCHES)); #endif --- 3387,3393 ---- tprintf("Uptime: %s", show_time(first_start_time, 0))); queue_string_eol(call_by, tprintf("Connected: %d", count)); queue_string_eol(call_by, tprintf("Size: %d", db_top)); ! queue_string_eol(call_by, tprintf("Version: %sp%s", VERSION, PATCHLEVEL)); #ifdef PATCHES queue_string_eol(call_by, tprintf("Patches: %s", PATCHES)); #endif *** 1_7_7.1051/hdrs/version.h Wed, 26 May 2004 13:09:07 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.36 660) --- 1_7_7.1061(w)/hdrs/version.h Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.37 660) *************** *** 1,3 **** ! #define VERSION "PennMUSH version 1.7.7 patchlevel 31 [05/26/2004]" ! #define SHORTVN "PennMUSH 1.7.7p32" ! #define NUMVERSION 001007007032 --- 1,4 ---- ! #define VERSION "1.7.7" ! #define PATCHLEVEL "33" ! #define PATCHDATE "[06/03/2004]" ! #define NUMVERSION 001007007033 *** 1_7_7.1051/hdrs/game.h Sun, 23 May 2004 10:27:43 -0500 dunemush (pennmush/d/12_game.h 1.28.1.2.1.1.1.1.1.1.1.7.1.18 660) --- 1_7_7.1061(w)/hdrs/game.h Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/d/12_game.h 1.28.1.2.1.1.1.1.1.1.1.7.1.19 660) *************** *** 31,37 **** /* From cque.c */ extern void do_wait (dbref player, dbref cause, char *arg1, char *cmd, int until); ! extern void do_queue(dbref player, const char *what, int flag); extern void do_halt1(dbref player, const char *arg1, const char *arg2); extern void do_allhalt(dbref player); extern void do_allrestart(dbref player); --- 31,38 ---- /* From cque.c */ extern void do_wait (dbref player, dbref cause, char *arg1, char *cmd, int until); ! enum queue_type { QUEUE_ALL, QUEUE_NORMAL, QUEUE_SUMMARY, QUEUE_QUICK }; ! extern void do_queue(dbref player, const char *what, enum queue_type flag); extern void do_halt1(dbref player, const char *arg1, const char *arg2); extern void do_allhalt(dbref player); extern void do_allrestart(dbref player); *************** *** 62,68 **** extern void do_shutdown(dbref player, enum shutdown_type panic_flag); /* From look.c */ ! extern void do_examine(dbref player, const char *name, int brief, int all); extern void do_inventory(dbref player); extern void do_find(dbref player, const char *name, char **argv); extern void do_whereis(dbref player, const char *name); --- 63,71 ---- extern void do_shutdown(dbref player, enum shutdown_type panic_flag); /* From look.c */ ! enum exam_type { EXAM_NORMAL, EXAM_BRIEF, EXAM_MORTAL }; ! extern void do_examine(dbref player, const char *name, enum exam_type flag, ! int all); extern void do_inventory(dbref player); extern void do_find(dbref player, const char *name, char **argv); extern void do_whereis(dbref player, const char *name); *************** *** 159,165 **** extern void do_stats(dbref player, const char *name); extern void do_newpassword (dbref player, const char *name, const char *password); ! extern void do_boot(dbref player, const char *name, int flag); extern void do_chzoneall(dbref player, const char *name, const char *target); extern int force_by_number(dbref player, char *command); extern void do_power(dbref player, const char *name, const char *power); --- 162,169 ---- extern void do_stats(dbref player, const char *name); extern void do_newpassword (dbref player, const char *name, const char *password); ! enum boot_type { BOOT_NAME, BOOT_DESC, BOOT_SELF }; ! extern void do_boot(dbref player, const char *name, enum boot_type flag); extern void do_chzoneall(dbref player, const char *name, const char *target); extern int force_by_number(dbref player, char *command); extern void do_power(dbref player, const char *name, const char *power); *** 1_7_7.1051/hdrs/extmail.h Sat, 01 May 2004 13:20:55 -0500 dunemush (pennmush/d/15_extmail.h 1.6.1.11 660) --- 1_7_7.1061(w)/hdrs/extmail.h Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/d/15_extmail.h 1.6.1.12 660) *************** *** 81,87 **** extern void mail_init(void); extern int mdb_top; extern void do_mail(dbref player, char *arg1, char *arg2); ! extern void do_mail_stats(dbref player, char *name, int full); extern void do_mail_debug(dbref player, const char *action, const char *victim); extern void do_mail_nuke(dbref player); extern void do_mail_change_folder(dbref player, char *fld, char *newname); --- 81,88 ---- extern void mail_init(void); extern int mdb_top; extern void do_mail(dbref player, char *arg1, char *arg2); ! enum mail_stats_type { MSTATS_COUNT, MSTATS_READ, MSTATS_SIZE }; ! extern void do_mail_stats(dbref player, char *name, enum mail_stats_type full); extern void do_mail_debug(dbref player, const char *action, const char *victim); extern void do_mail_nuke(dbref player); extern void do_mail_change_folder(dbref player, char *fld, char *newname); *** 1_7_7.1051/hdrs/externs.h Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/d/16_externs.h 1.1.1.53.1.2.1.8.2.1.1.2.1.1.1.1.1.2.1.6.1.3.1.4.3.1.1.1.1.18.1.8.1.1.1.19 660) --- 1_7_7.1061(w)/hdrs/externs.h Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/d/16_externs.h 1.1.1.53.1.2.1.8.2.1.1.2.1.1.1.1.1.2.1.6.1.3.1.4.3.1.1.1.1.18.1.8.1.1.1.20 660) *************** *** 290,295 **** --- 290,299 ---- extern int did_it(dbref player, dbref thing, const char *what, const char *def, const char *owhat, const char *odef, const char *awhat, dbref loc); + extern int did_it_with(dbref player, dbref thing, const char *what, + const char *def, const char *owhat, const char *odef, + const char *awhat, dbref loc, dbref env0, dbref env1, + int flags); extern int did_it_interact(dbref player, dbref thing, const char *what, const char *def, const char *owhat, const char *odef, const char *awhat, dbref loc, *** 1_7_7.1051/hdrs/extchat.h Wed, 19 May 2004 12:24:02 -0500 dunemush (pennmush/d/17_extchat.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.3.1.1.1.1.2.2.1.9.1.1.1.5.1.3 660) --- 1_7_7.1061(w)/hdrs/extchat.h Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/d/17_extchat.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.3.1.1.1.1.2.2.1.9.1.1.1.5.1.4 660) *************** *** 204,213 **** /* For use in channel matching */ ! #define CMATCH_NONE 0 ! #define CMATCH_EXACT 1 ! #define CMATCH_PARTIAL 2 ! #define CMATCH_AMBIG 3 #define CMATCHED(i) (((i) == CMATCH_EXACT) | ((i) == CMATCH_PARTIAL)) /* Some globals */ --- 204,210 ---- /* For use in channel matching */ ! enum cmatch_type { CMATCH_NONE, CMATCH_EXACT, CMATCH_PARTIAL, CMATCH_AMBIG }; #define CMATCHED(i) (((i) == CMATCH_EXACT) | ((i) == CMATCH_PARTIAL)) /* Some globals */ *************** *** 238,245 **** extern void do_chat(dbref player, CHAN *chan, const char *arg1); extern void do_chan_admin (dbref player, char *name, const char *perms, int flag); ! extern int find_channel(const char *p, CHAN **chan, dbref player); ! extern int find_channel_partial(const char *p, CHAN **chan, dbref player); extern void do_channel_list(dbref player, const char *partname); extern int do_chat_by_name (dbref player, const char *name, const char *msg, int source); --- 235,243 ---- extern void do_chat(dbref player, CHAN *chan, const char *arg1); extern void do_chan_admin (dbref player, char *name, const char *perms, int flag); ! extern enum cmatch_type find_channel(const char *p, CHAN **chan, dbref player); ! extern enum cmatch_type find_channel_partial(const char *p, CHAN **chan, ! dbref player); extern void do_channel_list(dbref player, const char *partname); extern int do_chat_by_name (dbref player, const char *name, const char *msg, int source); *** 1_7_7.1051/hdrs/dbdefs.h Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/d/18_dbdefs.h 1.1.1.1.1.1.1.1.1.1.1.2.2.2.1.1.1.1.1.1.2.1.1.22.1.6.1.10 660) --- 1_7_7.1061(w)/hdrs/dbdefs.h Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/d/18_dbdefs.h 1.1.1.1.1.1.1.1.1.1.1.2.2.2.1.1.1.1.1.1.2.1.1.22.1.6.1.11 660) *************** *** 62,74 **** #define Typeof(x) (Type(x) & ~TYPE_MARKED) /* Check for a specific one */ ! #define IsPlayer(x) (!!(Typeof(x) & TYPE_PLAYER)) ! #define IsRoom(x) (!!(Typeof(x) & TYPE_ROOM)) ! #define IsThing(x) (!!(Typeof(x) & TYPE_THING)) ! #define IsExit(x) (!!(Typeof(x) & TYPE_EXIT)) /* Was Destroyed() */ ! #define IsGarbage(x) (!!(Typeof(x) & TYPE_GARBAGE)) ! #define Marked(x) (!!(db[(x)].type & TYPE_MARKED)) #define IS(thing,type,flag) \ ((Typeof(thing) == type) && has_flag_by_name(thing,flag,type)) --- 62,74 ---- #define Typeof(x) (Type(x) & ~TYPE_MARKED) /* Check for a specific one */ ! #define IsPlayer(x) ((Typeof(x) & TYPE_PLAYER) == TYPE_PLAYER) ! #define IsRoom(x) ((Typeof(x) & TYPE_ROOM) == TYPE_ROOM) ! #define IsThing(x) ((Typeof(x) & TYPE_THING) == TYPE_THING) ! #define IsExit(x) ((Typeof(x) & TYPE_EXIT) == TYPE_EXIT) /* Was Destroyed() */ ! #define IsGarbage(x) ((Typeof(x) & TYPE_GARBAGE) == TYPE_GARBAGE) ! #define Marked(x) ((db[(x)].type & TYPE_MARKED) == TYPE_MARKED) #define IS(thing,type,flag) \ ((Typeof(thing) == type) && has_flag_by_name(thing,flag,type)) *** 1_7_7.1051/hdrs/command.h Sun, 23 May 2004 10:53:35 -0500 dunemush (pennmush/d/24_command.h 1.32 660) --- 1_7_7.1061(w)/hdrs/command.h Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/d/24_command.h 1.33 660) *************** *** 6,12 **** #define SW_SET(m,n) (m[(n) >> 3] |= (1 << ((n) & 0x7))) #define SW_CLR(m,n) (m[(n) >> 3] &= ~(1 << ((n) & 0x7))) #define SW_ISSET(m,n) (m[(n) >> 3] & (1 << ((n) & 0x7))) ! #define SW_ZERO(m) bzero(m, NUM_BYTES) /* These are type restrictors */ #define CMD_T_ROOM 0x80000000 --- 6,12 ---- #define SW_SET(m,n) (m[(n) >> 3] |= (1 << ((n) & 0x7))) #define SW_CLR(m,n) (m[(n) >> 3] &= ~(1 << ((n) & 0x7))) #define SW_ISSET(m,n) (m[(n) >> 3] & (1 << ((n) & 0x7))) ! #define SW_ZERO(m) memset(m, 0, NUM_BYTES) /* These are type restrictors */ #define CMD_T_ROOM 0x80000000 *** 1_7_7.1051/src/mysocket.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1.1.4.1.4.1.17 660) --- 1_7_7.1061(w)/src/mysocket.c Sun, 06 Jun 2004 20:04:13 -0500 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1.1.4.1.4.1.18 660) *************** *** 993,999 **** canon = NULL; if (hintsp == NULL) { ! bzero(&hints, sizeof(hints)); hints.ai_family = AF_UNSPEC; } else hints = *hintsp; /* struct copy */ --- 993,999 ---- canon = NULL; if (hintsp == NULL) { ! memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; } else hints = *hintsp; /* struct copy */ *** 1_7_7.1051/win32/pennmush.dsp Wed, 26 May 2004 13:48:29 -0500 dunemush (pennmush/f/9_pennmush.d 1.17 640) --- 1_7_7.1061(w)/win32/pennmush.dsp Wed, 02 Jun 2004 22:13:02 -0500 dunemush (pennmush/f/9_pennmush.d 1.18 640) *************** *** 314,320 **** # End Source File # Begin Source File ! SOURCE=F:\pennmush\src\bufferq.c # End Source File # Begin Source File --- 314,320 ---- # End Source File # Begin Source File ! SOURCE=.\src\bufferq.c # End Source File # Begin Source File *************** *** 538,544 **** # End Source File # Begin Source File ! SOURCE=F:\pennmush\src\sql.c # End Source File # Begin Source File --- 538,544 ---- # End Source File # Begin Source File ! SOURCE=.\src\sql.c # End Source File # Begin Source File *** 1_7_7.1051/win32/config.h Wed, 26 May 2004 13:48:29 -0500 dunemush (pennmush/f/14_config.h 1.9 600) --- 1_7_7.1061(w)/win32/config.h Wed, 02 Jun 2004 08:18:30 -0500 dunemush (pennmush/f/14_config.h 1.10 600) *************** *** 787,793 **** /* HAS_MYSQL: * Defined if mysql client libraries are available. */ ! /* #define HAS_MYSQL /* HAS_OPENSSL: * Defined if openssl 0.9.6+ is available. --- 787,793 ---- /* HAS_MYSQL: * Defined if mysql client libraries are available. */ ! /* #define HAS_MYSQL /**/ /* HAS_OPENSSL: * Defined if openssl 0.9.6+ is available. *** 1_7_7.1051/hints/darwin.sh Tue, 07 Nov 2000 13:04:29 -0600 dunemush (pennmush/f/31_darwin.sh 1.1 660) --- 1_7_7.1061(w)/hints/darwin.sh Sun, 06 Jun 2004 20:03:19 -0500 dunemush (pennmush/f/31_darwin.sh 1.1 660) *************** *** 1,3 **** usenm="n" cdecl='' ! d_attribut='undef' --- 1,3 ---- usenm="n" cdecl='' ! *** 1_7_7.1051/game/txt/hlp/pennvOLD.hlp Fri, 14 May 2004 14:58:07 -0500 dunemush (pennmush/g/30_pennvOLD.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.5 660) --- 1_7_7.1061(w)/game/txt/hlp/pennvOLD.hlp Sun, 06 Jun 2004 20:04:15 -0500 dunemush (pennmush/g/30_pennvOLD.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.6 660) *************** *** 4418,4424 **** type 'help p'. For example, 'help 1.7.2p3' 1.7.7: 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 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, --- 4418,4424 ---- type 'help p'. For example, 'help 1.7.2p3' 1.7.7: 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 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, *** 1_7_7.1051/game/txt/hlp/pennv177.hlp Mon, 31 May 2004 08:43:56 -0500 dunemush (pennmush/g/34_pennv177.h 1.226.1.14.1.104 660) --- 1_7_7.1061(w)/game/txt/hlp/pennv177.hlp Sun, 06 Jun 2004 20:04:15 -0500 dunemush (pennmush/g/34_pennv177.h 1.226.1.14.1.111 660) *************** *** 1,4 **** ! & 1.7.7p32 & changes This is a list of changes in this patchlevel which are probably of interest to players. More information about new commands and functions --- 1,4 ---- ! & 1.7.7p33 & changes This is a list of changes in this patchlevel which are probably of interest to players. More information about new commands and functions *************** *** 11,16 **** --- 11,36 ---- A list of the patchlevels associated with each release can be read in 'help patchlevels'. + Version 1.7.7 patchlevel 33 June 3, 2004 + + Minor changes (internals): + * IsPlayer, etc. macros rewritten for clarity by Luke@M*U*S*H. + * Use enums in place of some more #defines and magic numbers. [SW] + * New did_it_with() hc function simplifies passing a dbref as %0 + to did_it actions. [SW] + Fixes: + * The SQL_OK power could get double-added. If this happened to you, + delete one of them and double-check that all sql-using objects + still have the power set. Report by Mordie@M*U*S*H. + * Missing include in game.c fixed. + * Improper include in bufferq.c fixed. Report by Leona and Walker@M*U*S*H. + * Obsolete bzero() uses removed. [SW] + * New win32/pennmush.dsp. + * Help fix by bleeder@M*U*S*H. + * Mac OS X linting [SW]. + + + & 1.7.7p32 Version 1.7.7 patchlevel 32 May 26, 2004 Major Changes: *** 1_7_7.1051/hdrs/chunk.h Wed, 01 Oct 2003 21:42:14 -0500 dunemush (pennmush/g/37_chunk.h 1.4.1.1 660) --- 1_7_7.1061(w)/hdrs/chunk.h Sun, 06 Jun 2004 20:04:14 -0500 dunemush (pennmush/g/37_chunk.h 1.4.1.1.1.2 660) *************** *** 22,28 **** void chunk_migration(int count, chunk_reference_t ** references); int chunk_num_swapped(void); void chunk_init(void); ! void chunk_stats(dbref player, int which); void chunk_new_period(void); int chunk_fork_file(void); --- 22,31 ---- void chunk_migration(int count, chunk_reference_t ** references); int chunk_num_swapped(void); void chunk_init(void); ! enum chunk_stats_type { CSTATS_SUMMARY, CSTATS_REGIONG, CSTATS_PAGINGG, ! CSTATS_FREESPACEG, CSTATS_REGION, CSTATS_PAGING ! }; ! void chunk_stats(dbref player, enum chunk_stats_type which); void chunk_new_period(void); int chunk_fork_file(void); *** 1_7_7.1051/src/chunk.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/g/38_chunk.c 1.36 660) --- 1_7_7.1061(w)/src/chunk.c Sun, 06 Jun 2004 20:04:12 -0500 dunemush (pennmush/g/38_chunk.c 1.37 660) *************** *** 219,224 **** --- 219,225 ---- #include "conf.h" #include + #include #include #include *************** *** 2628,2660 **** /** Report statistics. * Display either the statistics summary or one of the histograms. * \param player the player to display it to, or NOTHING to log it. ! * \param which 0 for the summary, 1 for the region histogram, ! * 2 for the paging histogram, or 3 for the freespace histogram, ! * 4 for the region stats, 5 for the paging counts. */ void ! chunk_stats(dbref player, int which) { switch (which) { ! case 0: chunk_statistics(player); break; ! case 1: chunk_histogram(player, chunk_regionhist(), "Chart number of regions (y) vs. references (x)"); break; ! case 2: chunk_histogram(player, stat_paging_histogram, "Chart pages in/out (y) vs. references (x)"); break; ! case 3: chunk_histogram(player, chunk_freehist(), "Chart region free space (y) vs. references (x)"); break; ! case 4: chunk_region_statistics(player); break; ! case 5: chunk_page_stats(player); break; } --- 2629,2659 ---- /** Report statistics. * Display either the statistics summary or one of the histograms. * \param player the player to display it to, or NOTHING to log it. ! * \param which what type of information to display. */ void ! chunk_stats(dbref player, enum chunk_stats_type which) { switch (which) { ! case CSTATS_SUMMARY: chunk_statistics(player); break; ! case CSTATS_REGIONG: chunk_histogram(player, chunk_regionhist(), "Chart number of regions (y) vs. references (x)"); break; ! case CSTATS_PAGINGG: chunk_histogram(player, stat_paging_histogram, "Chart pages in/out (y) vs. references (x)"); break; ! case CSTATS_FREESPACEG: chunk_histogram(player, chunk_freehist(), "Chart region free space (y) vs. references (x)"); break; ! case CSTATS_REGION: chunk_region_statistics(player); break; ! case CSTATS_PAGING: chunk_page_stats(player); break; } *** 1_7_7.1051/src/bufferq.c Wed, 26 May 2004 13:09:07 -0500 dunemush (pennmush/h/13_bufferq.c 1.6 660) --- 1_7_7.1061(w)/src/bufferq.c Sun, 06 Jun 2004 20:04:12 -0500 dunemush (pennmush/h/13_bufferq.c 1.7 660) *************** *** 16,21 **** --- 16,22 ---- #include #include #include + #include #ifdef I_SYS_TIME #include #endif *************** *** 23,35 **** #ifdef I_SYS_TYPES #include #endif - #include #include "conf.h" #include "externs.h" #include "flags.h" #include "dbdefs.h" #include "bufferq.h" #include "log.h" #include "confmagic.h" --- 24,36 ---- #ifdef I_SYS_TYPES #include #endif #include "conf.h" #include "externs.h" #include "flags.h" #include "dbdefs.h" #include "bufferq.h" + #include "mymalloc.h" #include "log.h" #include "confmagic.h"