This is patch34 to PennMUSH 1.7.7. After applying this patch, you will have version 1.7.7p34 To apply this patch, save it to a file in your top-level MUSH directory, and do the following: patch -p1 < 1.7.7-patch34 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: Flags and Powers: * Debit power allows the giving of negative amounts of money. Suggested by Hemlon@SevenStones. * The setting and resetting of flags and powers can be logged by using the new 'log' restriction. Changes were made in flaglocal.dst which you must carry over into flaglocal.c (or, if you don't use flaglocal.c, just rm src/flaglocal.c and flaglocal.dst will be copied in its place). Suggested by Sholevi@M*U*S*H [SW] * Setting and resetting @powers are once again logged by default. [SW] Locks: * @lock/speech can now be set by unprivileged players. @lock/speech now applies to all players (it is no longer automatically overridden by admin). SPEECH_LOCK`*FAILURE attributes can be used to override the default failure messages when @lock/speech fails. Commands: * ex/parent examines an object and shows attributes that will be inherited from its parents (if you are permitted to examine the parent as well). Suggested by BladedThoth@M*U*S*H. * examine now shows the complete (examinable-by-enactor) chain of parent objects, not just the nearest parent. Suggested by Luke@M*U*S*H. Functions: * mailsend() is a function form of @mail/send. Suggested by Moe@ChicagoMUSH * ncon, nvcon, nexits, nvexits, nplayers, nvplayers, nwho, nvwho functions to count the number of each thing. Patch by Walker@M*U*S*H. * xcon, xvcon, xexits, xvexits, xplayers, xvplayers, xwho, xvwho functions to extract slices of potentially long contents, etc. lists. [Rhost,TM] Patch by Walker@M*U*S*H. Minor changes (user-visible): * Players can no longer be set CHOWN_OK. Suggested by Intrevis@M*U*S*H. If you have existing CHOWN_OK players, you probably want to unset this from them, or the results will be confusing (they'll continue to appear to have the flag, even though it won't be testable or settable or clearable; this is desired behavior). * If you're See_All and Pemit_All, you may now @cemit on any channel. Based on a suggestion by Philip Mak. * Attempting to give a player more than max_pennies will give them enough to get them to max_pennies, instead of being treated as an error. Similarly, taking away more pennies than they have will take away exactly all their pennies. * Improved errors for unprivileged users doing @boot/port. Suggested by Intrevis@M*U*S*H. [TAP] Minor changes (internals): * pre OS X Macintosh OSes are no longer supported. Hints for Darwin are improved. [SW] * An extra file descriptor only needed on Sun OS boxes was being opened on all unix systems. [SW] * If no config file name is given on the netmush program's command line, it will assume you mean mush.cnf instead of quitting. You should still be using the restart script instead of netmush directly, though, as it does important things like using the right database... [SW] * 'make local-files' will copy all the src/*local.dst files to their respective .c counterparts. Suggested by Nymeria@M*U*S*H. [SW] Fixes: * Configure handles the case where SO_KEEPALIVE works but TCP_KEEPIDLE isn't defined. [SW] * Win32 portability fixes and mingw hints. [EEH] * Raising max_logins from 0 with @config/set wouldn't take existing connections into account. [SW] * $commands starting with # (that don't look like an @force by dbref) will now be matched. Reported by Intrevis@M*U*S*H. * version() is verbose again. Reported by Sholevi@M*U*S*H. * The double-add of SQL_OK on minimal.db is now really fixed. See p33 changes for information. Report by Mordie@M*U*S*H. * Help fixes by Kevin@M*U*S*H and Cerekk@bDv. * @boot/desc on one's own descriptor is no longer translated to @boot/me. [TAP] * Overflow of integer argument in giving pennies fixed. Report by Sholevi@M*U*S*H. * Typo in fun_vcross() fixed. [SW] * Configure does better when ssl shared libraries, but not static libraries, are available. You can use -D no_openssl to skip SSL checks. Prereq: 1.7.7p33 *** 1_7_7.1063/Patchlevel Thu, 03 Jun 2004 17:00:50 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.35 600) --- 1_7_7.1098(w)/Patchlevel Tue, 22 Jun 2004 09:18:57 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.36 600) *************** *** 1,2 **** Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.7p33 --- 1,2 ---- Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.7p34 *** 1_7_7.1063/CHANGES.OLD Wed, 19 Feb 2003 13:20:17 -0600 dunemush (pennmush/7_CHANGES.OL 1.6.1.4.1.1 600) --- 1_7_7.1098(w)/CHANGES.OLD Fri, 18 Jun 2004 09:58:04 -0500 dunemush (pennmush/7_CHANGES.OL 1.6.1.4.1.2 600) *************** *** 2658,2664 **** Fixed by [TAP]. ! Version 1.6.7 patchlevel 0 Augest 22, 1996 Major Changes: --- 2658,2664 ---- Fixed by [TAP]. ! Version 1.6.7 patchlevel 0 August 22, 1996 Major Changes: *** 1_7_7.1063/CHANGES.177 Sun, 06 Jun 2004 20:04:25 -0500 dunemush (pennmush/g/23_CHANGES 1.48.1.258.1.14.1.112 600) --- 1_7_7.1098(w)/CHANGES.177 Mon, 28 Jun 2004 09:16:53 -0500 dunemush (pennmush/g/23_CHANGES 1.48.1.258.1.14.1.134 600) *************** *** 18,23 **** --- 18,99 ---- ========================================================================== + Version 1.7.7 patchlevel 34 June 22, 2004 + + Flags and Powers: + * Debit power allows the giving of negative amounts of money. + Suggested by Hemlon@SevenStones. + * The setting and resetting of flags and powers can be logged + by using the new 'log' restriction. Changes were made in + flaglocal.dst which you must carry over into flaglocal.c + (or, if you don't use flaglocal.c, just rm src/flaglocal.c and + flaglocal.dst will be copied in its place). Suggested by Sholevi@M*U*S*H + [SW] + * Setting and resetting @powers are once again logged by default. [SW] + Locks: + * @lock/speech can now be set by unprivileged players. @lock/speech + now applies to all players (it is no longer automatically overridden + by admin). SPEECH_LOCK`*FAILURE attributes can be used to override + the default failure messages when @lock/speech fails. + Commands: + * ex/parent examines an object and shows attributes that will be + inherited from its parents (if you are permitted to examine + the parent as well). Suggested by BladedThoth@M*U*S*H. + * examine now shows the complete (examinable-by-enactor) chain of + parent objects, not just the nearest parent. Suggested by Luke@M*U*S*H. + Functions: + * mailsend() is a function form of @mail/send. Suggested by Moe@ChicagoMUSH + * ncon, nvcon, nexits, nvexits, nplayers, nvplayers, nwho, nvwho + functions to count the number of each thing. Patch by Walker@M*U*S*H. + * xcon, xvcon, xexits, xvexits, xplayers, xvplayers, xwho, xvwho functions + to extract slices of potentially long contents, etc. lists. [Rhost,TM] + Patch by Walker@M*U*S*H. + Minor changes (user-visible): + * Players can no longer be set CHOWN_OK. Suggested by Intrevis@M*U*S*H. + If you have existing CHOWN_OK players, you probably want to unset + this from them, or the results will be confusing (they'll continue + to appear to have the flag, even though it won't be testable or + settable or clearable; this is desired behavior). + * If you're See_All and Pemit_All, you may now @cemit on any channel. + Based on a suggestion by Philip Mak. + * Attempting to give a player more than max_pennies will give them + enough to get them to max_pennies, instead of being treated as + an error. Similarly, taking away more pennies than they have will + take away exactly all their pennies. + * Improved errors for unprivileged users doing @boot/port. + Suggested by Intrevis@M*U*S*H. [TAP] + Minor changes (internals): + * pre OS X Macintosh OSes are no longer supported. Hints for + Darwin are improved. [SW] + * An extra file descriptor only needed on Sun OS boxes was being + opened on all unix systems. [SW] + * If no config file name is given on the netmush program's command line, + it will assume you mean mush.cnf instead of quitting. You should still + be using the restart script instead of netmush directly, though, as it + does important things like using the right database... [SW] + * 'make local-files' will copy all the src/*local.dst files to their + respective .c counterparts. Suggested by Nymeria@M*U*S*H. [SW] + Fixes: + * Configure handles the case where SO_KEEPALIVE works but TCP_KEEPIDLE isn't + defined. [SW] + * Win32 portability fixes and mingw hints. [EEH] + * Raising max_logins from 0 with @config/set wouldn't take existing + connections into account. [SW] + * $commands starting with # (that don't look like an @force by dbref) + will now be matched. Reported by Intrevis@M*U*S*H. + * version() is verbose again. Reported by Sholevi@M*U*S*H. + * The double-add of SQL_OK on minimal.db is now really fixed. + See p33 changes for information. Report by Mordie@M*U*S*H. + * Help fixes by Kevin@M*U*S*H and Cerekk@bDv. + * @boot/desc on one's own descriptor is no longer translated to + @boot/me. [TAP] + * Overflow of integer argument in giving pennies fixed. Report by + Sholevi@M*U*S*H. + * Typo in fun_vcross() fixed. [SW] + * Configure does better when ssl shared libraries, but not static + libraries, are available. You can use -D no_openssl to skip SSL checks. + + Version 1.7.7 patchlevel 33 June 3, 2004 Minor changes (internals): *** 1_7_7.1063/game/txt/hlp/penntop.hlp Mon, 17 May 2004 19:52:44 -0500 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.1.1.1.1.8.1.9 600) --- 1_7_7.1098(w)/game/txt/hlp/penntop.hlp Mon, 07 Jun 2004 15:29:56 -0500 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.1.1.1.1.8.1.11 600) *************** *** 1032,1037 **** --- 1032,1038 ---- boot Can use @boot command. builder Can use Builder commands. chat_privs Can use Admin channels. + debit Can use give with a negative amount. functions Can use @function command. guest Guest. Restricted command set. halt Can @halt others' objects and do @allhalt. *************** *** 1055,1060 **** --- 1056,1062 ---- search Can do @search, @stats, and @entrances on anything. see_all Sees everything as if it were Visual. see_queue Can do @ps on anyone, and @ps/all. + sql_ok Can perform SQL queries tport_anything Can @teleport anything. tport_anywhere Can @teleport to anywhere. unkillable Can not be killed *************** *** 1309,1316 **** Some recognized NAMEs: digit, for numbers. [[:digit:]] is the same as \d. [[:^digit:]] is the same as \D. ! alpha, for letters. alnum, for numbers and letters. ! lower, for lower-case letters. upper, for upper-case letters. word, for word characters. [[:word:]] is the same as \w. [[:^word:]] is the same as \W. space, for whitespace characters. [[:space:]] is the same as \s. --- 1311,1320 ---- Some recognized NAMEs: digit, for numbers. [[:digit:]] is the same as \d. [[:^digit:]] is the same as \D. ! alpha, for letters. ! alnum, for numbers and letters. ! lower, for lower-case letters. ! upper, for upper-case letters. word, for word characters. [[:word:]] is the same as \w. [[:^word:]] is the same as \W. space, for whitespace characters. [[:space:]] is the same as \s. *************** *** 1321,1334 **** These keywords (Or the corresponding \codes) should be used instead of explicit ranges where possible to improve portability. For example, [A-Za-z] and [[:alpha:]] are not the same thing in languages with accented ! characters. There are other keywords, but the ones listed are the most ! useful. Examples: > say regmatch(foo_bar, lit(^[[:word:]]+$)) You say "1" > say regmatch(foo bar, lit(^[[:word:]]+$)) You say "0" & REGEXP EXAMPLES Topic: REGEXP EXAMPLES --- 1325,1340 ---- These keywords (Or the corresponding \codes) should be used instead of explicit ranges where possible to improve portability. For example, [A-Za-z] and [[:alpha:]] are not the same thing in languages with accented ! characters. Examples: > say regmatch(foo_bar, lit(^[[:word:]]+$)) You say "1" > say regmatch(foo bar, lit(^[[:word:]]+$)) You say "0" + + Other, less useful, character class keywords include ascii, cntrl, + graph, print, punct, and xdigit. & REGEXP EXAMPLES Topic: REGEXP EXAMPLES *** 1_7_7.1063/game/txt/hlp/pennfunc.hlp Mon, 24 May 2004 20:58:44 -0500 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.7 600) --- 1_7_7.1098(w)/game/txt/hlp/pennfunc.hlp Mon, 21 Jun 2004 16:08:01 -0500 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.11 600) *************** *** 143,149 **** Mail functions work with @mail. folderstats() mail() maildstats() mailfrom() mailfstats() ! mailstats() mailstatus() mailsubject() mailtime() & List functions List functions take at least one list of elements and return transformed --- 143,149 ---- Mail functions work with @mail. folderstats() mail() maildstats() mailfrom() mailfstats() ! mailsend() mailstats() mailstatus() mailsubject() mailtime() & List functions List functions take at least one list of elements and return transformed *************** *** 596,601 **** --- 596,603 ---- Returns with the first character capitalized. Example: capstr(foo bar baz) returns "Foo bar baz" + + See also: lcstr(), ucstr() & CAT() cat(,[,,,...]) *************** *** 1919,1924 **** --- 1921,1928 ---- Returns with all letters converted to lowercase. Example: lcstr(Foo BAR bAz) returns "foo bar baz" + + See also: capstr(), ucstr() & LDELETE() Ldelete(,[,]) *************** *** 2255,2261 **** players. When mortals use this function, the dbref numbers of DARK wizards or royalty do NOT appear on the dbref list. ! See also: mwho() & MAIL() mail() mail() --- 2259,2265 ---- players. When mortals use this function, the dbref numbers of DARK wizards or royalty do NOT appear on the dbref list. ! See also: mwho(), nwho(), xwho() & MAIL() mail() mail() *************** *** 2309,2314 **** --- 2313,2323 ---- > think mailfstats(One) <# sent> <# sent unread> <# sent cleared> <# sent bytes> <# received> <# received unread> <# received cleared> <# received bytes> + & MAILSEND() + mailsend(,[/]) + + This function sends a message to a player, just like @mail/send. + It returns nothing if successful, or an error message. & MAP() map([/],[,][, ]) *************** *** 2612,2617 **** --- 2621,2635 ---- apply to exits, as well. See also: lcon(), lexits(), con(), exit() + & NMWHO() + nmwho() + + This returns a count of all currently connected, non-hidden players. + It's exactly the same as nwho() used by a mortal, and is suitable + for use on privileged global objects who need an unprivileged count + of who's online. + + See also: nwho(), mwho(), xmwho() & NOR() nor(, ,...) *************** *** 2636,2641 **** --- 2654,2699 ---- Returns the dbref number of the object, which must be in the same room as the object executing num. + & NVCON() + & NCON() + ncon() + nvcon() + + These functions return a count of the contents in a container. + + ncon() is identical to words(lcon()) + nvcon() is identical to words(lvcon()) + + See also: nexits(), nplayers(), xcon(), lcon(), lvcon() + & NVEXITS() + & NEXITS() + nexits() + nvexits() + + These functions return a count of the exits in a room. + + nexits() is identical to words(lexits()) + nvexits() is identical to words(lvexits()) + + See also: ncon(), nplayers(), xexits(), lexits(), lvexits() + & NVPLAYERS() + & NPLAYERS() + nplayers() + nvplayers() + + These functions return a count of the players in a container. + + nplayers() is identical to words(lplayers()) + nvplayers() is identical to words(lvplayers()) + + See also: ncon(), nexits(), xplayers(), lplayers(), lvplayers() + & NWHO() + nwho() + + This returns a count of all currently-connected players. When + mortals use this function, DARK wizards or royalty are NOT counted. + + See also: lwho(), nmwho(), xwho() & OBJ() obj() *************** *** 3938,3943 **** --- 3996,4003 ---- Returns with all letters converted to uppercase. Example: ucstr(Foo BAR baz) returns "FOO BAR BAZ" + + See also: lcstr(), capstr() & UDEFAULT() Function: udefault([/],[,]...) *************** *** 4243,4248 **** --- 4303,4369 ---- inputs is equivalent to true(1). See BOOLEAN VALUES. See also: and(), or(), not(), nor() + & XVCON() + & XCON() + xcon(,,) + xvcon(,,) + + xcon() fetches or fewer item dbrefs from 's contents + starting at position . It is useful when the number of objects + in a container causes lcon() to exceed the buffer limit. + + It is equivalent to extract(lcon(),,) + + xvcon() is identical, except it follows the restrictions of + lvcon() + + See also: ncon(), lcon(), lvcon() + & XVEXITS() + & XEXITS() + xexits(,,) + xvexits(,,) + + xexits() fetches or fewer exit dbrefs from + starting at position . It is useful when the number + of exits in a container causes lexits() to exceed the buffer + limit. + + It is equivalent to extract(lexits(),,) + + xvexits() is identical, except it follows the restrictions of + lvexits() + + See also: nexits(), lexits(), lvexits() + & XVPLAYERS() + & XPLAYERS() + xplayers(,,) + xvplayers(,,) + + xplayers() fetches or fewer player dbrefs from + starting at position . It is useful when the number of + players in a container causes lplayers() to exceed the buffer limit. + + It is equivalent to extract(lplayers(),,) + + xvplayers() is identical, except it follows the restrictions of + lvplayers() + + See also: nplayers(), lplayers(), lvplayers() + & XWHO() + & XMWHO() + xwho(start,count) + xmwho(start,count) + + xwho() fetches or fewer player dbrefs from the list of connected + players. It is useful when the number of players connected causes lwho() + or pemits in +who $-commands to exceed buffer limits. + + It is equivalent to extract(lwho(),,). + + xmwho() is identical, except it is limited to non-DARK and non-HIDE + players. + + See also: lwho(), mwho(), nwho() & ZEMIT() zemit(, ) nszemit(, ) *** 1_7_7.1063/game/txt/hlp/penncmd.hlp Sat, 05 Jun 2004 19:59:09 -0500 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.3.1.4.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.10.1.1.1.1.1.1.1.1.1.1.1.34 600) --- 1_7_7.1098(w)/game/txt/hlp/penncmd.hlp Thu, 10 Jun 2004 14:31:39 -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.36 600) *************** *** 1412,1417 **** --- 1412,1422 ---- mdark must be WIZARD or ROYALTY odark must own the (or be WIZARD or ROYALTY) + The following permissions control other behavior related to the flag: + + log Log when the flag is set or cleared. Only meaningful in + . + & @function @function [] @function =,[,, [,]] *************** *** 3650,3655 **** --- 3655,3663 ---- The /mortal switch shows an object as if you were a mortal other than the object's owner and is primarily useful to admins. This switch ignores the object's VISUAL flag (but not its attribute flags) + The /parent switch show attributes that would be inherited from the + object's parents, if you have permission to examine the attributes + on the parent. The /all switch shows the values of VEILED attributes. See also: ATTRIBUTE TREES *** 1_7_7.1063/src/SWITCHES Sat, 20 Mar 2004 01:47:00 -0600 dunemush (pennmush/b/22_SWITCHES 1.12.1.3.1.14 600) --- 1_7_7.1098(w)/src/SWITCHES Mon, 28 Jun 2004 09:35:02 -0500 dunemush (pennmush/b/22_SWITCHES 1.12.1.3.1.15 600) *************** *** 87,92 **** --- 87,93 ---- PAGING PANIC PARANOID + PARENT PLAYERS PORT POWERS *** 1_7_7.1063/src/wiz.c Thu, 03 Jun 2004 17:00:50 -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) --- 1_7_7.1098(w)/src/wiz.c Mon, 28 Jun 2004 09:35:02 -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.25 660) *************** *** 587,593 **** /** Parse a command of the format "#dbref command". * Split it up and pass it to force handler. ! * We can hack it up in-place, since we won't need it the input again. * \param player the enactor. * \param command command string to parse and pass on. * \retval 0 failed to successfully parse. --- 587,593 ---- /** Parse a command of the format "#dbref command". * Split it up and pass it to force handler. ! * We can't hack it up in-place, since we may need the input again. * \param player the enactor. * \param command command string to parse and pass on. * \retval 0 failed to successfully parse. *************** *** 597,610 **** force_by_number(dbref player, char *command) { char *s; /* It's as easy to learn as your A, B, C's... */ ! for (s = command; *s && !isspace((unsigned char) *s); s++) ; ! if (!*s) return (0); *s++ = '\0'; ! do_force(player, command, s); return (1); } --- 597,615 ---- force_by_number(dbref player, char *command) { char *s; + char *copy; /* It's as easy to learn as your A, B, C's... */ ! copy = mush_strdup(command, "force_by_number"); ! for (s = copy; *s && !isspace((unsigned char) *s); s++) ; ! if (!*s) { ! mush_free(copy, "force_by_number"); return (0); + } *s++ = '\0'; ! do_force(player, copy, s); ! mush_free(copy, "force_by_number"); return (1); } *************** *** 757,767 **** 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) { notify(player, "There is no one connected on that descriptor."); return; } else --- 762,770 ---- case BOOT_DESC: /* boot by descriptor */ victim = find_player_by_desc(atoi(name)); ! if (victim == NOTHING) { d = port_desc(atoi(name)); ! if (!d && Can_Boot(player)) { notify(player, "There is no one connected on that descriptor."); return; } else *************** *** 802,807 **** --- 805,815 ---- break; } + if (victim == player && (!d || d->descriptor == process_command_port)) { + notify(player, T("If you want to quit, use QUIT.")); + return; + } + /* check for more errors */ if (!d) { if (flag == BOOT_SELF) *************** *** 814,819 **** --- 822,829 ---- notify(player, T("You boot an idle self.")); else if (victim == AMBIGUOUS) notify_format(player, T("You booted unconnected port %s!"), name); + else if (victim == player) + notify(player, T("You boot a duplicate self.")); else { notify_format(player, T("You booted %s off!"), Name(victim)); notify(victim, T("You are politely shown to the door.")); *************** *** 1988,1996 **** void do_reboot(dbref player, int flag) { - #ifdef macintosh - notify(player, T("Alas, I can't reboot under MacOS. Sorry.")); - #else if (player == NOTHING) { flag_broadcast(0, 0, T --- 1998,2003 ---- *************** *** 2033,2038 **** #else execl("pennmush.exe", "pennmush.exe", "/run", NULL); #endif /* WIN32 */ - #endif /* macintosh */ exit(1); /* Shouldn't ever get here, but just in case... */ } --- 2040,2044 ---- *** 1_7_7.1063/src/utils.c Tue, 11 May 2004 10:08:19 -0500 dunemush (pennmush/b/27_utils.c 1.30.1.1.1.19 660) --- 1_7_7.1098(w)/src/utils.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/b/27_utils.c 1.30.1.1.1.21 660) *************** *** 68,75 **** add_check(check); ptr = malloc(size); if (ptr == NULL) ! do_log(LT_ERR, 0, 0, "mush_malloc failed to malloc %d bytes for %s", ! size, check); return ptr; } --- 68,75 ---- add_check(check); ptr = malloc(size); if (ptr == NULL) ! do_log(LT_ERR, 0, 0, "mush_malloc failed to malloc %lu bytes for %s", ! (unsigned long) size, check); return ptr; } *** 1_7_7.1063/src/help.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/f/32_help.c 1.4.1.2.1.1.1.3.2.2.1.1.2.1.1.2.1.2.1.2.1.3.1.22 660) --- 1_7_7.1098(w)/src/help.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/f/32_help.c 1.4.1.2.1.1.1.3.2.2.1.1.2.1.1.2.1.2.1.2.1.3.1.23 660) *************** *** 24,33 **** #include "mymalloc.h" #include "confmagic.h" - #ifdef macintosh - #include "PMInit.h" - #endif - HASHTAB help_files; /**< Help filenames hash table */ static int help_init = 0; --- 24,29 ---- *************** *** 117,126 **** do_rawlog(LT_ERR, T("Duplicate help_command %s ignored."), command_name); return; } - #ifdef macintosh - /* Convert file path from a UNIX style one to a MacOS one */ - PMConvertPath((char *) newfilename, (char *) newfilename, 256); - #endif h = mush_malloc(sizeof *h, "help_file.entry"); h->command = mush_strdup(strupper(command_name), "help_file.command"); --- 113,118 ---- *** 1_7_7.1063/src/switchinc.c Sat, 20 Mar 2004 01:47:00 -0600 dunemush (pennmush/b/32_switchinc. 1.3.1.2.1.6.1.18.1.2.1.2.2.5.1.4.2.4.1.1.1.2.1.5.1.2.1.5.2.1.1.31.3.4.1.5.1.4.1.1.1.1.1.1.1.7.1.1.1.7 660) --- 1_7_7.1098(w)/src/switchinc.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/b/32_switchinc. 1.3.1.2.1.6.1.18.1.2.1.2.2.5.1.4.2.4.1.1.1.2.1.5.1.2.1.5.2.1.1.31.3.4.1.5.1.4.1.1.1.1.1.1.1.7.1.1.1.8 660) *************** *** 89,94 **** --- 89,95 ---- {"PAGING", SWITCH_PAGING}, {"PANIC", SWITCH_PANIC}, {"PARANOID", SWITCH_PARANOID}, + {"PARENT", SWITCH_PARENT}, {"PLAYERS", SWITCH_PLAYERS}, {"PORT", SWITCH_PORT}, {"POWERS", SWITCH_POWERS}, *** 1_7_7.1063/src/speech.c Tue, 18 May 2004 14:44:58 -0500 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.8.1.1.1.1.1.1.1.10.1.2.1.13.2.4.1.1.3.1.1.5.1.1.1.6.1.1.1.5 660) --- 1_7_7.1098(w)/src/speech.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.8.1.1.1.1.1.1.1.10.1.2.1.13.2.4.1.1.3.1.1.5.1.1.1.6.1.1.1.6 660) *************** *** 111,118 **** if (!GoodObject(loc)) return; ! if (!Hasprivs(player) && !eval_lock(player, loc, Speech_Lock)) { ! notify(player, T("You may not speak here!")); return; } --- 111,118 ---- if (!GoodObject(loc)) return; ! if (!eval_lock(player, loc, Speech_Lock)) { ! fail_lock(player, loc, Speech_Lock, T("You may not speak here!"), NOTHING); return; } *************** *** 151,158 **** if (!GoodObject(loc)) return; ! if (!Hasprivs(player) && !eval_lock(player, loc, Speech_Lock)) { ! notify(player, T("You may not speak here!")); return; } --- 151,158 ---- if (!GoodObject(loc)) return; ! if (!eval_lock(player, loc, Speech_Lock)) { ! fail_lock(player, loc, Speech_Lock, T("You may not speak here!"), NOTHING); return; } *************** *** 214,221 **** return; } ! if (!Hasprivs(player) && !eval_lock(player, pass[1], Speech_Lock)) { ! notify(player, T("You may not speak there!")); return; } --- 214,222 ---- return; } ! if (!eval_lock(player, pass[1], Speech_Lock)) { ! fail_lock(player, pass[1], Speech_Lock, T("You may not speak there!"), ! NOTHING); return; } *************** *** 238,244 **** * locs[0..10] are corresponding dbrefs of locations */ if (GoodObject(who) && GoodObject(Location(who)) ! && (Hasprivs(player) || eval_lock(player, Location(who), Speech_Lock)) ) { if (pass[0] < 10) { locs[pass[0]] = Location(who); --- 239,245 ---- * locs[0..10] are corresponding dbrefs of locations */ if (GoodObject(who) && GoodObject(Location(who)) ! && eval_lock(player, Location(who), Speech_Lock) ) { if (pass[0] < 10) { locs[pass[0]] = Location(who); *************** *** 526,533 **** if (!GoodObject(loc)) return; ! if (!Hasprivs(player) && !eval_lock(player, loc, Speech_Lock)) { ! notify(player, T("You may not speak here!")); return; } --- 527,534 ---- if (!GoodObject(loc)) return; ! if (!eval_lock(player, loc, Speech_Lock)) { ! fail_lock(player, loc, Speech_Lock, T("You may not speak here!"), NOTHING); return; } *************** *** 1148,1155 **** if (!GoodObject(loc)) return; ! if (!Hasprivs(player) && !eval_lock(player, loc, Speech_Lock)) { ! notify(player, T("You may not speak here!")); return; } --- 1149,1156 ---- if (!GoodObject(loc)) return; ! if (!eval_lock(player, loc, Speech_Lock)) { ! fail_lock(player, loc, Speech_Lock, T("You may not speak here!"), NOTHING); return; } *************** *** 1182,1189 **** notify_format(player, T("I'm sorry, but %s wishes to be left alone now."), Name(room)); ! } else if (!Hasprivs(player) && !eval_lock(player, room, Speech_Lock)) { ! notify(player, T("You may not speak there!")); } else { if (!(flags & PEMIT_SILENT) && (Location(player) != room)) { const char *rmno; --- 1183,1191 ---- notify_format(player, T("I'm sorry, but %s wishes to be left alone now."), Name(room)); ! } else if (!eval_lock(player, room, Speech_Lock)) { ! fail_lock(player, room, Speech_Lock, T("You may not speak there!"), ! NOTHING); } else { if (!(flags & PEMIT_SILENT) && (Location(player) != room)) { const char *rmno; *************** *** 1254,1261 **** if (rec > 15) { notify(player, T("Too many containers.")); return; ! } else if (!Hasprivs(player) && !eval_lock(player, room, Speech_Lock)) { ! notify(player, T("You may not speak there!")); } else { if (!silent && (Location(player) != room)) notify_format(player, T("You lemit: \"%s\""), tbuf1); --- 1256,1265 ---- if (rec > 15) { notify(player, T("Too many containers.")); return; ! } else if (!eval_lock(player, room, Speech_Lock)) { ! fail_lock(player, room, Speech_Lock, T("You may not speak there!"), ! NOTHING); ! return; } else { if (!silent && (Location(player) != room)) notify_format(player, T("You lemit: \"%s\""), tbuf1); *************** *** 1281,1288 **** if (this == NOTHING) { for (room = dbrefs[1]; room < db_top; room++) { if (IsRoom(room) && (Zone(room) == dbrefs[2]) ! && (Hasprivs(dbrefs[3]) ! || eval_lock(dbrefs[3], room, Speech_Lock)) ) break; } --- 1285,1291 ---- if (this == NOTHING) { for (room = dbrefs[1]; room < db_top; room++) { if (IsRoom(room) && (Zone(room) == dbrefs[2]) ! && eval_lock(dbrefs[3], room, Speech_Lock) ) break; } *** 1_7_7.1063/src/rob.c Thu, 03 Jun 2004 16:22:17 -0500 dunemush (pennmush/b/42_rob.c 1.18.1.2.1.3.1.3.1.24 660) --- 1_7_7.1098(w)/src/rob.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/b/42_rob.c 1.18.1.2.1.3.1.3.1.31 660) *************** *** 28,33 **** --- 28,48 ---- static void do_give_to(dbref player, char *arg, int silent); + /** Set an object's money value, with limit-checking. + * \param thing dbref of object. + * \param amount amount to set object's pennies to. + */ + void + s_Pennies(dbref thing, int amount) + { + if (amount < 0) + amount = 0; + else if (amount > HUGE_INT) + amount = HUGE_INT; + Pennies(thing) = amount; + } + + /** The kill command - send an object back home. * \param player the enactor. * \param what name of object to kill. *************** *** 142,148 **** { dbref who; int amount; - char *s; char tbuf1[BUFFER_LEN]; char *bp; --- 157,162 ---- *************** *** 172,181 **** return; } ! /* make sure amount is all digits */ ! for (s = amnt; *s && ((isdigit((unsigned char) *s)) || (*s == '-')); s++) ; ! /* must be giving object */ ! if (*s) { dbref thing; switch (thing = match_result(player, amnt, TYPE_THING, --- 186,193 ---- return; } ! if (!is_strict_integer(amnt)) { ! /* We're giving an object */ dbref thing; switch (thing = match_result(player, amnt, TYPE_THING, *************** *** 232,240 **** } return; } ! amount = atoi(amnt); ! /* do amount consistency check */ ! if (amount < 0 && !Wizard(player)) { notify(player, T("What is this, a holdup?")); return; } else if (amount == 0) { --- 244,254 ---- } return; } ! /* At this point, we're giving an amount. */ ! amount = parse_integer(amnt); ! if (Pennies(who) + amount > Max_Pennies(who)) ! amount = Max_Pennies(who) - Pennies(who); ! if (amount < 0 && !Can_Debit(player)) { notify(player, T("What is this, a holdup?")); return; } else if (amount == 0) { *************** *** 242,256 **** T("You must specify a positive number of %s."), MONIES); return; } ! if (Pennies(who) + amount > Max_Pennies(who)) { ! notify(player, T("You are not a bank!")); ! return; ! } ! if (Wizard(player)) ! if (amount < 0 && (abs(Pennies(who) + amount) > Max_Pennies(who))) { ! notify(player, T("It's cruel to reduce anyone to such abject poverty.")); ! return; ! } /* try to do the give */ if (!Moneybags(player) && !payfor(player, amount)) { notify_format(player, T("You don't have that many %s to give!"), MONIES); --- 256,263 ---- T("You must specify a positive number of %s."), MONIES); return; } ! if (Can_Debit(player) && (amount < 0) && (Pennies(who) + amount < 0)) ! amount = -Pennies(who); /* try to do the give */ if (!Moneybags(player) && !payfor(player, amount)) { notify_format(player, T("You don't have that many %s to give!"), MONIES); *** 1_7_7.1063/src/malias.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/3_malias.c 1.36.1.12 660) --- 1_7_7.1098(w)/src/malias.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/3_malias.c 1.36.1.13 660) *************** *** 971,981 **** Hasprivs(player) || ((m->nflags & ALIAS_MEMBERS) && ismember(m, player))) { - #ifdef macintosh - if (!strcasecmp(mal, (char *) (m->name))) - #else if (!strcasecmp(mal, m->name)) - #endif return m; } } --- 971,977 ---- *** 1_7_7.1063/src/look.c Thu, 03 Jun 2004 16:22:17 -0500 dunemush (pennmush/c/4_look.c 1.21.1.2.1.9.1.1.1.1.1.29 660) --- 1_7_7.1098(w)/src/look.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/4_look.c 1.21.1.2.1.9.1.1.1.1.1.33 660) *************** *** 31,39 **** static void look_exits(dbref player, dbref loc, const char *exit_name); static void look_contents(dbref player, dbref loc, const char *contents_name); ! static void look_atrs(dbref player, dbref thing, const char *mstr, int all); static void mortal_look_atrs(dbref player, dbref thing, const char *mstr, ! int all); static void look_simple(dbref player, dbref thing); static void look_description(dbref player, dbref thing, const char *def, const char *descname, const char *descformatname); --- 31,40 ---- static void look_exits(dbref player, dbref loc, const char *exit_name); static void look_contents(dbref player, dbref loc, const char *contents_name); ! static void look_atrs(dbref player, dbref thing, const char *mstr, int all, ! int mortal, int parent); static void mortal_look_atrs(dbref player, dbref thing, const char *mstr, ! int all, int parent); static void look_simple(dbref player, dbref thing); static void look_description(dbref player, dbref thing, const char *def, const char *descname, const char *descformatname); *************** *** 46,51 **** --- 47,53 ---- void decompile_atrs(dbref player, dbref thing, const char *name, const char *pattern, const char *prefix, int skipdef); void decompile_locks(dbref player, dbref thing, const char *name, int skipdef); + static char *parent_chain(dbref player, dbref thing); extern PRIV attr_privs[]; *************** *** 305,335 **** { char fbuf[BUFFER_LEN]; char const *r; if (EX_PUBLIC_ATTRIBS && !strcmp(AL_NAME(atr), "DESCRIBE") && !strcmp(pattern, "*")) return 0; strcpy(fbuf, privs_to_letters(attr_privs, AL_FLAGS(atr))); if (atr_sub_branch(atr)) strcat(fbuf, "`"); if (AF_Veiled(atr)) { ! if (ShowAnsi(player)) ! notify_format(player, ! "%s%s [#%d%s]%s is veiled", ANSI_HILITE, AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, ANSI_NORMAL); ! else ! notify_format(player, ! "%s [#%d%s] is veiled", AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf); } else { r = safe_atr_value(atr); ! if (ShowAnsi(player)) ! notify_format(player, ! "%s%s [#%d%s]:%s %s", ANSI_HILITE, AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, ANSI_NORMAL, r); ! else ! notify_format(player, "%s [#%d%s]: %s", AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, r); free((Malloc_t) r); } return 1; --- 307,364 ---- { char fbuf[BUFFER_LEN]; char const *r; + dbref parent = NOTHING; if (EX_PUBLIC_ATTRIBS && !strcmp(AL_NAME(atr), "DESCRIBE") && !strcmp(pattern, "*")) return 0; + if (args) + parent = *(dbref *) args; + if (parent == thing || !GoodObject(parent)) + parent = NOTHING; strcpy(fbuf, privs_to_letters(attr_privs, AL_FLAGS(atr))); if (atr_sub_branch(atr)) strcat(fbuf, "`"); if (AF_Veiled(atr)) { ! if (ShowAnsi(player)) { ! if (GoodObject(parent)) ! notify_format(player, ! "%s#%d/%s [#%d%s]%s is veiled", ANSI_HILITE, parent, ! AL_NAME(atr), Owner(AL_CREATOR(atr)), fbuf, ANSI_NORMAL); ! else ! notify_format(player, ! "%s%s [#%d%s]%s is veiled", ANSI_HILITE, AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, ANSI_NORMAL); ! } else { ! if (GoodObject(parent)) ! notify_format(player, ! "#%d/%s [#%d%s] is veiled", parent, AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf); ! else ! notify_format(player, ! "%s [#%d%s] is veiled", AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf); ! } } else { r = safe_atr_value(atr); ! if (ShowAnsi(player)) { ! if (GoodObject(parent)) ! notify_format(player, ! "%s#%d/%s [#%d%s]:%s %s", ANSI_HILITE, parent, ! AL_NAME(atr), Owner(AL_CREATOR(atr)), fbuf, ANSI_NORMAL, ! r); ! else ! notify_format(player, ! "%s%s [#%d%s]:%s %s", ANSI_HILITE, AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, ANSI_NORMAL, r); ! } else { ! if (GoodObject(parent)) ! notify_format(player, "#%d/%s [#%d%s]: %s", parent, AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, r); ! else ! notify_format(player, "%s [#%d%s]: %s", AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, r); ! } free((Malloc_t) r); } return 1; *************** *** 342,389 **** { char fbuf[BUFFER_LEN]; char const *r; if (EX_PUBLIC_ATTRIBS && !strcmp(AL_NAME(atr), "DESCRIBE") && !strcmp(pattern, "*")) return 0; strcpy(fbuf, privs_to_letters(attr_privs, AL_FLAGS(atr))); if (atr_sub_branch(atr)) strcat(fbuf, "`"); r = safe_atr_value(atr); ! if (ShowAnsi(player)) ! notify_format(player, ! "%s%s [#%d%s]:%s %s", ANSI_HILITE, AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, ANSI_NORMAL, r); ! else ! notify_format(player, "%s [#%d%s]: %s", AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, r); free((Malloc_t) r); return 1; } static void ! look_atrs(dbref player, dbref thing, const char *mstr, int all) { if (all || (mstr && *mstr && !wildcard(mstr))) { ! if (!atr_iter_get(player, thing, mstr, 0, look_helper, NULL) && mstr) ! notify(player, T("No matching attributes.")); } else { ! if (!atr_iter_get(player, thing, mstr, 0, look_helper_veiled, NULL) && mstr) ! notify(player, T("No matching attributes.")); } } static void ! mortal_look_atrs(dbref player, dbref thing, const char *mstr, int all) { ! if (all || (mstr && *mstr && !wildcard(mstr))) { ! if (!atr_iter_get(player, thing, mstr, 1, look_helper, NULL) && mstr) ! notify(player, T("No matching attributes.")); ! } else { ! if (!atr_iter_get(player, thing, mstr, 1, look_helper_veiled, NULL) ! && mstr) ! notify(player, T("No matching attributes.")); ! } } static void --- 371,441 ---- { char fbuf[BUFFER_LEN]; char const *r; + dbref parent = NOTHING; if (EX_PUBLIC_ATTRIBS && !strcmp(AL_NAME(atr), "DESCRIBE") && !strcmp(pattern, "*")) return 0; + if (args) + parent = *(dbref *) args; + if (parent == thing || !GoodObject(parent)) + parent = NOTHING; strcpy(fbuf, privs_to_letters(attr_privs, AL_FLAGS(atr))); if (atr_sub_branch(atr)) strcat(fbuf, "`"); r = safe_atr_value(atr); ! if (ShowAnsi(player)) { ! if (GoodObject(parent)) ! notify_format(player, ! "%s#%d/%s [#%d%s]:%s %s", ANSI_HILITE, parent, ! AL_NAME(atr), Owner(AL_CREATOR(atr)), fbuf, ANSI_NORMAL, r); ! else ! notify_format(player, ! "%s%s [#%d%s]:%s %s", ANSI_HILITE, AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, ANSI_NORMAL, r); ! } else { ! if (GoodObject(parent)) ! notify_format(player, "#%d/%s [#%d%s]: %s", parent, AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, r); ! else ! notify_format(player, "%s [#%d%s]: %s", AL_NAME(atr), ! Owner(AL_CREATOR(atr)), fbuf, r); ! } free((Malloc_t) r); return 1; } static void ! look_atrs(dbref player, dbref thing, const char *mstr, int all, int mortal, ! int parent) { if (all || (mstr && *mstr && !wildcard(mstr))) { ! if (parent) { ! if (!atr_iter_get_parent(player, thing, mstr, mortal, look_helper) ! && mstr) ! notify(player, T("No matching attributes.")); ! } else { ! if (!atr_iter_get(player, thing, mstr, mortal, look_helper, NULL) && mstr) ! notify(player, T("No matching attributes.")); ! } } else { ! if (parent) { ! if (!atr_iter_get_parent ! (player, thing, mstr, mortal, look_helper_veiled) && mstr) ! notify(player, T("No matching attributes.")); ! } else { ! if (!atr_iter_get(player, thing, mstr, mortal, look_helper_veiled, NULL) ! && mstr) ! notify(player, T("No matching attributes.")); ! } } } static void ! mortal_look_atrs(dbref player, dbref thing, const char *mstr, int all, ! int parent) { ! look_atrs(player, thing, mstr, all, 1, parent); } static void *************** *** 670,678 **** * \param name name of object to examine. * \param brief if 1, a brief examination. if 2, a mortal examination. * \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; --- 722,732 ---- * \param name name of object to examine. * \param brief if 1, a brief examination. if 2, a mortal examination. * \param all if 1, include veiled attributes. + * \param parent if 1, include parent attributes */ void ! do_examine(dbref player, const char *name, enum exam_type flag, int all, ! int parent) { dbref thing; ATTR *a; *************** *** 711,717 **** } /* only look at some of the attributes */ if (attrib_name && *attrib_name) { ! look_atrs(player, thing, attrib_name, all); return; } if (flag == EXAM_MORTAL) { --- 765,771 ---- } /* only look at some of the attributes */ if (attrib_name && *attrib_name) { ! look_atrs(player, thing, attrib_name, all, 0, parent); return; } if (flag == EXAM_MORTAL) { *************** *** 757,764 **** T("Owner: %s Zone: %s %s: %d"), object_header(player, Owner(thing)), tbuf1, MONIES, Pennies(thing)); ! notify_format(player, ! T("Parent: %s"), object_header(player, Parent(thing))); { struct lock_list *ll; for (ll = Locks(thing); ll; ll = ll->next) { --- 811,817 ---- T("Owner: %s Zone: %s %s: %d"), object_header(player, Owner(thing)), tbuf1, MONIES, Pennies(thing)); ! notify_format(player, T("Parent: %s"), parent_chain(player, thing)); { struct lock_list *ll; for (ll = Locks(thing); ll; ll = ll->next) { *************** *** 783,795 **** 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; } --- 836,848 ---- switch (flag) { case EXAM_NORMAL: /* Standard */ if (EX_PUBLIC_ATTRIBS || ok) ! look_atrs(player, thing, NULL, all, 0, parent); break; case EXAM_BRIEF: /* Brief */ break; case EXAM_MORTAL: /* Mortal */ if (EX_PUBLIC_ATTRIBS) ! mortal_look_atrs(player, thing, NULL, all, parent); break; } *************** *** 1499,1502 **** --- 1552,1577 ---- if (dbflag != DEC_FLAG) { decompile_atrs(player, thing, object, "**", "", skipdef); } + } + + static char * + parent_chain(dbref player, dbref thing) + { + static char tbuf1[BUFFER_LEN]; + char *bp; + dbref parent; + int depth = 0; + + bp = tbuf1; + parent = Parent(thing); + safe_str(object_header(player, parent), tbuf1, &bp); + while (depth < MAX_PARENTS && GoodObject(parent) && + GoodObject(Parent(parent)) && Can_Examine(player, Parent(parent))) { + parent = Parent(parent); + safe_str(" -> ", tbuf1, &bp); + safe_str(object_header(player, parent), tbuf1, &bp); + depth++; + } + *bp = '\0'; + return tbuf1; } *** 1_7_7.1063/src/log.c Sun, 06 Jun 2004 20:04:25 -0500 dunemush (pennmush/c/5_log.c 1.10.1.2.2.4.1.1.2.2.1.21 660) --- 1_7_7.1098(w)/src/log.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/5_log.c 1.10.1.2.2.4.1.1.2.2.1.22 660) *************** *** 41,50 **** HASHTAB htab_logfiles; /**< Hash table of logfile names and descriptors */ - #ifdef macintosh - #include "PMInit.h" - #endif - /* log file pointers */ FILE *connlog_fp; /**< Connect log */ FILE *checklog_fp; /**< Checkpoint log */ --- 41,46 ---- *************** *** 100,112 **** /* Must use a buffer for MacOS file path conversion */ strncpy(newfilename, filename, 256); - #ifdef macintosh - /* Convert file path from a UNIX style one to a MacOS one */ - PMConvertPath((char *) newfilename, (char *) newfilename, 256); - *fp = fopen(newfilename, "ab"); - #else *fp = fopen(newfilename, "a"); - #endif if (*fp == NULL) { fprintf(stderr, T("WARNING: cannot open log %s\n"), newfilename); *fp = stderr; --- 96,102 ---- *** 1_7_7.1063/src/lock.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/6_lock.c 1.17.1.13.1.1.1.1.1.20 660) --- 1_7_7.1098(w)/src/lock.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/6_lock.c 1.17.1.13.1.1.1.1.1.21 660) *************** *** 87,93 **** {"Zone", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"Page", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"Teleport", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, ! {"Speech", TRUE_BOOLEXP, GOD, LF_PRIVATE | LF_WIZARD, NULL}, {"Listen", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"Command", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"Parent", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, --- 87,93 ---- {"Zone", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"Page", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"Teleport", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, ! {"Speech", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"Listen", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"Command", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"Parent", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, *** 1_7_7.1063/src/game.c Sun, 06 Jun 2004 20:04:25 -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.19 660) --- 1_7_7.1098(w)/src/game.c Mon, 28 Jun 2004 09:35:01 -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.23 660) *************** *** 41,50 **** #include #include - #ifdef macintosh - extern void PMSSetupDatabases(void); - #endif - #include "conf.h" #include "externs.h" #include "mushdb.h" --- 41,46 ---- *************** *** 268,274 **** do_rawlog(LT_ERR, T("Process statistics:")); do_rawlog(LT_ERR, T("Time used: %10ld user %10ld sys"), ! usage.ru_utime.tv_sec, usage.ru_stime.tv_sec); do_rawlog(LT_ERR, "Max res mem: %10ld pages %10ld bytes", usage.ru_maxrss, (usage.ru_maxrss * psize)); do_rawlog(LT_ERR, "Integral mem:%10ld shared %10ld private %10ld stack", --- 264,270 ---- do_rawlog(LT_ERR, T("Process statistics:")); do_rawlog(LT_ERR, T("Time used: %10ld user %10ld sys"), ! (long) usage.ru_utime.tv_sec, (long) usage.ru_stime.tv_sec); do_rawlog(LT_ERR, "Max res mem: %10ld pages %10ld bytes", usage.ru_maxrss, (usage.ru_maxrss * psize)); do_rawlog(LT_ERR, "Integral mem:%10ld shared %10ld private %10ld stack", *************** *** 573,581 **** #ifdef WIN32 nofork = 1; #endif - #ifdef macintosh - nofork = 1; - #endif split = 0; if (!nofork && chunk_num_swapped()) { #ifndef WIN32 --- 569,574 ---- *************** *** 593,599 **** #endif } if (!nofork) { - #ifndef macintosh #ifndef WIN32 child = fork(); if (child < 0) { --- 586,591 ---- *************** *** 623,629 **** #endif /* HAS_SETPRIORITY */ } #endif /* WIN32 */ - #endif /* macintosh */ } else { if (DUMP_NOFORK_MESSAGE && *DUMP_NOFORK_MESSAGE) flag_broadcast(0, 0, "%s", DUMP_NOFORK_MESSAGE); --- 615,620 ---- *************** *** 718,723 **** --- 709,715 ---- { int a; + process_command_port = 0; depth = 0; for (a = 0; a < 10; a++) { *************** *** 754,762 **** conf_default_set(); config_file_startup(conf, 0); start_all_logs(); - #ifndef macintosh redirect_stderr(); - #endif /* Initialize the attribute chunk storage */ chunk_init(); --- 746,752 ---- *************** *** 820,828 **** #ifdef WIN32 Win32MUSH_setup(); /* create index files, copy databases etc. */ #endif - #ifdef macintosh - PMSSetupDatabases(); - #endif infile = restarting ? options.output_db : options.input_db; outfile = options.output_db; --- 810,815 ---- *************** *** 2008,2014 **** #ifdef HAS_GETRUSAGE getrusage(RUSAGE_SELF, &usage); notify_format(player, T("Time used: %10ld user %10ld sys"), ! usage.ru_utime.tv_sec, usage.ru_stime.tv_sec); notify_format(player, "Max res mem: %10ld pages %10ld bytes", usage.ru_maxrss, (usage.ru_maxrss * psize)); notify_format(player, --- 1995,2001 ---- #ifdef HAS_GETRUSAGE getrusage(RUSAGE_SELF, &usage); notify_format(player, T("Time used: %10ld user %10ld sys"), ! (long) usage.ru_utime.tv_sec, (long) usage.ru_stime.tv_sec); notify_format(player, "Max res mem: %10ld pages %10ld bytes", usage.ru_maxrss, (usage.ru_maxrss * psize)); notify_format(player, *************** *** 2141,2147 **** db_open(const char *filename) { FILE *f; - #ifndef macintosh #ifndef WIN32 if (options.uncompressprog && *options.uncompressprog) { /* We do this because on some machines (SGI Irix, for example), --- 2128,2133 ---- *************** *** 2163,2169 **** } } else #endif /* WIN32 */ - #endif /* macintosh */ { f = fopen(filename, FOPEN_READ); } --- 2149,2154 ---- *************** *** 2196,2202 **** "getcwd failed during db_open_write, errno %d (%s)\n", errno, strerror(errno)); } - #ifndef macintosh #ifndef WIN32 if (options.compressprog && *options.compressprog) { f = --- 2181,2186 ---- *************** *** 2211,2217 **** setvbuf(f, NULL, _IOFBF, BUFSIZ); } else #endif /* WIN32 */ - #endif /* macintosh */ { f = fopen(filename, FOPEN_WRITE); } --- 2195,2200 ---- *************** *** 2225,2237 **** static void db_close(FILE * f) { - #ifndef macintosh #ifndef WIN32 if (options.compressprog && *options.compressprog) { pclose(f); } else #endif /* WIN32 */ - #endif /* macintosh */ { fclose(f); } --- 2208,2218 ---- *** 1_7_7.1063/src/funmisc.c Tue, 27 Apr 2004 14:02:06 -0500 dunemush (pennmush/c/14_funmisc.c 1.30.1.1.1.36 660) --- 1_7_7.1098(w)/src/funmisc.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/14_funmisc.c 1.30.1.1.1.38 660) *************** *** 421,427 **** /* ARGSUSED */ FUNCTION(fun_version) { ! safe_str(VERSION, buff, bp); } /* ARGSUSED */ --- 421,428 ---- /* ARGSUSED */ FUNCTION(fun_version) { ! safe_format(buff, bp, "PennMUSH version %s patchlevel %s %s", ! VERSION, PATCHLEVEL, PATCHDATE); } /* ARGSUSED */ *** 1_7_7.1063/src/funmath.c Wed, 10 Mar 2004 16:24:40 -0600 dunemush (pennmush/c/15_funmath.c 1.39.1.1.1.1.1.1.1.10.1.10 660) --- 1_7_7.1098(w)/src/funmath.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/15_funmath.c 1.39.1.1.1.1.1.1.1.10.1.11 660) *************** *** 747,753 **** FUNCTION(fun_vcross) { char sep = ' '; ! char *v1[BUFFER_LEN / 3], *v2[BUFFER_LEN / 2]; int v1len, v2len, n; NVAL vec1[3], vec2[3], cross[3]; --- 747,753 ---- FUNCTION(fun_vcross) { char sep = ' '; ! char *v1[BUFFER_LEN / 2], *v2[BUFFER_LEN / 2]; int v1len, v2len, n; NVAL vec1[3], vec2[3], cross[3]; *** 1_7_7.1063/src/fundb.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.3.1.1.2.2.2.1.1.1.1.1.1.38 660) --- 1_7_7.1098(w)/src/fundb.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.3.1.1.2.2.2.1.1.1.1.1.1.39 660) *************** *** 41,47 **** ATTR *atr, void *args); static dbref dbwalk(char *buff, char **bp, dbref executor, dbref enactor, ! int type, dbref loc, dbref after, int skipdark); static const char * --- 41,48 ---- ATTR *atr, void *args); static dbref dbwalk(char *buff, char **bp, dbref executor, dbref enactor, ! int type, dbref loc, dbref after, int skipdark, ! int start, int count, int *retcount); static const char * *************** *** 573,586 **** */ static dbref dbwalk(char *buff, char **bp, dbref executor, dbref enactor, ! int type, dbref loc, dbref after, int skipdark) { dbref result; int first; dbref thing; int validloc, validthing; dbref startdb; if (!GoodObject(loc)) { if (buff) safe_str("#-1", buff, bp); --- 574,591 ---- */ static dbref dbwalk(char *buff, char **bp, dbref executor, dbref enactor, ! int type, dbref loc, dbref after, int skipdark, ! int start, int count, int *retcount) { dbref result; int first; + int nthing; dbref thing; int validloc, validthing; dbref startdb; + nthing = 0; + if (!GoodObject(loc)) { if (buff) safe_str("#-1", buff, bp); *************** *** 607,618 **** else validthing &= (skipdark ? (!Dark(thing)) : 1); if (validthing) { ! if (buff) { ! if (first) ! first = 0; ! else ! safe_chr(' ', buff, bp); ! safe_dbref(thing, buff, bp); } if (result == NOTHING) { if (after == NOTHING) --- 612,626 ---- else validthing &= (skipdark ? (!Dark(thing)) : 1); if (validthing) { ! nthing += 1; ! if (count < 1 || (nthing >= start && nthing < start + count)) { ! if (buff) { ! if (first) ! first = 0; ! else ! safe_chr(' ', buff, bp); ! safe_dbref(thing, buff, bp); ! } } if (result == NOTHING) { if (after == NOTHING) *************** *** 620,625 **** --- 628,635 ---- if (after == thing) after = NOTHING; } + if (retcount) + *retcount = nthing; } } } else if (buff) *************** *** 631,688 **** FUNCTION(fun_lcon) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_THING, loc, NOTHING, 0); } /* ARGSUSED */ FUNCTION(fun_lvcon) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_THING, loc, NOTHING, 1); } /* ARGSUSED */ FUNCTION(fun_con) { dbref loc = match_thing(executor, args[0]); ! safe_dbref(dbwalk(NULL, NULL, executor, enactor, TYPE_THING, loc, NOTHING, 0), ! buff, bp); } /* ARGSUSED */ FUNCTION(fun_lexits) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_EXIT, loc, NOTHING, 0); } /* ARGSUSED */ FUNCTION(fun_lvexits) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_EXIT, loc, NOTHING, 1); } /* ARGSUSED */ FUNCTION(fun_exit) { dbref loc = match_thing(executor, args[0]); ! safe_dbref(dbwalk(NULL, NULL, executor, enactor, TYPE_EXIT, loc, NOTHING, 0), ! buff, bp); } /* ARGSUSED */ FUNCTION(fun_lplayers) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_PLAYER, loc, NOTHING, 0); } /* ARGSUSED */ FUNCTION(fun_lvplayers) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_PLAYER, loc, NOTHING, 1); } /* ARGSUSED */ --- 641,886 ---- FUNCTION(fun_lcon) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_THING, loc, NOTHING, 0, 0, 0, NULL); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_xcon) ! { ! dbref loc = match_thing(executor, args[0]); ! int start, count; ! start = count = 0; ! if (!is_strict_integer(args[1]) || !is_strict_integer(args[2])) { ! safe_str(T(e_int), buff, bp); ! return; ! } ! start = parse_integer(args[1]); ! count = parse_integer(args[2]); ! if (start < 1 || count < 1) { ! safe_str(T("#-1 ARGUMENT OUT OF RANGE"), buff, bp); ! return; ! } ! ! dbwalk(buff, bp, executor, enactor, TYPE_THING, loc, NOTHING, ! 0, start, count, NULL); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_xexits) ! { ! dbref loc = match_thing(executor, args[0]); ! int start, count; ! start = count = 0; ! if (!is_strict_integer(args[1]) || !is_strict_integer(args[2])) { ! safe_str(T(e_int), buff, bp); ! return; ! } ! start = parse_integer(args[1]); ! count = parse_integer(args[2]); ! if (start < 1 || count < 1) { ! safe_str(T("#-1 ARGUMENT OUT OF RANGE"), buff, bp); ! return; ! } ! ! dbwalk(buff, bp, executor, enactor, TYPE_EXIT, loc, NOTHING, ! 0, start, count, NULL); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_xplayers) ! { ! dbref loc = match_thing(executor, args[0]); ! int start, count; ! start = count = 0; ! if (!is_strict_integer(args[1]) || !is_strict_integer(args[2])) { ! safe_str(T(e_int), buff, bp); ! return; ! } ! start = parse_integer(args[1]); ! count = parse_integer(args[2]); ! if (start < 1 || count < 1) { ! safe_str(T("#-1 ARGUMENT OUT OF RANGE"), buff, bp); ! return; ! } ! ! dbwalk(buff, bp, executor, enactor, TYPE_PLAYER, loc, NOTHING, ! 0, start, count, NULL); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_xvcon) ! { ! dbref loc = match_thing(executor, args[0]); ! int start, count; ! start = count = 0; ! if (!is_strict_integer(args[1]) || !is_strict_integer(args[2])) { ! safe_str(T(e_int), buff, bp); ! return; ! } ! start = parse_integer(args[1]); ! count = parse_integer(args[2]); ! if (start < 1 || count < 1) { ! safe_str(T("#-1 ARGUMENT OUT OF RANGE"), buff, bp); ! return; ! } ! ! dbwalk(buff, bp, executor, enactor, TYPE_THING, loc, NOTHING, ! 1, start, count, NULL); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_xvexits) ! { ! dbref loc = match_thing(executor, args[0]); ! int start, count; ! start = count = 0; ! if (!is_strict_integer(args[1]) || !is_strict_integer(args[2])) { ! safe_str(T(e_int), buff, bp); ! return; ! } ! start = parse_integer(args[1]); ! count = parse_integer(args[2]); ! if (start < 1 || count < 1) { ! safe_str(T("#-1 ARGUMENT OUT OF RANGE"), buff, bp); ! return; ! } ! ! dbwalk(buff, bp, executor, enactor, TYPE_EXIT, loc, NOTHING, ! 1, start, count, NULL); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_xvplayers) ! { ! dbref loc = match_thing(executor, args[0]); ! int start, count; ! start = count = 0; ! if (!is_strict_integer(args[1]) || !is_strict_integer(args[2])) { ! safe_str(T(e_int), buff, bp); ! return; ! } ! start = parse_integer(args[1]); ! count = parse_integer(args[2]); ! if (start < 1 || count < 1) { ! safe_str(T("#-1 ARGUMENT OUT OF RANGE"), buff, bp); ! return; ! } ! ! dbwalk(buff, bp, executor, enactor, TYPE_PLAYER, loc, NOTHING, ! 1, start, count, NULL); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_ncon) ! { ! dbref loc = match_thing(executor, args[0]); ! int result = 0; ! dbwalk(NULL, NULL, executor, enactor, TYPE_THING, loc, NOTHING, 0, 0, 0, ! &result); ! safe_integer(result, buff, bp); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_nexits) ! { ! dbref loc = match_thing(executor, args[0]); ! int result = 0; ! dbwalk(NULL, NULL, executor, enactor, TYPE_EXIT, loc, NOTHING, 0, 0, 0, ! &result); ! safe_integer(result, buff, bp); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_nplayers) ! { ! dbref loc = match_thing(executor, args[0]); ! int result = 0; ! dbwalk(NULL, NULL, executor, enactor, TYPE_PLAYER, loc, NOTHING, 0, 0, 0, ! &result); ! safe_integer(result, buff, bp); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_nvcon) ! { ! dbref loc = match_thing(executor, args[0]); ! int result = 0; ! dbwalk(NULL, NULL, executor, enactor, TYPE_THING, loc, NOTHING, 1, 0, 0, ! &result); ! safe_integer(result, buff, bp); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_nvexits) ! { ! dbref loc = match_thing(executor, args[0]); ! int result = 0; ! dbwalk(NULL, NULL, executor, enactor, TYPE_EXIT, loc, NOTHING, 1, 0, 0, ! &result); ! safe_integer(result, buff, bp); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_nvplayers) ! { ! dbref loc = match_thing(executor, args[0]); ! int result = 0; ! dbwalk(NULL, NULL, executor, enactor, TYPE_PLAYER, loc, NOTHING, 1, 0, 0, ! &result); ! safe_integer(result, buff, bp); } /* ARGSUSED */ FUNCTION(fun_lvcon) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_THING, loc, NOTHING, 1, 0, 0, NULL); } /* ARGSUSED */ FUNCTION(fun_con) { dbref loc = match_thing(executor, args[0]); ! safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_THING, loc, NOTHING, 0, 0, 0, ! NULL), buff, bp); } /* ARGSUSED */ FUNCTION(fun_lexits) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_EXIT, loc, NOTHING, 0, 0, 0, NULL); } /* ARGSUSED */ FUNCTION(fun_lvexits) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_EXIT, loc, NOTHING, 1, 0, 0, NULL); } /* ARGSUSED */ FUNCTION(fun_exit) { dbref loc = match_thing(executor, args[0]); ! safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_EXIT, loc, NOTHING, 0, 0, 0, ! NULL), buff, bp); } /* ARGSUSED */ FUNCTION(fun_lplayers) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_PLAYER, loc, NOTHING, 0, 0, 0, NULL); } /* ARGSUSED */ FUNCTION(fun_lvplayers) { dbref loc = match_thing(executor, args[0]); ! dbwalk(buff, bp, executor, enactor, TYPE_PLAYER, loc, NOTHING, 1, 0, 0, NULL); } /* ARGSUSED */ *************** *** 694,707 **** switch (Typeof(it)) { case TYPE_EXIT: safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_EXIT, Source(it), it, 0), ! buff, bp); break; case TYPE_THING: case TYPE_PLAYER: safe_dbref(dbwalk (NULL, NULL, executor, enactor, TYPE_THING, Location(it), it, ! 0), buff, bp); break; default: safe_str("#-1", buff, bp); --- 892,905 ---- switch (Typeof(it)) { case TYPE_EXIT: safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_EXIT, Source(it), it, 0, ! 0, 0, NULL), buff, bp); break; case TYPE_THING: case TYPE_PLAYER: safe_dbref(dbwalk (NULL, NULL, executor, enactor, TYPE_THING, Location(it), it, ! 0, 0, 0, NULL), buff, bp); break; default: safe_str("#-1", buff, bp); *** 1_7_7.1063/src/function.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1.1.14.1.2.1.1.1.7.1.22.1.11.1.3.1.18 660) --- 1_7_7.1098(w)/src/function.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1.1.14.1.2.1.1.1.7.1.22.1.11.1.3.1.21 660) *************** *** 347,352 **** --- 347,353 ---- {"LWHO", fun_lwho, 0, 0, FN_REG}, {"MAIL", fun_mail, 0, 2, FN_REG}, {"MAILFROM", fun_mailfrom, 1, 2, FN_REG}, + {"MAILSEND", fun_mailsend, 2, 2, FN_REG}, {"MAILSTATS", fun_mailstats, 1, 1, FN_REG}, {"MAILDSTATS", fun_mailstats, 1, 1, FN_REG}, {"MAILFSTATS", fun_mailstats, 1, 1, FN_REG}, *************** *** 374,382 **** --- 375,387 ---- {"NAME", fun_name, 0, 2, FN_REG}, {"NAND", fun_nand, 1, INT_MAX, FN_REG}, {"NATTR", fun_nattr, 1, 1, FN_REG}, + {"NCON", fun_ncon, 1, 1, FN_REG}, + {"NEXITS", fun_nexits, 1, 1, FN_REG}, + {"NPLAYERS", fun_nplayers, 1, 1, FN_REG}, {"NEARBY", fun_nearby, 2, 2, FN_REG}, {"NEQ", fun_neq, 2, 2, FN_REG}, {"NEXT", fun_next, 1, 1, FN_REG}, + {"NMWHO", fun_nwho, 0, 0, FN_REG}, {"NOR", fun_nor, 1, INT_MAX, FN_REG}, {"NOT", fun_not, 1, 1, FN_REG}, {"NSCEMIT", fun_cemit, 2, 3, FN_REG}, *************** *** 388,393 **** --- 393,402 ---- {"NSZEMIT", fun_zemit, 2, -2, FN_REG}, {"NUM", fun_num, 1, 1, FN_REG}, {"NULL", fun_null, 1, INT_MAX, FN_REG}, + {"NVCON", fun_nvcon, 1, 1, FN_REG}, + {"NVEXITS", fun_nvexits, 1, 1, FN_REG}, + {"NVPLAYERS", fun_nvplayers, 1, 1, FN_REG}, + {"NWHO", fun_nwho, 0, 0, FN_REG}, {"OBJ", fun_obj, 1, 1, FN_REG}, {"OBJEVAL", fun_objeval, 2, -2, FN_NOPARSE}, {"OBJID", fun_objid, 1, 1, FN_REG}, *************** *** 521,528 **** --- 530,545 ---- {"WORDPOS", fun_wordpos, 2, 3, FN_REG}, {"WORDS", fun_words, 1, 2, FN_REG}, {"WRAP", fun_wrap, 2, 4, FN_REG}, + {"XCON", fun_xcon, 3, 3, FN_REG}, + {"XEXITS", fun_xexits, 3, 3, FN_REG}, + {"XMWHO", fun_xwho, 2, 2, FN_REG}, + {"XPLAYERS", fun_xplayers, 3, 3, FN_REG}, {"XGET", fun_xget, 2, 2, FN_REG}, {"XOR", fun_xor, 2, INT_MAX, FN_REG}, + {"XVCON", fun_xvcon, 3, 3, FN_REG}, + {"XVEXITS", fun_xvexits, 3, 3, FN_REG}, + {"XVPLAYERS", fun_xvplayers, 3, 3, FN_REG}, + {"XWHO", fun_xwho, 2, 2, FN_REG}, {"ZEMIT", fun_zemit, 2, -2, FN_REG}, {"ZFUN", fun_zfun, 1, 11, FN_REG}, {"ZONE", fun_zone, 1, 2, FN_REG}, *** 1_7_7.1063/src/funcrypt.c Thu, 09 Oct 2003 19:20:51 -0500 dunemush (pennmush/c/19_funcrypt.c 1.15 660) --- 1_7_7.1098(w)/src/funcrypt.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/19_funcrypt.c 1.16 660) *************** *** 154,160 **** EVP_MD_CTX ctx; const EVP_MD *mp; unsigned char md[EVP_MAX_MD_SIZE]; ! size_t n, len = 0; if ((mp = EVP_get_digestbyname(args[0])) == NULL) { safe_str(T("#-1 UNSUPPORTED DIGEST TYPE"), buff, bp); --- 154,160 ---- EVP_MD_CTX ctx; const EVP_MD *mp; unsigned char md[EVP_MAX_MD_SIZE]; ! unsigned int n, len = 0; if ((mp = EVP_get_digestbyname(args[0])) == NULL) { safe_str(T("#-1 UNSUPPORTED DIGEST TYPE"), buff, bp); *** 1_7_7.1063/src/flags.c Thu, 03 Jun 2004 16:20:04 -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) --- 1_7_7.1098(w)/src/flags.c Mon, 28 Jun 2004 09:35:01 -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.26 660) *************** *** 57,63 **** static FLAG *flag_hash_lookup(FLAGSPACE * n, const char *name, int type); static FLAG *clone_flag(FLAG *f); static FLAG *new_flag(void); ! static void flag_add_additional(void); static char *list_aliases(FLAGSPACE * n, FLAG *given); static void realloc_object_flag_bitmasks(FLAGSPACE * n); static FLAG *match_flag_ns(FLAGSPACE * n, const char *name); --- 57,63 ---- static FLAG *flag_hash_lookup(FLAGSPACE * n, const char *name, int type); static FLAG *clone_flag(FLAG *f); static FLAG *new_flag(void); ! static void flag_add_additional(FLAGSPACE * n); static char *list_aliases(FLAGSPACE * n, FLAG *given); static void realloc_object_flag_bitmasks(FLAGSPACE * n); static FLAG *match_flag_ns(FLAGSPACE * n, const char *name); *************** *** 68,73 **** --- 68,75 ---- extern PTAB ptab_command; /* Uses flag bitmasks */ + extern long indb_flags; + /** Attempt to find a flagspace from its name */ #define Flagspace_Lookup(n,ns) if (!(n = (FLAGSPACE *)hashfind(ns,&htab_flagspaces))) mush_panic("Unable to locate flagspace"); *************** *** 88,94 **** {"STICKY", 'S', NOTYPE, STICKY, F_ANY, F_ANY}, {"UNFINDABLE", 'U', NOTYPE, UNFIND, F_ANY, F_ANY}, {"VISUAL", 'V', NOTYPE, VISUAL, F_ANY, F_ANY}, ! {"WIZARD", 'W', NOTYPE, WIZARD, F_INHERIT | F_WIZARD, F_INHERIT | F_WIZARD}, {"SAFE", 'X', NOTYPE, SAFE, F_ANY, F_ANY}, {"AUDIBLE", 'a', NOTYPE, AUDIBLE, F_ANY, F_ANY}, --- 90,96 ---- {"STICKY", 'S', NOTYPE, STICKY, F_ANY, F_ANY}, {"UNFINDABLE", 'U', NOTYPE, UNFIND, F_ANY, F_ANY}, {"VISUAL", 'V', NOTYPE, VISUAL, F_ANY, F_ANY}, ! {"WIZARD", 'W', NOTYPE, WIZARD, F_INHERIT | F_WIZARD | F_LOG, F_INHERIT | F_WIZARD}, {"SAFE", 'X', NOTYPE, SAFE, F_ANY, F_ANY}, {"AUDIBLE", 'a', NOTYPE, AUDIBLE, F_ANY, F_ANY}, *************** *** 98,104 **** {"HALT", 'h', NOTYPE, HALT, F_ANY, F_ANY}, {"NO_COMMAND", 'n', NOTYPE, NO_COMMAND, F_ANY, F_ANY}, {"LIGHT", 'l', NOTYPE, LIGHT, F_ANY, F_ANY}, ! {"ROYALTY", 'r', NOTYPE, ROYALTY, F_INHERIT | F_ROYAL, F_INHERIT | F_ROYAL}, {"TRANSPARENT", 't', NOTYPE, TRANSPARENTED, F_ANY, F_ANY}, {"VERBOSE", 'v', NOTYPE, VERBOSE, F_ANY, F_ANY}, --- 100,106 ---- {"HALT", 'h', NOTYPE, HALT, F_ANY, F_ANY}, {"NO_COMMAND", 'n', NOTYPE, NO_COMMAND, F_ANY, F_ANY}, {"LIGHT", 'l', NOTYPE, LIGHT, F_ANY, F_ANY}, ! {"ROYALTY", 'r', NOTYPE, ROYALTY, F_INHERIT | F_ROYAL | F_LOG, F_INHERIT | F_ROYAL}, {"TRANSPARENT", 't', NOTYPE, TRANSPARENTED, F_ANY, F_ANY}, {"VERBOSE", 'v', NOTYPE, VERBOSE, F_ANY, F_ANY}, *************** *** 118,124 **** {"FIXED", 'F', TYPE_PLAYER, PLAYER_FIXED, F_WIZARD, F_WIZARD}, {"UNREGISTERED", '?', TYPE_PLAYER, PLAYER_UNREG, F_ROYAL, F_ROYAL}, {"ON-VACATION", 'o', TYPE_PLAYER, PLAYER_VACATION, F_ANY, F_ANY}, ! {"SUSPECT", 's', TYPE_PLAYER, PLAYER_SUSPECT, F_WIZARD | F_MDARK, F_WIZARD | F_MDARK}, {"PARANOID", '\0', TYPE_PLAYER, PLAYER_PARANOID, F_ANY | F_ODARK, F_ANY | F_ODARK}, --- 120,126 ---- {"FIXED", 'F', TYPE_PLAYER, PLAYER_FIXED, F_WIZARD, F_WIZARD}, {"UNREGISTERED", '?', TYPE_PLAYER, PLAYER_UNREG, F_ROYAL, F_ROYAL}, {"ON-VACATION", 'o', TYPE_PLAYER, PLAYER_VACATION, F_ANY, F_ANY}, ! {"SUSPECT", 's', TYPE_PLAYER, PLAYER_SUSPECT, F_WIZARD | F_MDARK | F_LOG, F_WIZARD | F_MDARK}, {"PARANOID", '\0', TYPE_PLAYER, PLAYER_PARANOID, F_ANY | F_ODARK, F_ANY | F_ODARK}, *************** *** 207,242 **** */ /* Name Flag */ static FLAG power_table[] = { ! {"Announce", '\0', NOTYPE, CAN_WALL, F_WIZARD, F_WIZARD}, ! {"Boot", '\0', NOTYPE, CAN_BOOT, F_WIZARD, F_WIZARD}, ! {"Builder", '\0', NOTYPE, CAN_BUILD, F_WIZARD, F_WIZARD}, ! {"Cemit", '\0', NOTYPE, CEMIT, F_WIZARD, F_WIZARD}, ! {"Chat_Privs", '\0', NOTYPE, CHAT_PRIVS, F_WIZARD, F_WIZARD}, ! {"Functions", '\0', NOTYPE, GLOBAL_FUNCS, F_WIZARD, F_WIZARD}, ! {"Guest", '\0', NOTYPE, IS_GUEST, F_WIZARD, F_WIZARD}, ! {"Halt", '\0', NOTYPE, HALT_ANYTHING, F_WIZARD, F_WIZARD}, ! {"Hide", '\0', NOTYPE, CAN_HIDE, F_WIZARD, F_WIZARD}, ! {"Idle", '\0', NOTYPE, UNLIMITED_IDLE, F_WIZARD, F_WIZARD}, {"Immortal", '\0', NOTYPE, NO_PAY | NO_QUOTA | UNKILLABLE, F_WIZARD, F_WIZARD}, ! {"Link_Anywhere", '\0', NOTYPE, LINK_ANYWHERE, F_WIZARD, F_WIZARD}, ! {"Login", '\0', NOTYPE, LOGIN_ANYTIME, F_WIZARD, F_WIZARD}, ! {"Long_Fingers", '\0', NOTYPE, LONG_FINGERS, F_WIZARD, F_WIZARD}, ! {"No_Pay", '\0', NOTYPE, NO_PAY, F_WIZARD, F_WIZARD}, ! {"No_Quota", '\0', NOTYPE, NO_QUOTA, F_WIZARD, F_WIZARD}, ! {"Open_Anywhere", '\0', NOTYPE, OPEN_ANYWHERE, F_WIZARD, F_WIZARD}, ! {"Pemit_All", '\0', NOTYPE, PEMIT_ALL, F_WIZARD, F_WIZARD}, ! {"Player_Create", '\0', NOTYPE, CREATE_PLAYER, F_WIZARD, F_WIZARD}, ! {"Poll", '\0', NOTYPE, SET_POLL, F_WIZARD, F_WIZARD}, ! {"Queue", '\0', NOTYPE, HUGE_QUEUE, F_WIZARD, F_WIZARD}, ! {"Quotas", '\0', NOTYPE, CHANGE_QUOTAS, F_WIZARD, F_WIZARD}, ! {"Search", '\0', NOTYPE, SEARCH_EVERYTHING, F_WIZARD, F_WIZARD}, ! {"See_All", '\0', NOTYPE, SEE_ALL, F_WIZARD, F_WIZARD}, ! {"See_Queue", '\0', NOTYPE, PS_ALL, F_WIZARD, F_WIZARD}, ! {"Tport_Anything", '\0', NOTYPE, TEL_OTHER, F_WIZARD, F_WIZARD}, ! {"Tport_Anywhere", '\0', NOTYPE, TEL_ANYWHERE, F_WIZARD, F_WIZARD}, ! {"Unkillable", '\0', NOTYPE, UNKILLABLE, F_WIZARD, F_WIZARD}, ! {"Can_nspemit", '\0', NOTYPE, CAN_NSPEMIT, F_WIZARD, F_WIZARD}, {NULL, '\0', 0, 0, 0, 0} }; --- 209,244 ---- */ /* Name Flag */ static FLAG power_table[] = { ! {"Announce", '\0', NOTYPE, CAN_WALL, F_WIZARD | F_LOG, F_WIZARD}, ! {"Boot", '\0', NOTYPE, CAN_BOOT, F_WIZARD | F_LOG, F_WIZARD}, ! {"Builder", '\0', NOTYPE, CAN_BUILD, F_WIZARD | F_LOG, F_WIZARD}, ! {"Cemit", '\0', NOTYPE, CEMIT, F_WIZARD | F_LOG, F_WIZARD}, ! {"Chat_Privs", '\0', NOTYPE, CHAT_PRIVS, F_WIZARD | F_LOG, F_WIZARD}, ! {"Functions", '\0', NOTYPE, GLOBAL_FUNCS, F_WIZARD | F_LOG, F_WIZARD}, ! {"Guest", '\0', NOTYPE, IS_GUEST, F_WIZARD | F_LOG, F_WIZARD}, ! {"Halt", '\0', NOTYPE, HALT_ANYTHING, F_WIZARD | F_LOG, F_WIZARD}, ! {"Hide", '\0', NOTYPE, CAN_HIDE, F_WIZARD | F_LOG, F_WIZARD}, ! {"Idle", '\0', NOTYPE, UNLIMITED_IDLE, F_WIZARD | F_LOG, F_WIZARD}, {"Immortal", '\0', NOTYPE, NO_PAY | NO_QUOTA | UNKILLABLE, F_WIZARD, F_WIZARD}, ! {"Link_Anywhere", '\0', NOTYPE, LINK_ANYWHERE, F_WIZARD | F_LOG, F_WIZARD}, ! {"Login", '\0', NOTYPE, LOGIN_ANYTIME, F_WIZARD | F_LOG, F_WIZARD}, ! {"Long_Fingers", '\0', NOTYPE, LONG_FINGERS, F_WIZARD | F_LOG, F_WIZARD}, ! {"No_Pay", '\0', NOTYPE, NO_PAY, F_WIZARD | F_LOG, F_WIZARD}, ! {"No_Quota", '\0', NOTYPE, NO_QUOTA, F_WIZARD | F_LOG, F_WIZARD}, ! {"Open_Anywhere", '\0', NOTYPE, OPEN_ANYWHERE, F_WIZARD | F_LOG, F_WIZARD}, ! {"Pemit_All", '\0', NOTYPE, PEMIT_ALL, F_WIZARD | F_LOG, F_WIZARD}, ! {"Player_Create", '\0', NOTYPE, CREATE_PLAYER, F_WIZARD | F_LOG, F_WIZARD}, ! {"Poll", '\0', NOTYPE, SET_POLL, F_WIZARD | F_LOG, F_WIZARD}, ! {"Queue", '\0', NOTYPE, HUGE_QUEUE, F_WIZARD | F_LOG, F_WIZARD}, ! {"Quotas", '\0', NOTYPE, CHANGE_QUOTAS, F_WIZARD | F_LOG, F_WIZARD}, ! {"Search", '\0', NOTYPE, SEARCH_EVERYTHING, F_WIZARD | F_LOG, F_WIZARD}, ! {"See_All", '\0', NOTYPE, SEE_ALL, F_WIZARD | F_LOG, F_WIZARD}, ! {"See_Queue", '\0', NOTYPE, PS_ALL, F_WIZARD | F_LOG, F_WIZARD}, ! {"Tport_Anything", '\0', NOTYPE, TEL_OTHER, F_WIZARD | F_LOG, F_WIZARD}, ! {"Tport_Anywhere", '\0', NOTYPE, TEL_ANYWHERE, F_WIZARD | F_LOG, F_WIZARD}, ! {"Unkillable", '\0', NOTYPE, UNKILLABLE, F_WIZARD | F_LOG, F_WIZARD}, ! {"Can_nspemit", '\0', NOTYPE, CAN_NSPEMIT, F_WIZARD | F_LOG, F_WIZARD}, {NULL, '\0', 0, 0, 0, 0} }; *************** *** 260,265 **** --- 262,268 ---- {"mdark", '\0', F_MDARK, F_MDARK}, {"odark", '\0', F_ODARK, F_ODARK}, {"disabled", '\0', F_DISABLED, F_DISABLED}, + {"log", '\0', F_LOG, F_LOG}, {NULL, '\0', 0, 0} }; *************** *** 558,564 **** while ((f = flag_alias_read(in, alias, n))) { flag_add(n, alias, f); } ! flag_add_additional(); } /* Write a flag out to a file */ --- 561,567 ---- while ((f = flag_alias_read(in, alias, n))) { flag_add(n, alias, f); } ! flag_add_additional(n); } /* Write a flag out to a file */ *************** *** 629,634 **** --- 632,638 ---- hashinit(&htab_flagspaces, 4, sizeof(FLAGSPACE)); flags = (FLAGSPACE *) mush_malloc(sizeof(FLAGSPACE), "flagspace"); + flags->name = strdup("FLAG"); flags->tab = &ptab_flag; flags->flagbits = 0; flags->flags = NULL; *************** *** 636,641 **** --- 640,646 ---- flags->flag_alias_table = flag_alias_tab; hashadd("FLAG", (void *) flags, &htab_flagspaces); flags = (FLAGSPACE *) mush_malloc(sizeof(FLAGSPACE), "flagspace"); + flags->name = strdup("POWER"); flags->tab = &ptab_power; flags->flagbits = 0; flags->flags = NULL; *************** *** 677,683 **** do_rawlog(LT_ERR, T("FLAG INIT: flag alias %s matches no known flag."), a->alias); } ! flag_add_additional(); } /* This is where the developers will put flag_add statements to create --- 682,688 ---- do_rawlog(LT_ERR, T("FLAG INIT: flag alias %s matches no known flag."), a->alias); } ! flag_add_additional(n); } /* This is where the developers will put flag_add statements to create *************** *** 685,722 **** * and use local_flags() in flaglocal.c instead. */ static void ! flag_add_additional(void) { FLAG *f; FLAGSPACE *flags; ! add_flag("MISTRUST", 'm', TYPE_THING | TYPE_EXIT | TYPE_ROOM, F_INHERIT, ! F_INHERIT); ! add_flag("ORPHAN", 'i', NOTYPE, F_ANY, F_ANY); ! add_flag("HEAVY", '\0', NOTYPE, F_ROYAL, F_ANY); ! add_power("Sql_Ok", '\0', NOTYPE, F_WIZARD, F_ANY); ! if ((f = match_flag("TERSE"))) ! f->type |= TYPE_THING; ! if ((f = match_flag("PUPPET"))) ! f->type |= TYPE_ROOM; ! if ((f = match_flag("SUSPECT"))) ! f->type = NOTYPE; ! if ((f = match_flag("NOSPOOF"))) { ! f->type = NOTYPE; ! f->letter = '"'; ! } ! if ((f = match_flag("PARANOID"))) { ! f->type = NOTYPE; ! f->letter = '\0'; ! } ! f = add_flag("CHAN_USEFIRSTMATCH", '\0', NOTYPE, F_INHERIT, F_INHERIT); ! flags = hashfind("FLAG", &htab_flagspaces); ! if (!match_flag("CHAN_FIRSTMATCH")) ! flag_add(flags, "CHAN_FIRSTMATCH", f); ! if (!match_flag("CHAN_MATCHFIRST")) ! flag_add(flags, "CHAN_MATCHFIRST", f); ! local_flags(); } /** Extract object type from old-style flag value. --- 690,745 ---- * and use local_flags() in flaglocal.c instead. */ static void ! flag_add_additional(FLAGSPACE * n) { FLAG *f; FLAGSPACE *flags; ! if (n->tab == &ptab_flag) { ! add_flag("MISTRUST", 'm', TYPE_THING | TYPE_EXIT | TYPE_ROOM, F_INHERIT, ! F_INHERIT); ! add_flag("ORPHAN", 'i', NOTYPE, F_ANY, F_ANY); ! add_flag("HEAVY", '\0', NOTYPE, F_ROYAL, F_ANY); ! if ((f = match_flag("TERSE"))) ! f->type |= TYPE_THING; ! if ((f = match_flag("PUPPET"))) ! f->type |= TYPE_ROOM; ! if ((f = match_flag("SUSPECT"))) ! f->type = NOTYPE; ! if ((f = match_flag("CHOWN_OK"))) ! f->type = TYPE_THING | TYPE_ROOM | TYPE_EXIT; ! if ((f = match_flag("NOSPOOF"))) { ! f->type = NOTYPE; ! f->letter = '"'; ! } ! if ((f = match_flag("PARANOID"))) { ! f->type = NOTYPE; ! f->letter = '\0'; ! } ! f = add_flag("CHAN_USEFIRSTMATCH", '\0', NOTYPE, F_INHERIT, F_INHERIT); ! flags = hashfind("FLAG", &htab_flagspaces); ! if (!match_flag("CHAN_FIRSTMATCH")) ! flag_add(flags, "CHAN_FIRSTMATCH", f); ! if (!match_flag("CHAN_MATCHFIRST")) ! flag_add(flags, "CHAN_MATCHFIRST", f); ! if ((f = match_flag("SUSPECT"))) ! f->perms |= F_LOG; ! if ((f = match_flag("WIZARD"))) ! f->perms |= F_LOG; ! if ((f = match_flag("ROYALTY"))) ! f->perms |= F_LOG; ! ! } else if (n->tab == &ptab_power) { ! if (!(indb_flags & DBF_POWERS_LOGGED)) { ! int i; ! for (i = 0; i < n->flagbits; i++) ! n->flags[i]->perms |= F_LOG; ! } ! add_power("Sql_Ok", '\0', NOTYPE, F_WIZARD | F_LOG, F_ANY); ! add_power("Debit", '\0', NOTYPE, F_WIZARD | F_LOG, F_ANY); ! } ! local_flags(n); } /** Extract object type from old-style flag value. *************** *** 798,809 **** int i; for (i = 0; i < n->flagbits; i++) if ((f = n->flags[i])) { ! /* Doh! Kludge-city. We'll ignore the CHOWN_OK flag on players, because ! * it's more useful to check 'C' as COLOR. Argle. ! */ ! if ((n->tab == &ptab_flag) ! && !(is_flag(f, "CHOWN_OK") && (type == TYPE_PLAYER)) ! && ((f->letter == c) && (f->type & type))) return f; } /* Do we need to do this? */ --- 821,827 ---- int i; for (i = 0; i < n->flagbits; i++) if ((f = n->flags[i])) { ! if ((n->tab == &ptab_flag) && ((f->letter == c) && (f->type & type))) return f; } /* Do we need to do this? */ *************** *** 1355,1366 **** twiddle_flag(n, thing, f, negate); if (negate) { /* log if necessary */ ! if (is_flag(f, "WIZARD")) ! do_log(LT_WIZ, player, thing, "WIZFLAG RESET"); ! else if (is_flag(f, "ROYALTY")) ! do_log(LT_WIZ, player, thing, "ROYAL FLAG RESET"); ! else if (is_flag(f, "SUSPECT")) ! do_log(LT_WIZ, player, thing, "SUSPECT FLAG RESET"); /* those who unDARK return to the WHO */ if (is_flag(f, "DARK") && IsPlayer(thing)) hide_player(thing, 0); --- 1373,1380 ---- twiddle_flag(n, thing, f, negate); if (negate) { /* log if necessary */ ! if (f->perms & F_LOG) ! do_log(LT_WIZ, player, thing, "%s FLAG CLEARED", f->name); /* those who unDARK return to the WHO */ if (is_flag(f, "DARK") && IsPlayer(thing)) hide_player(thing, 0); *************** *** 1418,1429 **** } else { /* log if necessary */ ! if (is_flag(f, "WIZARD")) ! do_log(LT_WIZ, player, thing, "WIZFLAG SET"); ! else if (is_flag(f, "ROYALTY")) ! do_log(LT_WIZ, player, thing, "ROYAL FLAG SET"); ! else if (is_flag(f, "SUSPECT")) ! do_log(LT_WIZ, player, thing, "SUSPECT FLAG SET"); if (is_flag(f, "TRUST") && GoodObject(Zone(thing))) notify(player, T("Warning: Setting trust flag on zoned object")); if (is_flag(f, "SHARED")) --- 1432,1439 ---- } else { /* log if necessary */ ! if (f->perms & F_LOG) ! do_log(LT_WIZ, player, thing, "%s FLAG SET", f->name); if (is_flag(f, "TRUST") && GoodObject(Zone(thing))) notify(player, T("Warning: Setting trust flag on zoned object")); if (is_flag(f, "SHARED")) *************** *** 1524,1529 **** --- 1534,1542 ---- *tp = '\0'; notify(player, tbuf1); } + if (f->perms & F_LOG) + do_log(LT_WIZ, player, thing, "%s POWER %s", f->name, + negate ? "CLEARED" : "SET"); } /** Check if an object has one or all of a list of flag characters. *** 1_7_7.1063/src/extmail.c Thu, 03 Jun 2004 16:22:17 -0500 dunemush (pennmush/c/22_extmail.c 1.44.1.7.1.5.1.9.1.1.1.1.1.17 660) --- 1_7_7.1098(w)/src/extmail.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/22_extmail.c 1.44.1.7.1.5.1.9.1.1.1.1.1.19 660) *************** *** 78,83 **** --- 78,84 ---- #include "dbdefs.h" #include "match.h" #include "extmail.h" + #include "function.h" #include "malias.h" #include "attrib.h" #include "parse.h" *************** *** 951,956 **** --- 952,969 ---- *ccount = cc; } + /* ARGSUSED */ + FUNCTION(fun_mailsend) + { + /* mailsend(,[/]) */ + if ((fun->flags & FN_NOSIDEFX) || Gagged(executor) || + !command_check_byname(executor, "@MAIL")) + safe_str(T(e_perm), buff, bp); + else if (FUNCTION_SIDE_EFFECTS) + do_mail_send(executor, args[0], args[1], 0, 1, 0); + else + safe_str(T(e_disabled), buff, bp); + } static void send_mail(dbref player, dbref target, char *subject, char *message, *** 1_7_7.1063/src/extchat.c Thu, 03 Jun 2004 16:22:17 -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) --- 1_7_7.1098(w)/src/extchat.c Mon, 28 Jun 2004 09:35:01 -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.23 660) *************** *** 1390,1395 **** --- 1390,1396 ---- CHAN *chan = NULL; CHANUSER *u; int canhear; + int override_checks = 0; if (!name || !*name) { notify(player, T("That is not a valid channel.")); *************** *** 1410,1423 **** notify(player, T("CHAT: I don't recognize that channel.")); return; } ! if (!Chan_Ok_Type(chan, player)) { notify_format(player, T ("Sorry, you're not the right type to be on channel <%s>."), ChanName(chan)); return; } ! if (!Chan_Can_Cemit(chan, player)) { notify_format(player, T("Sorry, you're not allowed to @cemit on channel <%s>."), ChanName(chan)); --- 1411,1430 ---- notify(player, T("CHAT: I don't recognize that channel.")); return; } ! /* If the cemitter is both See_All and Pemit_All, always allow them ! * to @cemit, as they could iterate over connected players, examine ! * their channels, and pemit to them anyway. ! */ ! if (See_All(player) && Pemit_All(player)) ! override_checks = 1; ! if (!override_checks && !Chan_Ok_Type(chan, player)) { notify_format(player, T ("Sorry, you're not the right type to be on channel <%s>."), ChanName(chan)); return; } ! if (!override_checks && !Chan_Can_Cemit(chan, player)) { notify_format(player, T("Sorry, you're not allowed to @cemit on channel <%s>."), ChanName(chan)); *************** *** 1426,1432 **** u = onchannel(player, chan); canhear = u ? !Chanuser_Gag(u) : 0; /* If the channel isn't open, you must hear it in order to speak */ ! if (!Channel_Open(chan)) { if (!u) { notify(player, T("You must be on that channel to speak on it.")); return; --- 1433,1439 ---- u = onchannel(player, chan); canhear = u ? !Chanuser_Gag(u) : 0; /* If the channel isn't open, you must hear it in order to speak */ ! if (!override_checks && !Channel_Open(chan)) { if (!u) { notify(player, T("You must be on that channel to speak on it.")); return; *** 1_7_7.1063/src/db.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/25_db.c 1.26.1.1.1.1.1.6.1.1.1.21 660) --- 1_7_7.1098(w)/src/db.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/25_db.c 1.26.1.1.1.1.1.6.1.1.1.22 660) *************** *** 52,58 **** extern int paranoid_checkpt; /* from game.c */ ! long indb_flags; /**< What flags are in the db we read at startup? */ int loading_db = 0; /**< Are we loading the database? */ --- 52,58 ---- extern int paranoid_checkpt; /* from game.c */ ! long indb_flags = 0; /**< What flags are in the db we read at startup? */ int loading_db = 0; /**< Are we loading the database? */ *************** *** 542,547 **** --- 542,548 ---- dbflag += DBF_AF_NODUMP; dbflag += DBF_NEW_FLAGS; dbflag += DBF_NEW_POWERS; + dbflag += DBF_POWERS_LOGGED; OUTPUT(fprintf(f, "+V%d\n", dbflag * 256 + 2)); db_write_flags(f); *** 1_7_7.1063/src/cque.c Thu, 03 Jun 2004 16:22:17 -0500 dunemush (pennmush/c/28_cque.c 1.36.1.5.1.1.1.1.1.1.1.2.1.6.1.18 660) --- 1_7_7.1098(w)/src/cque.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/28_cque.c 1.36.1.5.1.1.1.1.1.1.1.2.1.6.1.19 660) *************** *** 44,49 **** --- 44,50 ---- char *wnxt[10]; /**< environment to shove into the queue */ char *rnxt[NUMQ]; /**< registers to shove into the queue */ int break_called = 0; /**< Has the break command been called? */ + int process_command_port = 0; /**< port number that a command came from */ /** A queue entry. * This structure reprsents a queue entry on a linked list of queue *** 1_7_7.1063/src/conf.c Mon, 24 May 2004 20:15:09 -0500 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2.1.15.1.1.1.1.1.1.1.37 660) --- 1_7_7.1098(w)/src/conf.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2.1.15.1.1.1.1.1.1.1.38 660) *************** *** 36,45 **** #include "function.h" #include "confmagic.h" - #ifdef macintosh - #include "PMInit.h" - #endif - time_t mudtime; /**< game time, in seconds */ static void show_compile_options(dbref player); --- 36,41 ---- *************** *** 1348,1393 **** *options.compressprog = 0; *options.compresssuff = 0; - #endif - #ifdef macintosh - /* Copy Nick's Win32 code because we do the same thing */ - if ((options.compressprog && *options.compressprog)) { - do_rawlog(LT_ERR, - T - ("CONFIG: compression program is specified but not used in MacOS, ignoring"), - options.compressprog); - } - - if (((options.compresssuff && *options.compresssuff))) { - do_rawlog(LT_ERR, - T - ("CONFIG: compression suffix is specified but not used in MacOS, ignoring"), - options.compresssuff); - } - - /* Also remove the compression options */ - *options.uncompressprog = 0; - *options.compressprog = 0; - *options.compresssuff = 0; - - /* Now convert the UNIX paths specified to MacOS ones */ - PMConvertPath(options.input_db, options.input_db, 255); - PMConvertPath(options.output_db, options.output_db, 255); - PMConvertPath(options.crash_db, options.crash_db, 255); - PMConvertPath(options.chatdb, options.chatdb, 255); - PMConvertPath(options.mail_db, options.mail_db, 255); - PMConvertPath(options.connect_file[0], options.connect_file[0], 255); - PMConvertPath(options.motd_file[0], options.motd_file[0], 255); - PMConvertPath(options.wizmotd_file[0], options.wizmotd_file[0], 255); - PMConvertPath(options.newuser_file[0], options.newuser_file[0], 255); - PMConvertPath(options.register_file[0], options.register_file[0], 255); - PMConvertPath(options.quit_file[0], options.quit_file[0], 255); - PMConvertPath(options.down_file[0], options.down_file[0], 255); - PMConvertPath(options.full_file[0], options.full_file[0], 255); - PMConvertPath(options.guest_file[0], options.guest_file[0], 255); - PMConvertPath(options.access_file, options.access_file, 255); - PMConvertPath(options.names_file, options.names_file, 255); - /* Don't convert log filenames to MacOS; handled in log.c instead */ #endif } --- 1344,1349 ---- *** 1_7_7.1063/src/command.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/c/36_command.c 1.56.1.1.1.1.1.1.1.2.1.1.1.1.1.5.1.2.1.1.1.1.1.2.1.3.1.10.1.1.3.58 660) --- 1_7_7.1098(w)/src/command.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/36_command.c 1.56.1.1.1.1.1.1.1.2.1.1.1.1.1.5.1.2.1.1.1.1.1.2.1.3.1.10.1.1.3.61 660) *************** *** 284,290 **** {"DESERT", NULL, cmd_desert, CMD_T_PLAYER | CMD_T_THING, 0, 0}, {"DISMISS", NULL, cmd_dismiss, CMD_T_PLAYER | CMD_T_THING, 0, 0}, {"DROP", NULL, cmd_drop, CMD_T_PLAYER | CMD_T_THING, 0, 0}, ! {"EXAMINE", "ALL BRIEF DEBUG MORTAL", cmd_examine, CMD_T_ANY, 0, 0}, {"EMPTY", NULL, cmd_empty, CMD_T_PLAYER | CMD_T_THING | CMD_T_NOGAGGED, 0, 0}, {"ENTER", NULL, cmd_enter, CMD_T_ANY, 0, 0}, --- 284,290 ---- {"DESERT", NULL, cmd_desert, CMD_T_PLAYER | CMD_T_THING, 0, 0}, {"DISMISS", NULL, cmd_dismiss, CMD_T_PLAYER | CMD_T_THING, 0, 0}, {"DROP", NULL, cmd_drop, CMD_T_PLAYER | CMD_T_THING, 0, 0}, ! {"EXAMINE", "ALL BRIEF DEBUG MORTAL PARENT", cmd_examine, CMD_T_ANY, 0, 0}, {"EMPTY", NULL, cmd_empty, CMD_T_PLAYER | CMD_T_THING | CMD_T_NOGAGGED, 0, 0}, {"ENTER", NULL, cmd_enter, CMD_T_ANY, 0, 0}, *************** *** 884,893 **** } } switch (*p) { - case '#': - if (!Gagged(player) && Mobile(player)) - force_by_number(player, string); - /* Fall though is cool */ case '\0': /* Just in case. You never know */ command_parse_free_args; --- 884,889 ---- *************** *** 907,924 **** case EMIT_TOKEN: replacer = "@EMIT"; break; ! case CHAT_TOKEN: #ifdef CHAT_TOKEN_ALIAS ! case CHAT_TOKEN_ALIAS: #endif ! if (command_check_byname(player, "@chat") && parse_chat(player, p + 1)) { ! command_parse_free_args; ! return NULL; } ! /* And everything else */ ! default: ! /* EXCEPT exits, which have priority. We still pass them through ! * the parser so @hook on GOTO can work on them. */ if (can_move(player, p)) { ec = exit_command; --- 903,938 ---- case EMIT_TOKEN: replacer = "@EMIT"; break; ! } ! ! if (replacer) { ! cmd = command_find(replacer); ! p++; ! } else { ! /* A few other options, where we might want to fall through ! * to the default parsing if the syntax we're given doesn't ! * quite match. ! */ ! if (*p == CHAT_TOKEN #ifdef CHAT_TOKEN_ALIAS ! || *p == CHAT_TOKEN_ALIAS #endif ! ) { ! if (command_check_byname(player, "@chat") && parse_chat(player, p + 1)) { ! command_parse_free_args; ! return NULL; ! } ! } else if (*p == '#') { ! if (!Gagged(player) && Mobile(player) ! && force_by_number(player, string)) { ! command_parse_free_args; ! return NULL; ! } } ! /* At this point, we have not done a replacer, and neither chat nor ! * force by number applies, so we continue with the usual ! * processing. Exits have next priority. We still pass them through ! * the parser so @hook on GOTO can work on them. */ if (can_move(player, p)) { ec = exit_command; *************** *** 957,967 **** if (cmd && (cmd->type & CMD_T_INTERNAL)) cmd = NULL; } - } - - if (replacer) { - cmd = command_find(replacer); - p++; } /* Set up commandraw for future use. This will contain the canonicalization --- 971,976 ---- *** 1_7_7.1063/src/cmds.c Thu, 03 Jun 2004 16:22:17 -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) --- 1_7_7.1098(w)/src/cmds.c Mon, 28 Jun 2004 09:35:01 -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.14 660) *************** *** 918,924 **** } COMMAND (cmd_brief) { ! do_examine(player, arg_left, EXAM_BRIEF, 0); } COMMAND (cmd_drop) { --- 918,924 ---- } COMMAND (cmd_brief) { ! do_examine(player, arg_left, EXAM_BRIEF, 0, 0); } COMMAND (cmd_drop) { *************** *** 927,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) { --- 927,941 ---- COMMAND (cmd_examine) { int all = SW_ISSET(sw, SWITCH_ALL); + int parent = SW_ISSET(sw, SWITCH_PARENT); if (SW_ISSET(sw, SWITCH_BRIEF)) ! do_examine(player, arg_left, EXAM_BRIEF, all, 0); 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, parent); else ! do_examine(player, arg_left, EXAM_NORMAL, all, parent); } COMMAND (cmd_empty) { *** 1_7_7.1063/src/bsd.c Sun, 06 Jun 2004 20:04:25 -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.34 660) --- 1_7_7.1098(w)/src/bsd.c Mon, 28 Jun 2004 09:35:01 -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.42 660) *************** *** 162,168 **** --- 162,170 ---- extern time_t first_start_time; /**< When was the mush first started? */ extern int reboot_count; /**< How many times have we been rebooted? */ extern int database_loaded; /* From game.c */ + #ifdef SUN_OS static int extrafd; + #endif int shutdown_flag = 0; /**< Is it time to shut down? */ extern int paranoid_dump; /**< Are we doing a paranoid dump? */ void chat_player_announce(dbref player, char *msg, int ungag); *************** *** 501,510 **** #endif - #ifdef macintosh - #include "PMInit.h" - #endif - #ifndef BOOLEXP_DEBUGGING #if defined(WIN32) && !defined(__MINGW32__) /* Under WIN32, MUSH is a "service", so we just start a thread here. --- 503,508 ---- *************** *** 527,543 **** #endif FILE *newerr; - #ifdef macintosh - PMInitialize(); - #endif - - #ifndef macintosh /* read the configuration file */ if (argc < 2) { ! fprintf(stderr, "ERROR: Usage: %s /path/to/config_file\n", argv[0]); ! exit(2); ! } ! #endif #ifdef WIN32 { --- 525,539 ---- #endif FILE *newerr; /* read the configuration file */ if (argc < 2) { ! fprintf(stderr, ! "WARNING: Called without a config file argument. Assuming mush.cnf\n"); ! strncpy(confname, "mush.cnf", BUFFER_LEN - 1); ! } else ! strncpy(confname, argv[1], BUFFER_LEN - 1); ! ! confname[BUFFER_LEN - 1] = '\0'; #ifdef WIN32 { *************** *** 624,644 **** fclose(id); #endif - #ifdef macintosh - strncpy(confname, "mush.cnf", BUFFER_LEN - 1); - #else - strncpy(confname, argv[1], BUFFER_LEN - 1); - #endif - confname[BUFFER_LEN - 1] = '\0'; init_game_config(confname); /* save a file descriptor */ reserve_fd(); ! #ifndef macintosh ! #ifndef WIN32 extrafd = open("/dev/null", O_RDWR); #endif - #endif /* decide if we're in @shutdown/reboot */ restarting = 0; --- 620,632 ---- fclose(id); #endif init_game_config(confname); /* save a file descriptor */ reserve_fd(); ! #ifdef SUN_OS extrafd = open("/dev/null", O_RDWR); #endif /* decide if we're in @shutdown/reboot */ restarting = 0; *************** *** 829,839 **** FILE *newerr; /* close up the log files */ end_all_logs(); - #ifdef macintosh - newerr = fopen(errlog, "ab"); - #else newerr = fopen(errlog, "a"); - #endif if (!newerr) { fprintf(stderr, T("Unable to open %s. Error output continues to stderr.\n"), --- 817,823 ---- *************** *** 872,878 **** #endif #endif ! #if !(defined(macintosh) || defined(WIN32)) install_sig_handler(SIGCHLD, reaper); #endif --- 856,862 ---- #endif #endif ! #ifndef WIN32 install_sig_handler(SIGCHLD, reaper); #endif *************** *** 1463,1474 **** reserve_fd(); fb->len = sb.st_size; - #ifdef macintosh - /* Convert any linefeeds to newlines */ - for (n = 0; n < sb.st_size; n++) - if (fb->buff[n] == '\r') - fb->buff[n] = '\n'; - #endif } #endif /* Posix read code */ --- 1447,1452 ---- *************** *** 1525,1532 **** d->descriptor, d->addr, d->ip, Name(d->player), d->player); announce_disconnect(d->player); do_mail_purge(d->player); if (MAX_LOGINS) { - login_number--; if (!under_limit && (login_number < MAX_LOGINS)) { under_limit = 1; do_log(LT_CONN, 0, 0, --- 1503,1510 ---- d->descriptor, d->addr, d->ip, Name(d->player), d->player); announce_disconnect(d->player); do_mail_purge(d->player); + login_number--; if (MAX_LOGINS) { if (!under_limit && (login_number < MAX_LOGINS)) { under_limit = 1; do_log(LT_CONN, 0, 0, *************** *** 1588,1595 **** announce_disconnect(d->player); do_mail_purge(d->player); } if (MAX_LOGINS) { - login_number--; if (!under_limit && (login_number < MAX_LOGINS)) { under_limit = 1; do_log(LT_CONN, 0, 0, --- 1566,1573 ---- announce_disconnect(d->player); do_mail_purge(d->player); } + login_number--; if (MAX_LOGINS) { if (!under_limit && (login_number < MAX_LOGINS)) { under_limit = 1; do_log(LT_CONN, 0, 0, *************** *** 2760,2765 **** --- 2738,2744 ---- wenv[j] = (char *) NULL; for (j = 0; j < NUMQ; j++) renv[j][0] = '\0'; + process_command_port = d->descriptor; process_command(d->player, command, d->player, 1); send_suffix(d); *************** *** 2802,2810 **** d->player = player; d->doing[0] = '\0'; if (MAX_LOGINS) { /* check for exceeding max player limit */ - login_number++; if (under_limit && (login_number > MAX_LOGINS)) { under_limit = 0; do_rawlog(LT_CONN, --- 2781,2789 ---- d->player = player; d->doing[0] = '\0'; + login_number++; if (MAX_LOGINS) { /* check for exceeding max player limit */ if (under_limit && (login_number > MAX_LOGINS)) { under_limit = 0; do_rawlog(LT_CONN, *************** *** 3320,3327 **** mush_panicf(T("BAILOUT: caught signal %d"), sig); } ! /* To-do: What about OS X? */ ! #if !(defined(macintosh) || defined(WIN32)) /** Reap child processes, notably info_slaves and forking dumps, * when we receive a SIGCHLD signal. Don't fear this function. :) * \param sig signal caught. --- 3299,3305 ---- mush_panicf(T("BAILOUT: caught signal %d"), sig); } ! #ifndef WIN32 /** Reap child processes, notably info_slaves and forking dumps, * when we receive a SIGCHLD signal. Don't fear this function. :) * \param sig signal caught. *************** *** 3609,3619 **** if (dt < 0) dt = 0; holder = (time_t) dt; - #ifdef macintosh - delta = localtime(&holder); - #else delta = gmtime(&holder); - #endif if (delta->tm_yday > 0) { sprintf(buf, "%dd %02d:%02d", delta->tm_yday, delta->tm_hour, delta->tm_min); --- 3587,3593 ---- *************** *** 3631,3641 **** if (dt < 0) dt = 0; - #ifdef macintosh - delta = localtime((time_t *) & dt); - #else delta = gmtime((time_t *) & dt); - #endif if (delta->tm_yday > 0) { sprintf(buf, "%dd", delta->tm_yday); } else if (delta->tm_hour > 0) { --- 3605,3611 ---- *************** *** 4033,4038 **** --- 4003,4061 ---- } /* LWHO() function - really belongs elsewhere but needs stuff declared here */ + + FUNCTION(fun_xwho) + { + DESC *d; + int nwho; + int first; + int start, count; + int powered = (*(called_as + 1) != 'M'); + + if (!is_strict_integer(args[0]) || !is_strict_integer(args[1])) { + safe_str(T(e_int), buff, bp); + return; + } + start = parse_integer(args[0]); + count = parse_integer(args[1]); + + if (start < 1 || count < 1) { + safe_str(T("#-1 ARGUMENT OUT OF RANGE"), buff, bp); + return; + } + + nwho = 0; + first = 1; + + DESC_ITER_CONN(d) { + if (!Hidden(d) || (powered && Priv_Who(executor))) { + nwho += 1; + if (nwho >= start && nwho < (start + count)) { + if (first) + first = 0; + else + safe_chr(' ', buff, bp); + safe_dbref(d->player, buff, bp); + } + } + } + + } + + /* ARGSUSED */ + FUNCTION(fun_nwho) + { + DESC *d; + int count = 0; + int powered = (*(called_as + 1) != 'M'); + + DESC_ITER_CONN(d) { + if (!Hidden(d) || (powered && Priv_Who(executor))) { + count++; + } + } + safe_integer(count, buff, bp); + } /* ARGSUSED */ FUNCTION(fun_lwho) *** 1_7_7.1063/src/attrib.c Mon, 31 May 2004 08:41:25 -0500 dunemush (pennmush/c/40_attrib.c 1.15.1.2.1.5.1.1.1.3.1.3.1.2.1.2.1.2.2.1.1.2.1.2.1.2.1.1.1.3.1.1.1.1.1.1.3.43.1.9 660) --- 1_7_7.1098(w)/src/attrib.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/c/40_attrib.c 1.15.1.2.1.5.1.1.1.3.1.3.1.2.1.2.1.2.2.1.1.2.1.2.1.2.1.1.1.3.1.1.1.1.1.1.3.43.1.12 660) *************** *** 71,76 **** --- 71,77 ---- static int can_create_attr(dbref player, dbref obj, char const *atr_name, int flags); static ATTR *find_atr_in_list(ATTR *atr, char const *name); + static ATTR *atr_get_with_parent(dbref obj, char const *atrname, dbref *parent); /*======================================================================*/ *************** *** 732,737 **** --- 733,744 ---- ATTR * atr_get(dbref obj, char const *atrname) { + return atr_get_with_parent(obj, atrname, NULL); + } + + static ATTR * + atr_get_with_parent(dbref obj, char const *atrname, dbref *parent) + { static char name[ATTRIBUTE_NAME_LIMIT + 1]; char *p; ATTR *atr; *************** *** 773,780 **** /* Now actually find the attribute. */ atr = find_atr_in_list(atr, name); ! if (atr && (target == obj || !AF_Private(atr))) return atr; continue_target: /* Attribute wasn't on this object. Check a parent or ancestor. */ --- 780,790 ---- /* Now actually find the attribute. */ atr = find_atr_in_list(atr, name); ! if (atr && (target == obj || !AF_Private(atr))) { ! if (parent) ! *parent = target; return atr; + } continue_target: /* Attribute wasn't on this object. Check a parent or ancestor. */ *************** *** 874,879 **** --- 884,949 ---- if (ptr == *indirect) indirect = &AL_NEXT(ptr); } + } + + return result; + } + + /** Apply a function to a set of attributes, including inherited ones. + * This function applies another function to a set of attributes on an + * object specified by a (wildcarded) pattern to match against the + * attribute name on an object or its parents. + * \param player the enactor. + * \param thing the object containing the attribute. + * \param name the pattern to match against the attribute name. + * \param mortal only fetch mortal-visible attributes? + * \param func the function to call for each matching attribute, with + * a pointer to the dbref of the object the attribute is really on passed + * as the function's args argument. + * \return the sum of the return values of the functions called. + */ + int + atr_iter_get_parent(dbref player, dbref thing, const char *name, int mortal, + aig_func func) + { + ATTR *ptr, **indirect; + int result; + int len; + dbref parent = NOTHING; + + result = 0; + if (!name || !*name) + name = "*"; + len = strlen(name); + + if (!wildcard(name) && name[len - 1] != '`') { + ptr = atr_get_with_parent(thing, strupper(name), &parent); + if (ptr && (mortal ? Is_Visible_Attr(parent, ptr) + : Can_Read_Attr(player, parent, ptr))) + result = func(player, thing, name, ptr, &parent); + } else { + StrTree seen; + int parent_depth; + st_init(&seen); + for (parent_depth = MAX_PARENTS + 1, parent = thing; + parent_depth-- && parent != NOTHING; parent = Parent(parent)) { + indirect = &List(parent); + while (*indirect) { + ptr = *indirect; + if (!st_find(AL_NAME(ptr), &seen)) { + st_insert(AL_NAME(ptr), &seen); + if ((parent == thing) || !AF_Private(ptr)) { + if ((mortal ? Is_Visible_Attr(parent, ptr) + : Can_Read_Attr(player, parent, ptr)) + && atr_wild(name, AL_NAME(ptr))) + result += func(player, thing, name, ptr, &parent); + } + } + if (ptr == *indirect) + indirect = &AL_NEXT(ptr); + } + } + st_flush(&seen); } return result; *** 1_7_7.1063/hdrs/version.h Thu, 03 Jun 2004 17:00:50 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.37 660) --- 1_7_7.1098(w)/hdrs/version.h Mon, 28 Jun 2004 09:35:02 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.38 660) *************** *** 1,4 **** #define VERSION "1.7.7" ! #define PATCHLEVEL "33" ! #define PATCHDATE "[06/03/2004]" ! #define NUMVERSION 001007007033 --- 1,4 ---- #define VERSION "1.7.7" ! #define PATCHLEVEL "34" ! #define PATCHDATE "[06/22/2004]" ! #define NUMVERSION 001007007034 *** 1_7_7.1063/hdrs/mushdb.h Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/d/2_mushdb.h 1.1.1.9.1.1.1.30 660) --- 1_7_7.1098(w)/hdrs/mushdb.h Mon, 28 Jun 2004 09:35:02 -0500 dunemush (pennmush/d/2_mushdb.h 1.1.1.9.1.1.1.32 660) *************** *** 45,50 **** --- 45,51 ---- #define Pemit_All(x) (Wizard(x) || has_power_by_name(x,"PEMIT_ALL",NOTYPE)) #define Sql_Ok(x) (Wizard(x) || has_power_by_name(x, "SQL_OK", NOTYPE)) + #define Can_Debit(x) (Wizard(x) || has_power_by_name(x, "DEBIT", NOTYPE)) /* Permission macros */ #define Can_See_Flag(p,t,f) ((!(f->perms & (F_DARK | F_MDARK | F_ODARK | F_DISABLED)) || \ *************** *** 134,139 **** --- 135,141 ---- #define DBF_SPIFFY_LOCKS 0x10000 #define DBF_NEW_FLAGS 0x20000 #define DBF_NEW_POWERS 0x40000 + #define DBF_POWERS_LOGGED 0x80000 /* Reboot DB flag macros - these should be defined whether or not the * corresponding system option is defined *** 1_7_7.1063/hdrs/game.h Thu, 03 Jun 2004 16:22:17 -0500 dunemush (pennmush/d/12_game.h 1.28.1.2.1.1.1.1.1.1.1.7.1.19 660) --- 1_7_7.1098(w)/hdrs/game.h Mon, 28 Jun 2004 09:35:02 -0500 dunemush (pennmush/d/12_game.h 1.28.1.2.1.1.1.1.1.1.1.7.1.20 660) *************** *** 65,71 **** /* 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); --- 65,71 ---- /* 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, int parent); 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); *** 1_7_7.1063/hdrs/flags.h Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/d/14_flags.h 1.1.1.1.1.1.1.1.1.2.1.3.2.1.1.4.1.1.1.1.2.1.1.36 660) --- 1_7_7.1098(w)/hdrs/flags.h Mon, 28 Jun 2004 09:35:02 -0500 dunemush (pennmush/d/14_flags.h 1.1.1.1.1.1.1.1.1.2.1.3.2.1.1.4.1.1.1.1.2.1.1.37 660) *************** *** 40,45 **** --- 40,46 ---- * a set of flags, powers, or whatever. */ struct flagspace { + const char *name; /**< The name of this flagspace */ PTAB *tab; /**< Prefix table storing flags by name/alias */ FLAG **flags; /**< Variable-length array of pointers to canonical flags, indexed by bit */ int flagbits; /**< Current length of the flags array */ *************** *** 169,174 **** --- 170,176 ---- #define F_MDARK 0x1000 /* admin/God can see this flag */ #define F_ODARK 0x2000 /* owner/admin/God can see this flag */ #define F_DISABLED 0x4000 /* flag can't be used */ + #define F_LOG 0x8000 /* Log when the flag is set/cleared */ /*-------------------------------------------------------------------------- *** 1_7_7.1063/hdrs/externs.h Thu, 03 Jun 2004 16:22:17 -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) --- 1_7_7.1098(w)/hdrs/externs.h Mon, 28 Jun 2004 09:35:02 -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.23 660) *************** *** 186,191 **** --- 186,192 ---- /* From cque.c */ extern char *wenv[10], renv[NUMQ][BUFFER_LEN]; extern char *wnxt[10], *rnxt[NUMQ]; + extern int process_command_port; extern void do_second(void); extern int do_top(int ncom); extern void do_halt(dbref owner, const char *ncom, dbref victim); *************** *** 324,329 **** --- 325,333 ---- extern int charge_action(dbref player, dbref thing, const char *awhat); dbref first_visible(dbref player, dbref thing); + /* From rob.c */ + extern void s_Pennies(dbref thing, int amount); + /* From set.c */ extern void chown_object(dbref player, dbref thing, dbref newowner, int preserve); *************** *** 575,581 **** int local_can_interact_last(dbref from, dbref to, int type); /* flaglocal.c */ ! void local_flags(void); /* funlist.c */ void do_gensort(char *s[], int n, list_type sort_type); --- 579,585 ---- int local_can_interact_last(dbref from, dbref to, int type); /* flaglocal.c */ ! void local_flags(FLAGSPACE * flags); /* funlist.c */ void do_gensort(char *s[], int n, list_type sort_type); *** 1_7_7.1063/hdrs/dbdefs.h Tue, 01 Jun 2004 21:34:54 -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) --- 1_7_7.1098(w)/hdrs/dbdefs.h Mon, 28 Jun 2004 09:35:02 -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.12 660) *************** *** 52,58 **** #define Warnings(x) (db[(x)].warnings) #define Pennies(thing) (db[thing].penn) - #define s_Pennies(thing,p) (db[thing].penn=(p)) #define Parent(x) (db[(x)].parent) #define Powers(x) (db[(x)].powers) --- 52,57 ---- *** 1_7_7.1063/hdrs/switches.h Sat, 20 Mar 2004 01:47:00 -0600 dunemush (pennmush/d/21_switches.h 1.2.1.6.2.7.1.12 660) --- 1_7_7.1098(w)/hdrs/switches.h Mon, 28 Jun 2004 09:35:02 -0500 dunemush (pennmush/d/21_switches.h 1.2.1.6.2.7.1.13 660) *************** *** 88,148 **** #define SWITCH_PAGING 87 #define SWITCH_PANIC 88 #define SWITCH_PARANOID 89 ! #define SWITCH_PLAYERS 90 ! #define SWITCH_PORT 91 ! #define SWITCH_POWERS 92 ! #define SWITCH_PRESERVE 93 ! #define SWITCH_PRINT 94 ! #define SWITCH_PRIVS 95 ! #define SWITCH_PURGE 96 ! #define SWITCH_QUICK 97 ! #define SWITCH_QUIET 98 ! #define SWITCH_READ 99 ! #define SWITCH_REBOOT 100 ! #define SWITCH_RECALL 101 ! #define SWITCH_REGEXP 102 ! #define SWITCH_REGIONS 103 ! #define SWITCH_REGISTER 104 ! #define SWITCH_REMOVE 105 ! #define SWITCH_RENAME 106 ! #define SWITCH_RESTORE 107 ! #define SWITCH_RESTRICT 108 ! #define SWITCH_RETROACTIVE 109 ! #define SWITCH_ROOM 110 ! #define SWITCH_ROOMS 111 ! #define SWITCH_RSARGS 112 ! #define SWITCH_SEE 113 ! #define SWITCH_SEEFLAG 114 ! #define SWITCH_SELF 115 ! #define SWITCH_SEND 116 ! #define SWITCH_SET 117 ! #define SWITCH_SILENT 118 ! #define SWITCH_SKIPDEFAULTS 119 ! #define SWITCH_SPEAK 120 ! #define SWITCH_SPOOF 121 ! #define SWITCH_STATS 122 ! #define SWITCH_SUMMARY 123 ! #define SWITCH_TABLES 124 ! #define SWITCH_TAG 125 ! #define SWITCH_TELEPORT 126 ! #define SWITCH_TF 127 ! #define SWITCH_THINGS 128 ! #define SWITCH_TITLE 129 ! #define SWITCH_TRACE 130 ! #define SWITCH_TYPE 131 ! #define SWITCH_UNCLEAR 132 ! #define SWITCH_UNFOLDER 133 ! #define SWITCH_UNGAG 134 ! #define SWITCH_UNHIDE 135 ! #define SWITCH_UNMUTE 136 ! #define SWITCH_UNTAG 137 ! #define SWITCH_UNTIL 138 ! #define SWITCH_URGENT 139 ! #define SWITCH_USEFLAG 140 ! #define SWITCH_WHAT 141 ! #define SWITCH_WHO 142 ! #define SWITCH_WIPE 143 ! #define SWITCH_WIZ 144 ! #define SWITCH_WIZARD 145 ! #define SWITCH_YES 146 ! #define SWITCH_ZONE 147 --- 88,149 ---- #define SWITCH_PAGING 87 #define SWITCH_PANIC 88 #define SWITCH_PARANOID 89 ! #define SWITCH_PARENT 90 ! #define SWITCH_PLAYERS 91 ! #define SWITCH_PORT 92 ! #define SWITCH_POWERS 93 ! #define SWITCH_PRESERVE 94 ! #define SWITCH_PRINT 95 ! #define SWITCH_PRIVS 96 ! #define SWITCH_PURGE 97 ! #define SWITCH_QUICK 98 ! #define SWITCH_QUIET 99 ! #define SWITCH_READ 100 ! #define SWITCH_REBOOT 101 ! #define SWITCH_RECALL 102 ! #define SWITCH_REGEXP 103 ! #define SWITCH_REGIONS 104 ! #define SWITCH_REGISTER 105 ! #define SWITCH_REMOVE 106 ! #define SWITCH_RENAME 107 ! #define SWITCH_RESTORE 108 ! #define SWITCH_RESTRICT 109 ! #define SWITCH_RETROACTIVE 110 ! #define SWITCH_ROOM 111 ! #define SWITCH_ROOMS 112 ! #define SWITCH_RSARGS 113 ! #define SWITCH_SEE 114 ! #define SWITCH_SEEFLAG 115 ! #define SWITCH_SELF 116 ! #define SWITCH_SEND 117 ! #define SWITCH_SET 118 ! #define SWITCH_SILENT 119 ! #define SWITCH_SKIPDEFAULTS 120 ! #define SWITCH_SPEAK 121 ! #define SWITCH_SPOOF 122 ! #define SWITCH_STATS 123 ! #define SWITCH_SUMMARY 124 ! #define SWITCH_TABLES 125 ! #define SWITCH_TAG 126 ! #define SWITCH_TELEPORT 127 ! #define SWITCH_TF 128 ! #define SWITCH_THINGS 129 ! #define SWITCH_TITLE 130 ! #define SWITCH_TRACE 131 ! #define SWITCH_TYPE 132 ! #define SWITCH_UNCLEAR 133 ! #define SWITCH_UNFOLDER 134 ! #define SWITCH_UNGAG 135 ! #define SWITCH_UNHIDE 136 ! #define SWITCH_UNMUTE 137 ! #define SWITCH_UNTAG 138 ! #define SWITCH_UNTIL 139 ! #define SWITCH_URGENT 140 ! #define SWITCH_USEFLAG 141 ! #define SWITCH_WHAT 142 ! #define SWITCH_WHO 143 ! #define SWITCH_WIPE 144 ! #define SWITCH_WIZ 145 ! #define SWITCH_WIZARD 146 ! #define SWITCH_YES 147 ! #define SWITCH_ZONE 148 *** 1_7_7.1063/hdrs/attrib.h Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/d/25_attrib.h 1.4.1.1.1.1.1.2.1.1.1.1.1.2.1.2.1.1.1.2.1.1.2.3.1.10.1.2.1.5.1.1.1.2 660) --- 1_7_7.1098(w)/hdrs/attrib.h Mon, 28 Jun 2004 09:35:02 -0500 dunemush (pennmush/d/25_attrib.h 1.4.1.1.1.1.1.2.1.1.1.1.1.2.1.2.1.1.1.2.1.1.2.3.1.10.1.2.1.5.1.1.1.5 660) *************** *** 44,49 **** --- 44,51 ---- typedef int (*aig_func) (dbref, dbref, const char *, ATTR *, void *); extern int atr_iter_get(dbref player, dbref thing, char const *name, int mortal, aig_func func, void *args); + extern int atr_iter_get_parent(dbref player, dbref thing, char const *name, + int mortal, aig_func func); extern ATTR *atr_complete_match(dbref player, char const *atr, dbref privs); extern void atr_free(dbref thing); extern void atr_cpy(dbref dest, dbref source); *** 1_7_7.1063/Makefile.SH Wed, 26 May 2004 09:52:42 -0500 dunemush (pennmush/d/30_Makefile.S 1.14.1.1.1.7.1.1.1.18 700) --- 1_7_7.1098(w)/Makefile.SH Mon, 21 Jun 2004 14:54:59 -0500 dunemush (pennmush/d/30_Makefile.S 1.14.1.1.1.7.1.1.1.20 700) *************** *** 49,55 **** CC=$cc CCFLAGS=$optimize -I.. -I../hdrs $ccflags $warnings LDFLAGS=$ldflags ! CLIBS=$libs $cryptlib $libssl $libcrypto $libmysqlclient INSTALL=$install INSTALLDIR=$installdir CP=$cp --- 49,55 ---- CC=$cc CCFLAGS=$optimize -I.. -I../hdrs $ccflags $warnings LDFLAGS=$ldflags ! CLIBS=$libs $cryptlib $libssl $libmysqlclient INSTALL=$install INSTALLDIR=$installdir CP=$cp *************** *** 145,150 **** --- 145,156 ---- distdepend: hdrs/funs.h hdrs/cmds.h (cd src; make depend "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \ "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" ) + + local-files: + $(CP) -f src/cmdlocal.dst src/cmdlocal.c + $(CP) -f src/flaglocal.dst src/flaglocal.c + $(CP) -f src/funlocal.dst src/funlocal.c + $(CP) -f src/local.dst src/local.c # REQUIRES GNU INDENT! DON'T INDENT WITH ANYTHING ELSE! indent: *** 1_7_7.1063/Configure Mon, 24 May 2004 14:14:15 -0500 dunemush (pennmush/d/32_Configure 1.21.1.4.1.1.1.1.1.1.1.7.1.11 710) --- 1_7_7.1098(w)/Configure Mon, 28 Jun 2004 09:20:57 -0500 dunemush (pennmush/d/32_Configure 1.21.1.4.1.1.1.1.1.1.1.7.1.14 710) *************** *** 425,431 **** xlibpth='' libs='' d_openssl='' - libcrypto='' libssl='' lns='' mailer='' --- 425,430 ---- *************** *** 1667,1682 **** domainos) osname=apollo osvers="$3" ;; ! dgux) osname=dgux osvers="$3" ;; dynixptx*) osname=dynixptx osvers="$3" ;; ! freebsd) osname=freebsd osvers="$3" ;; genix) osname=genix ;; ! hp*) osname=hpux case "$3" in *.08.*) osvers=9 ;; *.09.*) osvers=9 ;; --- 1666,1681 ---- domainos) osname=apollo osvers="$3" ;; ! dgux) osname=dgux osvers="$3" ;; dynixptx*) osname=dynixptx osvers="$3" ;; ! freebsd) osname=freebsd osvers="$3" ;; genix) osname=genix ;; ! hp*) osname=hpux case "$3" in *.08.*) osvers=9 ;; *.09.*) osvers=9 ;; *************** *** 1698,1704 **** *) osvers="$3" ;; esac ;; ! netbsd*) osname=netbsd osvers="$3" ;; bsd386) osname=bsd386 --- 1697,1703 ---- *) osvers="$3" ;; esac ;; ! netbsd*) osname=netbsd osvers="$3" ;; bsd386) osname=bsd386 *************** *** 1739,1750 **** mips) osname=mips_osf1 ;; esac ;; ! uts) osname=uts osvers="$3" ;; qnx) osname=qnx osvers="$4" ;; $2) case "$osname" in *isc*) ;; *freebsd*) ;; --- 1738,1752 ---- mips) osname=mips_osf1 ;; esac ;; ! uts) osname=uts osvers="$3" ;; qnx) osname=qnx osvers="$4" ;; + mingw32*) osname=mingw32 + osvers="$3" + ;; $2) case "$osname" in *isc*) ;; *freebsd*) ;; *************** *** 4646,4654 **** --- 4648,4660 ---- if (-1 == setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val))) exit(2); #ifdef I_NETINET_TCP + #ifdef TCP_KEEPIDLE val = 1; if (-1 == setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val))) exit(3); + #else + exit(3); + #endif #endif exit(0); } *************** *** 4898,4947 **** : see if we should include -lssl and -lcrypto echo " " - if $test -r /usr/lib/libssl$_a || \ - $test -r /lib/libssl$_a || \ - $test -r /usr/local/lib/libssl$_a ; then - echo "-lssl found." >&4 - libssl='-lssl' - else - xxx=`./loc libssl$_a x $libpth` - case "$xxx" in - x) - echo "No ssl library found." >&4 - libssl='' - ;; - *) - echo "SSL library found in $xxx." >&4 - libssl="$xxx" - ;; - esac - fi - - if $test -r /usr/lib/libcrypto$_a || \ - $test -r /lib/libcrypto$_a || \ - $test -r /usr/local/lib/libcrypto$_a ; then - echo "-lcrypto found." >&4 - libcrypto='-lcrypto' - else - xxx=`./loc libcrypto$_a x $libpth` - case "$xxx" in - x) - echo "No crypto library found." >&4 - libcrypto='' - ;; - *) - echo "SSL crypto library found in $xxx." >&4 - libcrypto="$xxx" - ;; - esac - fi d_openssl="$undef" ! case "x$libssl$libcrypto" in ! x) ! ;; ! *) ! $cat > test_openssl.c < #include #include --- 4904,4917 ---- : see if we should include -lssl and -lcrypto echo " " d_openssl="$undef" ! ! if $test "x$no_openssl" = "x"; then ! ! libssl="-lssl -lcrypto" ! ! $cat > test_ssl.c < #include #include *************** *** 4951,4977 **** } EOM ! if $cc $ccflags $ldflags -o test_openssl test_openssl.c $libs $libssl $libcrypto >/dev/null 2>&1 ; ! then ! echo 'You have openssl...' >&4 ! version=`./test_openssl` ! if $test $? -eq 0; then ! d_openssl="$define" ! echo '...and at least version 0.9.6. Great.' >&4 ! else ! echo '...but not at least version 0.9.6.' >&4 libssl='' ! libcrypto='' ! fi else ! echo "You don't seem to have openssl." >&4 ! libssl='' ! libcrypto='' fi - $rm -f test_openssl* core - ;; - esac : see if rename exists set rename d_rename eval $inlibc --- 4921,4950 ---- } EOM ! if $cc $ccflags $ldflags -o test_ssl test_ssl.c $libs $libssl >/dev/null 2>&1 ; ! then ! echo 'You have openssl...' >&4 ! version=`./test_ssl` ! if $test $? -eq 0; then ! echo '...and at least version 0.9.6. Great.' >&4 ! d_openssl="$define" ! else ! echo '...but not version 0.9.6 or later.' >&4 ! libssl='' ! fi ! else ! echo "You don't seem to have openssl." >&4 libssl='' ! fi ! $rm -f test_ssl* core ! else ! ! echo "Skipping openssl tests." >&4 ! libssl='' ! fi : see if rename exists set rename d_rename eval $inlibc *************** *** 7102,7108 **** ldflags='$ldflags' less='$less' libc='$libc' - libcrypto='$libcrypto' libmysqlclient='$libmysqlclient' libpth='$libpth' libs='$libs' --- 7075,7080 ---- *** 1_7_7.1063/MANIFEST Thu, 27 May 2004 14:09:13 -0500 dunemush (pennmush/d/34_MANIFEST 1.21.1.2.1.7.1.3.1.25 600) --- 1_7_7.1098(w)/MANIFEST Sat, 26 Jun 2004 20:30:45 -0500 dunemush (pennmush/d/34_MANIFEST 1.21.1.2.1.7.1.3.1.26 600) *************** *** 226,231 **** --- 226,232 ---- os2/config.h po/Makefile win32/README.txt + win32/README_MySQL.txt win32/cmds.h win32/config.h win32/confmagic.h *** 1_7_7.1063/src/strtree.c Thu, 27 May 2004 14:05:53 -0500 dunemush (pennmush/d/35_strtree.c 1.14.1.10 660) --- 1_7_7.1098(w)/src/strtree.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/d/35_strtree.c 1.14.1.12 660) *************** *** 144,150 **** st_traverse_stats(root->root, &maxdepth, &mindepth, &avgdepth, &leaves, &perms, &nperms); notify_format(player, "%-10s %7d %7d %6d %4d %4d %9lu %11.3f %7lu", ! name, root->count, leaves, mindepth, maxdepth, avgdepth, perms, ((double) nperms / (double) (root->count - perms)), bytes); } --- 144,150 ---- st_traverse_stats(root->root, &maxdepth, &mindepth, &avgdepth, &leaves, &perms, &nperms); notify_format(player, "%-10s %7d %7d %6d %4d %4d %9lu %11.3f %7lu", ! name, (int) root->count, leaves, mindepth, maxdepth, avgdepth, perms, ((double) nperms / (double) (root->count - perms)), bytes); } *** 1_7_7.1063/src/mysocket.c Thu, 03 Jun 2004 16:22:17 -0500 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1.1.4.1.4.1.18 660) --- 1_7_7.1098(w)/src/mysocket.c Mon, 28 Jun 2004 09:35:01 -0500 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1.1.4.1.4.1.19 660) *************** *** 55,67 **** #include #endif #endif - #ifndef macintosh #ifndef __CYGWIN__ #include #endif #endif #endif - #endif #ifdef I_NETDB #include --- 55,65 ---- *************** *** 290,302 **** if (s < 0) continue; - #ifndef macintosh opt = 1; if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *) &opt, sizeof(opt)) < 0) { perror("setsockopt (Possibly ignorable)"); continue; } - #endif if (bind(s, server->ai_addr, server->ai_addrlen) == 0) break; /* Success */ --- 288,298 ---- *************** *** 331,337 **** void make_nonblocking(int s) { - #ifndef macintosh #ifdef WIN32 unsigned long arg = 1; if (ioctlsocket(s, FIONBIO, &arg) == -1) { --- 327,332 ---- *************** *** 356,362 **** exit(1); #endif } - #endif /* !macintosh */ } --- 351,356 ---- *** 1_7_7.1063/win32/pennmush.dsp Thu, 03 Jun 2004 17:48:19 -0500 dunemush (pennmush/f/9_pennmush.d 1.