PennMUSH Community

Changeset 477

Show
Ignore:
Timestamp:
08/16/06 01:31:08 (2 years ago)
Author:
pennmush
Message:

PennMUSH 1.7.7p39 Archival

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.7.7/CHANGES.177

    r475 r477  
    1818 
    1919========================================================================== 
     20 
     21Version 1.7.7 patchlevel 39                     October 25, 2004 
     22 
     23Major Changes: 
     24  * Game and chat database formats have been rewritten. They are  
     25    much more human-readable, can be extended with new fields 
     26    without using versioning flags, and provide better detection 
     27    and reporting of malformed databases. [SW] 
     28  * Chunk deref counts for locks are now stored in the database. [SW] 
     29Commands: 
     30  * New 'buy' command for purchasing items from vendors that can offer 
     31    multiple items at multiple prices. Patch by Walker@M*U*S*H. 
     32  * restrict_command and @command/restrict can now include an 
     33    error message to be sent when the player can't use the command, 
     34    which supercedes more generic errors. Suggested by Philip Mak. 
     35    Patch by Walker@M*U*S*H. 
     36Functions: 
     37  * lwho() can take an argument to produce the who list from that 
     38    player's viewpoint. Patch by Walker@M*U*S*H. 
     39Fixes: 
     40  * nattr(obj/attrib) returns 1 when matching a non-wildcarded attrib. 
     41    Report by Impster@M*U*S*H. 
     42  * +chan <msg> is now converted to @chat <chan>=<msg> (with noeval) 
     43    so @chat hooks apply to +chatting too. Patch by Walker@M*U*S*H. 
     44  * You must be able to locate a player to perform elock() on them. 
     45    Report by Ambrosia. 
     46  * Help fixes by Sketch@M*U*S*H. 
     47  * Simplification of @version code. [SW] 
     48  * cemit() restrictions are now based on those of @cemit, instead 
     49    of @emit. Report by BlackPhyr. 
     50  * Setting queue_loss to 0 disables queue_loss. A bad idea, but 
     51    more consistent behavior. Suggested by K Moon. 
     52  * Examining objects always shows their actual number of coins, 
     53    whether or not they're admin or no_pay. 
     54  * Code cleanup in @edit and in char routines. [SW]. 
     55  * Wrong object checked when reporting money as unlimited. Report 
     56    by Nate Barney. [EEH] 
     57  * New hints/freebsd_5.sh. Suggested by James Lang. 
     58  * INFO command once again reports the server as "PennMUSH", 
     59    not just a version number. Report by Mark Hassman. 
     60  * Win32 linting. Builds with NT_TCP should work again (although 
     61    @shutdown/reboot under NT_TCP is still not functional).  
     62    Reorganization of the Win32 services macros. [EEH] 
     63  * Fix to bug with login attempts using literal encrypted strings. 
     64    Reported by Cadar and Mirrador. 
     65  * @ps/all shows the right label on top. Patch by qa'toq@bDv. 
     66 
    2067 
    2168Version 1.7.7 patchlevel 38                     August 25, 2004 
  • 1.7.7/MANIFEST

    r471 r477  
    2323hdrs/copyrite.h 
    2424hdrs/dbdefs.h 
     25hdrs/dbio.h 
    2526hdrs/extchat.h 
    2627hdrs/externs.h 
     
    140141hints/dec_osf.sh 
    141142hints/freebsd.sh 
     143hints/freebsd_5.sh 
    142144hints/hpux.sh 
    143145hints/hpux-gcc.sh 
  • 1.7.7/Patchlevel

    r475 r477  
    11Do not edit this file. It is maintained by the official PennMUSH patches. 
    2 This is PennMUSH 1.7.7p38 
     2This is PennMUSH 1.7.7p39 
  • 1.7.7/game/mushcnf.dst

    r469 r477  
    261261function_invocation_limit 2500 
    262262 
    263 # the maximum number of times we're allowed to recursively call the parser 
     263# the maximum depth we're allowed to recursively call the parser 
    264264# for a single expression. This limits how much the stack size can increase, 
    265265# which could be useful if your host limits your stack (it will prevent 
     
    268268# speaking, you won't ever see more than 8192 recursions, so that's 
    269269# probably an upper limit, but most sane code shouldn't need more 
    270 # than a couple thousand. Setting it to '0' means unlimited. 
    271 call_limit 5000 
     270# than a couple hundred. Setting it to '0' means unlimited. 
     271call_limit 100 
    272272 
    273273# The maximum number of milliseconds of CPU time that a single queue entry 
     
    342342 
    343343# One out of how many commands that are queued will cost the 
    344 # player a coin? 
     344# player a coin? Setting this to 1 causes a coin to be lost with 
     345# every command. Setting it to 0 disables coin loss for queued 
     346# commands (and is a very bad idea). 
    345347queue_loss 63 
    346348 
  • 1.7.7/game/restrictcnf.dst

    r459 r477  
    11# 
    22# Commands to restrict 
    3 # Syntax: restrict_command <command> <restriction> 
     3# Syntax: restrict_command <command> <restriction> [" <error message>] 
    44#         restrict_function <function> <restriction> 
    55# <restriction> is a space separated list that may include: 
     
    1818#   !<restriction>  The opposite of a restriction (Command only). 
    1919#       nosidefx        The side-effect version of a function won't work (Function only). 
     20# 
     21# If <error message> is given to a restrict_command, it is sent to the player 
     22# instead of a more generic, typically useless error message. 
    2023# 
    2124# Command restrictions typically also apply to side-effect functions that 
     
    5861 
    5962# Uncomment to allow only admin or @powered builders to build 
    60 #restrict_command @open admin builder 
    61 #restrict_command @dig admin builder 
     63#restrict_command @open admin builder " You need the builder power to do that. 
     64#restrict_command @dig admin builder " You need the builder power to do that. 
    6265 
    6366# Uncomment to disallow them to create objects 
    64 #restrict_command @create admin builder 
     67#restrict_command @create admin builder " You need the builder power to do that. 
    6568 
    6669# Used to be player_locate 
     
    6871 
    6972# Used to be hate_dest 
    70 restrict_command @destroy noplayer 
     73restrict_command @destroy noplayer " Use @recycle instead 
    7174 
    7275# Used to be cemit_power 
    73 #restrict_command @cemit admin cemit 
     76#restrict_command @cemit admin cemit " You can't @cemit without cemit @power 
    7477 
    7578# Turn off ansi(). 
  • 1.7.7/game/txt/hlp/penncmd.hlp

    r475 r477  
    37463746   
    37473747See also: @lock, ENTER_OK, give, drop, @success, inventory 
     3748& @abuy 
     3749  @abuy <object> = <action list> 
     3750 
     3751  Sets the actions to be taken after a player buys an item 
     3752  from PRICELIST. The item purchased is passed in as %0, 
     3753  and the amount paid as %1 
     3754 
     3755  See also: buy, @buy, @obuy, @pricelist, MONEY, ACTION LISTS 
     3756& @buy 
     3757  @buy <object> [=<message>] 
     3758 
     3759  Sets the message that is shown to anyone who buys something from 
     3760  the object, using the 'buy' command. The item purchased is passed 
     3761  in as %0, and the amount paid as %1. 
     3762 
     3763  See also: buy, @abuy, @obuy, @pricelist, MONEY 
     3764& @obuy 
     3765  @obuy <object> [=<message>] 
     3766 
     3767  Sets the message that will be show to others whenever someone buys 
     3768  an item from the object's PRICELIST using the 'buy' command. The 
     3769  name of the person giving the money will be automatically inserted at 
     3770  the beginning of the message. The item purchased is passed in as %0, 
     3771  and the amount paid as %1. 
     3772 
     3773  See also: buy, @abuy, @obuy, @pricelist, MONEY 
     3774& @pricelist 
     3775  @pricelist <object>=<item1>:<price1>[,<price2>][ <item2>:...] 
     3776 
     3777  The PRICELIST attribute is a space-delimited list of item names 
     3778  and prices that are checked when the 'buy' command is run. 
     3779   
     3780  An item name may have '_'s where the player would use a space in 
     3781  the name. 
     3782 
     3783  A price is either a number (20), a range of numbers (10-30), or 
     3784  a minimum number (10+). 
     3785 
     3786  ex: 
     3787    @PRICELIST vendor=mansion:1000+ large_house:100-200 house:20,30,50 
     3788 
     3789  See also: buy, @abuy, @buy, @obuy, MONEY 
     3790& buy 
     3791  buy <item>[ from <vendor>][ for <cost>] 
     3792 
     3793  When you try buying an item, PRICELIST attributes on nearby objects 
     3794  (or <vendor> if given) will be checked for matching item:costs. If 
     3795  <cost> is given, the first item that matches that cost will be purchased. 
     3796  Otherwise, the first matching item that you can afford will be purchased. 
     3797 
     3798  If the pricelist match contains a list of prices, 
     3799  ITEM:30,20,10, the first one you can afford will be the resulting price. 
     3800 
     3801  ex: 
     3802  > &PRICELIST vendor=coke:20 pepsi:20 
     3803  > &drink.coke vendor=You enjoy a delicious coke. 
     3804  > &drink.pepsi vendor=It tastes like a funny coke. 
     3805  > @BUY vendor=u(drink.%0) 
     3806  > buy coke 
     3807  You enjoy a delicious coke. 
     3808 
     3809  See also: @ABUY, @BUY, @PRICELIST 
    37483810& give 
    37493811  give[/silent] <player>=<number> 
  • 1.7.7/game/txt/hlp/pennfunc.hlp

    r471 r477  
    177177  numbers, they will return an error or misbehave): 
    178178  dec()         div()         floordiv()    inc()         mod() 
     179  remainder() 
    179180 
    180181  These functions operate on n-dimensional vectors. A vector 
     
    588589  bound is returned. If it's higher than the higher bound, 
    589590  the higher bound is returned. 
     591   
     592  See also: ceil(), floor(), round(), trunc() 
    590593& BXOR() 
    591594  bxor(<integer>, <integer>,...) 
     
    609612  
    610613  Returns the least integral value greater than or equal to <number>. 
     614 
     615  See also: floor(), bound(), round(), trunc() 
    611616& CEMIT() 
    612617  cemit(<channel>, <message>[, <noisy>]) 
     
    13301335  
    13311336  Returns the greatest integral value less than or equal to <number>. 
     1337 
     1338  See also: ceil(), bound(), round(), trunc() 
    13321339& FMOD() 
    13331340  fmod(<number>,<divisor>) 
     
    23252332& LWHO() 
    23262333  lwho() 
     2334  lwho(<viewer>) 
    23272335 
    23282336  This returns a list of the dbref numbers for all currently-connected 
    23292337  players. When mortals use this function, the dbref numbers of DARK 
    23302338  wizards or royalty do NOT appear on the dbref list. 
     2339 
     2340  If lwho() is given an argument, and used by an object that can see 
     2341  DARK and Hidden players, lwho() returns the output of lwho() from 
     2342  <viewer>'s point of view. 
    23312343 
    23322344  See also: mwho(), nwho(), xwho() 
     
    24682480  mean(<number>,...) 
    24692481 
    2470   Returns the mean (Average) of its arguments. 
     2482  Returns the mean (arithmetic average) of its arguments. 
     2483 
     2484  See also: median(), stddev() 
    24712485& MEDIAN() 
    24722486  median(<number>,...) 
    24732487 
    24742488  Returns the median (the middlemost numerically) of its arguments. 
     2489 
     2490  See also: mean(), stddev() 
    24752491& MEMBER() 
    24762492  member(<list>,<word>[,<delimiter>]) 
     
    32153231  0 and 6. 
    32163232  
     3233  See also: ceil(), floor(), bound(), trunc() 
    32173234& S() 
    32183235& S-FUNCTION 
     
    36743691 
    36753692  Returns the sample standard deviation of its arguments. 
     3693 
     3694  See also: mean(), median() 
    36763695& STRCAT() 
    36773696  strcat(<string1>, <string2>) 
     
    40674086  "0" if there isn't one. For example, "val(101Dalmations)"  => 101. 
    40684087   
     4088  See also: ceil(), floor(), bound(), round() 
    40694089& TYPE() 
    40704090  type(<object>) 
  • 1.7.7/game/txt/hlp/penntop.hlp

    r473 r477  
    19181918  
    19191919 In the config file, the syntax is: 
    1920   restrict_command command-name restriction 
     1920  restrict_command command-name restriction [" <error message>] 
    19211921  restrict_function function-name restriction 
    19221922 
    19231923 From the game: 
    1924   @command/restrict command-name=restriction 
     1924  @command/restrict command-name=restriction [" <error message>] 
    19251925  @function/restrict function-name=restriction 
     1926  
     1927For commands, if <error message> is given, that message is sent to the 
     1928player who runs it instead of a generic, unhelpful error message. 
    19261929 
    19271930(Continued in restrict2) 
  • 1.7.7/game/txt/hlp/pennv177.hlp

    r475 r477  
    1 & 1.7.7p38 
     1& 1.7.7p39 
    22& changes 
    33This is a list of changes in this patchlevel which are probably of 
     
    1212be read in 'help patchlevels'. 
    1313 
     14Version 1.7.7 patchlevel 39                     October 25, 2004 
     15 
     16Major Changes: 
     17  * Game and chat database formats have been rewritten. They are  
     18    much more human-readable, can be extended with new fields 
     19    without using versioning flags, and provide better detection 
     20    and reporting of malformed databases. [SW] 
     21  * Chunk deref counts for locks are now stored in the database. [SW] 
     22Commands: 
     23  * New 'buy' command for purchasing items from vendors that can offer 
     24    multiple items at multiple prices. Patch by Walker@M*U*S*H. 
     25  * restrict_command and @command/restrict can now include an 
     26    error message to be sent when the player can't use the command, 
     27    which supercedes more generic errors. Suggested by Philip Mak. 
     28    Patch by Walker@M*U*S*H. 
     29Functions: 
     30  * lwho() can take an argument to produce the who list from that 
     31    player's viewpoint. Patch by Walker@M*U*S*H. 
     32Fixes: 
     33  * nattr(obj/attrib) returns 1 when matching a non-wildcarded attrib. 
     34    Report by Impster@M*U*S*H. 
     35  * +chan <msg> is now converted to @chat <chan>=<msg> (with noeval) 
     36    so @chat hooks apply to +chatting too. Patch by Walker@M*U*S*H. 
     37  * You must be able to locate a player to perform elock() on them. 
     38    Report by Ambrosia. 
     39  * Help fixes by Sketch@M*U*S*H. 
     40  * Simplification of @version code. [SW] 
     41  * cemit() restrictions are now based on those of @cemit, instead 
     42    of @emit. Report by BlackPhyr. 
     43  * Setting queue_loss to 0 disables queue_loss. A bad idea, but 
     44    more consistent behavior. Suggested by K Moon. 
     45  * Examining objects always shows their actual number of coins, 
     46    whether or not they're admin or no_pay. 
     47  * Code cleanup in @edit and in char routines. [SW]. 
     48  * Wrong object checked when reporting money as unlimited. Report 
     49    by Nate Barney. [EEH] 
     50  * New hints/freebsd_5.sh. Suggested by James Lang. 
     51  * INFO command once again reports the server as "PennMUSH", 
     52    not just a version number. Report by Mark Hassman. 
     53  * Win32 linting. Builds with NT_TCP should work again (although 
     54    @shutdown/reboot under NT_TCP is still not functional).  
     55    Reorganization of the Win32 services macros. [EEH] 
     56  * Fix to bug with login attempts using literal encrypted strings. 
     57    Reported by Cadar and Mirrador. 
     58  * @ps/all shows the right label on top. Patch by qa'toq@bDv. 
     59 
     60 
     61& 1.7.7p38 
    1462Version 1.7.7 patchlevel 38                     August 25, 2004 
    1563 
  • 1.7.7/game/txt/hlp/pennvOLD.hlp

    r475 r477  
    442044201.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
    44214421       19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 
    4422        36, 37, 38 
     4422       36, 37, 38, 39 
    442344231.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 
    442444241.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 
  • 1.7.7/hdrs/atr_tab.h

    r459 r477  
    99ATTR attr[] = { 
    1010  {"AAHEAR", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
     11  {"ABUY", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    1112  {"ACLONE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    1213  {"ACONNECT", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
     
    4243  {"AZENTER", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    4344  {"AZLEAVE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
     45  {"BUY", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    4446  {"CHARGES", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    4547  {"COMMENT", AF_NOPROG | AF_MDARK | AF_WIZARD | AF_PREFIXMATCH, 
     
    110112   NULL}, 
    111113  {"NAMEFORMAT", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
     114  {"OBUY", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    112115  {"ODEATH", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    113116  {"ODESCRIBE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
     
    137140  {"OZLEAVE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    138141  {"PAYMENT", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
     142  {"PRICELIST", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    139143  {"PREFIX", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
    140144  {"RECEIVE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 
  • 1.7.7/hdrs/boolexp.h

    r449 r477  
    2222extern int eval_boolexp(dbref player, boolexp b, dbref target); 
    2323extern boolexp parse_boolexp(dbref player, const char *buf, lock_type ltype); 
     24extern boolexp parse_boolexp_d(dbref player, const char *buf, lock_type ltype, 
     25                   int derefs); 
    2426extern void free_boolexp(boolexp b); 
    2527boolexp getboolexp(FILE * f, const char *ltype); 
  • 1.7.7/hdrs/command.h

    r465 r477  
    136136struct command_info { 
    137137  const char *name; /**< Canonical name of the command */ 
     138  const char *restrict_message; /**< Message sent when command is restricted */ 
    138139  command_func func;    /**< Function to call when command is run */ 
    139140  unsigned int type;    /**< Types of objects that can use the command */ 
  • 1.7.7/hdrs/compile.h

    r463 r477  
    4747#endif 
    4848 
     49/* Enable Win32 services support */ 
     50#ifdef WIN32 
     51#define WIN32SERVICES 
     52#endif 
    4953 
    50 #ifdef WIN32 
     54/* Disable Win32 services support due to it failing to run properly 
     55   when compiling with MinGW32. Eventually I would like to correct 
     56   the issue. - EEH */ 
     57#ifdef __MINGW32__ 
     58#undef WIN32SERVICES 
     59#endif 
     60 
    5161/* --------------- Stuff for Win32 services ------------------ */ 
    5262/* 
    53  
    5463   When "exit" is called to handle an error condition, we really want to 
    5564   terminate the game thread, not the whole process. 
    5665   MS VS.NET (_MSC_VER >= 1200) requires the weird noreturn stuff. 
    57  
    5866 */ 
    5967 
    60 #ifndef __MINGW32__ 
     68#ifdef WIN32SERVICES 
    6169#define exit(arg) Win32_Exit (arg) 
     70void NORETURN WIN32_CDECL Win32_Exit(int exit_code); 
    6271#endif 
    63 void NORETURN WIN32_CDECL Win32_Exit(int exit_code); 
    64 #endif              /* WIN32 */ 
    6572 
    6673#endif              /* __COMPILE_H */ 
  • 1.7.7/hdrs/externs.h

    r471 r477  
    524524    extern void do_wcheck_all(dbref player); 
    525525    extern void set_initial_warnings(dbref player); 
    526     extern const char *unparse_warnings(dbref thing); 
     526    extern const char *unparse_warnings(warn_type warnings); 
     527    extern warn_type parse_warnings(dbref player, const char *warnings); 
    527528 
    528529/* From wild.c */ 
     
    590591 
    591592/* From db.c */ 
    592     extern const char *getstring_noalloc(FILE * f); 
     593 
    593594    extern const char *set_name(dbref obj, const char *newname); 
    594     extern long getref(FILE * f); 
    595     extern void putref(FILE * f, long int ref); 
    596     extern void putstring(FILE * f, const char *s); 
    597595    extern dbref new_object(void); 
    598     extern int db_write_object(FILE * f, dbref i); 
    599     extern dbref db_write(FILE * f, int flag); 
    600     extern dbref db_read(FILE * f); 
    601596 
    602597/* From filecopy.c */ 
  • 1.7.7/hdrs/game.h

    r475 r477  
    5454extern int config_file_startup(const char *conf, int restrictions); 
    5555 
    56 /* From db.c */ 
    57 extern int db_paranoid_write(FILE * f, int flag); 
    58  
    5956/* From game.c */ 
    6057enum dump_type { DUMP_NORMAL, DUMP_DEBUG, DUMP_PARANOID }; 
     
    10198extern void do_kill(dbref player, const char *what, int cost, int slay); 
    10299extern void do_give(dbref player, char *recipient, char *amnt, int silent); 
     100extern void do_buy(dbref player, char *item, char *from, int price); 
    103101 
    104102/* From set.c */ 
  • 1.7.7/hdrs/mushdb.h

    r467 r477  
    137137#define DBF_NEW_POWERS          0x40000 
    138138#define DBF_POWERS_LOGGED       0x80000 
     139#define DBF_LABELS              0x100000 
    139140 
    140141/* Reboot DB flag macros - these should be defined whether or not the 
  • 1.7.7/hdrs/mushtype.h

    r463 r477  
    1616/* Dbref type */ 
    1717typedef int dbref; 
     18 
     19/** The type that stores the warning bitmask */ 
     20typedef long int warn_type; 
    1821 
    1922/* special dbref's */ 
  • 1.7.7/hdrs/parse.h

    r455 r477  
    4343extern int parse_boolean(char const *str); 
    4444extern dbref parse_dbref(char const *str); 
     45extern dbref qparse_dbref(char const *str); 
    4546extern dbref parse_objid(char const *str); 
    4647 
  • 1.7.7/hdrs/version.h

    r475 r477  
    11#define VERSION "1.7.7" 
    2 #define PATCHLEVEL "38
    3 #define PATCHDATE "[08/25/2004]" 
    4 #define NUMVERSION 001007007038 
     2#define PATCHLEVEL "39
     3#define PATCHDATE "[10/25/2004]" 
     4#define NUMVERSION 001007007039 
  • 1.7.7/src/Makefile.SH

    r469 r477  
    7676      ../hdrs/attrib.h ../hdrs/boolexp.h ../hdrs/bufferq.h ../hdrs/case.h \ 
    7777      ../hdrs/case.h ../hdrs/chunk.h ../hdrs/command.h ../hdrs/conf.h \ 
    78       ../hdrs/copyrite.h ../hdrs/dbdefs.h ../hdrs/extchat.h \ 
     78      ../hdrs/copyrite.h ../hdrs/dbdefs.h ../hdrs/dbio.h ../hdrs/extchat.h \ 
    7979      ../hdrs/externs.h ../hdrs/extmail.h ../hdrs/flags.h \ 
    8080      ../hdrs/function.h ../hdrs/game.h ../hdrs/getpgsiz.h ../hdrs/help.h \ 
  • 1.7.7/src/atr_tab.c

    r469 r477  
    4949  {"locked", '+', AF_LOCKED, AF_LOCKED}, 
    5050  {"safe", 'S', AF_SAFE, AF_SAFE}, 
     51  {"internal", '\0', AF_INTERNAL, AF_INTERNAL}, 
    5152  {"prefixmatch", '\0', AF_PREFIXMATCH, AF_PREFIXMATCH}, 
    5253  {"veiled", 'V', AF_VEILED, AF_VEILED}, 
  • 1.7.7/src/attrib.c

    r469 r477  
    915915 
    916916  if (!wildcard(name) && name[len - 1] != '`') { 
     917    parent = thing; 
    917918    if (doparent) 
    918919      ptr = atr_get_with_parent(thing, strupper(name), &parent); 
    919920    else 
    920921      ptr = atr_get_noparent(thing, strupper(name)); 
    921     result = 0; 
     922    if (ptr && (mortal ? Is_Visible_Attr(parent, ptr) 
     923        : Can_Read_Attr(player, parent, ptr))) 
     924      result += 1; 
    922925  } else { 
    923926    StrTree seen; 
  • 1.7.7/src/boolexp.c

    r469 r477  
    278278    static void opt_thread_jumps(struct bvm_asm *a); 
    279279    static void optimize_bvm_asm(struct bvm_asm *a); 
    280     static boolexp emit_bytecode(struct bvm_asm *a); 
     280    static boolexp emit_bytecode(struct bvm_asm *a, int derefs); 
    281281    static void free_bvm_asm(struct bvm_asm *a); 
    282282#ifdef DEBUG_BYTECODE 
     
    15311531 */ 
    15321532static boolexp 
    1533 emit_bytecode(struct bvm_asm *a
     1533emit_bytecode(struct bvm_asm *a, int derefs
    15341534{ 
    15351535  boolexp b; 
     
    15971597  } 
    15981598 
    1599   b = chunk_create(bytecode, len, 1); 
     1599  b = chunk_create(bytecode, len, derefs); 
    16001600  mush_free(bytecode, "boolexp.bytecode"); 
    16011601  return b; 
     
    16091609 * \param buf string representation of a boolexp. 
    16101610 * \param ltype the type of lock for which the boolexp is being parsed. 
     1611 * \param derefs the starting deref count for chunk storage. 
    16111612 * \return pointer to a newly allocated boolexp. 
    16121613 */ 
    16131614boolexp 
    1614 parse_boolexp(dbref player, const char *buf, lock_type ltype
     1615parse_boolexp_d(dbref player, const char *buf, lock_type ltype, int derefs
    16151616{ 
    16161617  struct boolexp_node *ast; 
     
    16301631  } 
    16311632  optimize_bvm_asm(bvasm); 
    1632   bytecode = emit_bytecode(bvasm); 
     1633  bytecode = emit_bytecode(bvasm, derefs); 
    16331634#ifdef DEBUG_BYTECODE 
    16341635  printf("\nSource string: \"%s\"\n", buf); 
     
    16391640  free_bvm_asm(bvasm); 
    16401641  return bytecode; 
     1642} 
     1643 
     1644/** Compile a string into boolexp bytecode. 
     1645 * Given a textual representation of a boolexp in a string, parse it into 
     1646 * a syntax tree, compile to bytecode, and return a pointer to a boolexp 
     1647 * structure. 
     1648 * \param player the enactor. 
     1649 * \param buf string representation of a boolexp. 
     1650 * \param ltype the type of lock for which the boolexp is being parsed. 
     1651 * \return pointer to a newly allocated boolexp. 
     1652 */ 
     1653boolexp 
     1654parse_boolexp(dbref player, const char *buf, lock_type ltype) 
     1655{ 
     1656  return parse_boolexp_d(player, buf, ltype, 0); 
    16411657} 
    16421658 
  • 1.7.7/src/bsd.c

    r473 r477  
    2929#define MAXHOSTNAMELEN 32 
    3030#define LC_MESSAGES 6 
    31 #ifndef __MINGW32__ 
    32 void shutdown_checkpoint(void); 
    33 #endif 
    3431#else               /* !WIN32 */ 
    3532#ifdef I_SYS_FILE 
     
    123120#include "attrib.h" 
    124121#include "game.h" 
     122#include "dbio.h" 
    125123#include "confmagic.h" 
    126124#ifdef HAS_WAITPID 
     
    329327#endif 
    330328#ifndef BOOLEXP_DEBUGGING 
    331 #ifdef WIN32 
     329#ifdef WIN32SERVICES 
     330void shutdown_checkpoint(void); 
    332331void mainthread(int argc, char **argv); 
    333332#else 
     
    496495 
    497496#ifndef BOOLEXP_DEBUGGING 
    498 #if defined(WIN32) && !defined(__MINGW32__) 
     497#ifdef WIN32SERVICES 
    499498/* Under WIN32, MUSH is a "service", so we just start a thread here. 
    500499 * The real "main" is in win32/services.c 
     
    510509int 
    511510main(int argc, char **argv) 
    512 #endif              /* WIN32 */ 
     511#endif              /* WIN32SERVICES */ 
    513512{ 
    514513#ifdef AUTORESTART 
     
    721720 
    722721  /* someone has told us to shut down */ 
    723 #ifdef WIN32 
    724 #ifndef __MINGW32__ 
     722#ifdef WIN32SERVICES 
    725723  /* Keep service manager happy */ 
    726724  shutdown_checkpoint(); 
    727725#endif 
    728 #endif 
    729726 
    730727  shutdown_queues(); 
    731728 
    732 #ifdef WIN32 
    733 #ifndef __MINGW32__ 
     729#ifdef WIN32SERVICES 
    734730  /* Keep service manager happy */ 
    735731  shutdown_checkpoint(); 
    736732#endif 
    737 #endif 
    738733 
    739734  close_sockets(); 
     
    744739#endif 
    745740 
    746 #ifdef WIN32 
    747 #ifndef __MINGW32__ 
     741#ifdef WIN32SERVICES 
    748742  /* Keep service manager happy */ 
    749743  shutdown_checkpoint(); 
    750 #endif 
    751744#endif 
    752745 
     
    767760#endif 
    768761 
    769 #ifdef WIN32 
    770 #ifndef __MINGW32__ 
     762#ifdef WIN32SERVICES 
    771763  /* Keep service manager happy */ 
    772764  shutdown_checkpoint(); 
    773 #endif 
    774765#endif 
    775766 
     
    789780  closesocket(sock); 
    790781#ifdef WIN32 
    791 #ifndef __MINGW32__ 
     782#ifdef WIN32SERVICES 
    792783  shutdown_checkpoint(); 
    793784#endif 
     
    33573348  queue_string_eol(call_by, tprintf("Connected: %d", count)); 
    33583349  queue_string_eol(call_by, tprintf("Size: %d", db_top)); 
    3359   queue_string_eol(call_by, tprintf("Version: %sp%s", VERSION, PATCHLEVEL)); 
     3350  queue_string_eol(call_by, 
     3351           tprintf("Version: PennMUSH %sp%s", VERSION, PATCHLEVEL)); 
    33603352#ifdef PATCHES 
    33613353  queue_string_eol(call_by, tprintf("Patches: %s", PATCHES)); 
     
    40804072  DESC *d; 
    40814073  int first; 
    4082   int powered = (*called_as == 'L'); 
     4074  dbref victim; 
     4075  int powered = ((*called_as == 'L') && Priv_Who(executor)); 
    40834076 
    40844077  first = 1; 
     4078 
     4079  if (nargs && args[0] && *args[0]) { 
     4080    /* An argument was given. Find the victim and choose the lowest 
     4081     * perms possible */ 
     4082    if (!powered) { 
     4083      safe_str(T(e_perm), buff, bp); 
     4084      return; 
     4085    } 
     4086    if ((victim = noisy_match_result(executor, args[0], NOTYPE, 
     4087                     MAT_EVERYTHING)) == 0) { 
     4088      safe_str(T(e_notvis), buff, bp); 
     4089      return; 
     4090    } 
     4091    if (!Priv_Who(victim)) 
     4092      powered = 0; 
     4093  } 
     4094 
    40854095  DESC_ITER_CONN(d) { 
    4086     if (!Hidden(d) || (powered && Priv_Who(executor))) { 
     4096    if (!Hidden(d) || powered) { 
    40874097      if (first) 
    40884098    first = 0; 
     
    41544164      match = d; 
    41554165  } 
    4156   return match ? difftime(mudtime, match->connected_at) : -1; 
     4166  if (match) { 
     4167    double result = difftime(mudtime, match->connected_at); 
     4168    return (int) result; 
     4169  } else 
     4170    return -1; 
    41574171} 
    41584172 
     
    41714185      match = d; 
    41724186  } 
    4173   return match ? difftime(mudtime, match->connected_at) : -1; 
     4187  if (match) { 
     4188    double result = difftime(mudtime, match->connected_at); 
     4189    return (int) result; 
     4190  } else 
     4191    return -1; 
    41744192} 
    41754193 
     
    41884206      match = d; 
    41894207  } 
    4190   return match ? difftime(mudtime, match->last_time) : -1; 
     4208  if (match) { 
     4209    double result = difftime(mudtime, match->last_time); 
     4210    return (int) result; 
     4211  } else 
     4212    return -1; 
    41914213} 
    41924214 
     
    42044226      match = d; 
    42054227  } 
    4206   return match ? difftime(mudtime, match->last_time) : -1; 
     4228  if (match) { 
     4229    double result = difftime(mudtime, match->last_time); 
     4230    return (int) result; 
     4231  } else 
     4232    return -1; 
    42074233} 
    42084234 
     
    48204846#endif 
    48214847 
    4822  
    4823 extern jmp_buf db_err;  /**< Jump buffer in the event of a dump error */ 
    48244848 
    48254849/** Dump the descriptor list to our REBOOTFILE so we can restore it on reboot. 
  • 1.7.7/src/cmds.c

    r475 r477  
    993993} 
    994994 
     995COMMAND (cmd_buy) { 
     996  char *from = NULL; 
     997  char *forwhat = NULL; 
     998  int price = -1; 
     999 
     1000  upcasestr(arg_left); 
     1001 
     1002  from = strstr(arg_left, " FROM "); 
     1003  forwhat = strstr(arg_left, " FOR "); 
     1004  if (from) { 
     1005    *from = '\0'; 
     1006    from += 6; 
     1007  } 
     1008  if (forwhat) { 
     1009    *forwhat = '\0'; 
     1010    forwhat += 5; 
     1011  } 
     1012  if (forwhat && !is_strict_integer(forwhat)) { 
     1013    notify(player, T("Buy for WHAT price?")); 
     1014    return; 
     1015  } else if (forwhat) { 
     1016    price = parse_integer(forwhat); 
     1017    if (price < 0) { 
     1018      notify(player, T("You can't buy things by taking money.")); 
     1019      return; 
     1020    } 
     1021  } 
     1022 
     1023  if (from) 
     1024    from = trim_space_sep(from, ' '); 
     1025  do_buy(player, arg_left, from, price); 
     1026} 
     1027 
    9951028COMMAND (cmd_give) { 
    9961029  do_give(player, arg_left, arg_right, (SW_ISSET(sw, SWITCH_SILENT))); 
  • 1.7.7/src/command.c

    r475 r477  
    281281   0, 0}, 
    282282 
     283  {"BUY", NULL, cmd_buy, CMD_T_ANY | CMD_T_NOGAGGED, 0, 0}, 
    283284  {"BRIEF", NULL, cmd_brief, CMD_T_ANY, 0, 0}, 
    284285  {"DESERT", NULL, cmd_desert, CMD_T_PLAYER | CMD_T_THING, 0, 0}, 
     
    433434  memset(cmd, 0, sizeof(COMMAND_INFO)); 
    434435  cmd->name = name; 
     436  cmd->restrict_message = NULL; 
    435437  cmd->func = func; 
    436438  cmd->type = type; 
     
    908910    replacer = "@EMIT"; 
    909911    break; 
     912  case CHAT_TOKEN: 
     913#ifdef CHAT_TOKEN_ALIAS 
     914  case CHAT_TOKEN_ALIAS: 
     915#endif 
     916    /* parse_chat() destructively modifies the command to replace 
     917     * the first space with a '=' if the command is an actual 
     918     * chat command */ 
     919    if (parse_chat(player, p + 1) && command_check_byname(player, "@CHAT")) { 
     920      /* This is a "+chan foo" chat style 
     921       * We set noevtoken to keep its noeval way, and 
     922       * set the cmd to allow @hook. */ 
     923      replacer = "@CHAT"; 
     924      noevtoken = 1; 
     925    } 
    910926  } 
    911927 
     
    918934     * quite match. 
    919935     */ 
    920     if (*p ==