PennMUSH Community

Changeset 471

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

PennMUSH 1.7.7p36 Archival

Files:

Legend:

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

    r469 r471  
    1818 
    1919========================================================================== 
     20 
     21Version 1.7.7 patchlevel 36                     August 9, 2004 
     22 
     23Functions: 
     24  * l/lv/n/nv/x/xvthings() functions by Walker@M*U*S*H. 
     25  * New flag to locate(), 'y', for matching player names like pmatch(), 
     26    without requiring a leading * before the name like the 'p' flag. [SW] 
     27  * lattr()/nattr() works for mortals on non-owned objects, showing 
     28    or counting only attribs they can examine. Suggested by Philip Mak, 
     29    patch by Walker@M*U*S*H. 
     30Minor changes (user-visible): 
     31  * Mortals can no longer teleport HEAVY admin through exits. 
     32    Suggested by Ambrosia@M*U*S*H. 
     33Minor changes (internals): 
     34  * win32 directory has subdirectories for msvc6 and msvc.net. [EEH] 
     35  * locate() on dark rooms now works for see_all players. Suggested 
     36    by Wayne@PDX. 
     37Fixes: 
     38  * @mail subjects are stripped of ansi before being stored (escape 
     39    chars were always smashed on display). Suggested by Wayne@PDX. 
     40  * @command/delete by God of a non-existing command caused a crash. 
     41    Report by Wayne@PDX. 
     42  * Follow works again. Report by Shirow. 
     43  * Fix to digest()'s sha hash on systems without OpenSSL. [SW] 
     44  * @list/command no longer includes duplicates. Report by Relay@M*U*S*H. [EEH] 
     45  * comp() again returns -1/1 instead of -2/2. Report by Jessica Hawthorne. 
     46  * sort() of large floats works again. Report by Jessica Hawthorne. 
     47  * Linting of warnings in funlist.c. Report by Nymeria@M*U*S*H. 
     48  * It was possible for wizards to create circular zone chains that 
     49    would cause an infinite loop. Report by Wayne@PDX. 
     50  * safe_ansi_string was double-prepending starting ansi codes. 
     51    Report by Shirow. 
     52  * Debian packaging improvements. [EEH] 
     53  * Help fixes by Mike Griffiths. 
     54 
    2055 
    2156Version 1.7.7 patchlevel 35                     July 21, 2004 
  • 1.7.7/COPYRITE

    r469 r471  
    171171 * Past and present PennMUSH development team members: 
    172172 *  T. Alexander Popiel, Ralph Melton, Thorvald Natvig, Luuk de Waard, 
    173  *  Shawn Wagner 
     173 *  Shawn Wagner, Ervin Hearn III 
    174174 * Past and present PennMUSH porters: 
    175175 *  Nick Gammon, Sylvia, Dan Williams, Ervin Hearn III 
  • 1.7.7/MANIFEST

    r467 r471  
    234234win32/options.h 
    235235win32/patches.h 
    236 win32/pennmush.dsp 
    237 win32/pennmush.dsw 
    238 win32/pennmush.vcproj 
    239 win32/pennmush.sln 
     236win32/msvc6/pennmush.dsp 
     237win32/msvc6/pennmush.dsw 
     238win32/msvc.net/pennmush.vcproj 
     239win32/msvc.net/pennmush.sln 
    240240win32/README.mingw 
    241241src/SWITCHES 
  • 1.7.7/Patchlevel

    r469 r471  
    11Do not edit this file. It is maintained by the official PennMUSH patches. 
    2 This is PennMUSH 1.7.7p35 
     2This is PennMUSH 1.7.7p36 
  • 1.7.7/game/aliascnf.dst

    r469 r471  
    5353function_alias modulo modulus 
    5454function_alias randword pickrand 
     55function_alias lthings lobjects 
     56function_alias lvthings lvobjects 
     57function_alias nthings nobjects 
     58function_alias nvthings nvobjects 
     59function_alias xthings xobjects 
     60function_alias xvthings xvobjects 
    5561 
    5662# For rhost compatibility 
  • 1.7.7/game/txt/hlp/penncmd.hlp

    r469 r471  
    22182218  @nspemit[/switches] <object>=<message> 
    22192219  @nsremit[/switches] <object> = <message>. 
     2220  @nsoemit[/<switch>] [<room>/]<object> [<object>...] = <message> 
    22202221  @nszemit <zone> = <message> 
    22212222 
    22222223  These wizard-only commands work like @emit, @lemit, @pemit, @remit, 
    2223   and @zemit, respectively, but will not include nospoof information. 
     2224  @oemit, and @zemit, respectively, but will not include nospoof information. 
    22242225  They are meant to be used by commands in the master room where the 
    22252226  nospoof information is just useless noise. They take all switches 
    22262227  of their respective commands. 
    22272228 
    2228 See also: @emit, @lemit, @pemit, @remit, @zemit, nsemit(), nslemit(), 
    2229           nspemit(), nsremit(), nszemit() 
     2229See also: @emit, @lemit, @pemit, @remit, @oemit, @zemit, nsemit(), nslemit(), 
     2230          nspemit(), nsremit(), nsoemit(), nszemit() 
    22302231& @odeath 
    22312232  @odeath <player> [=<message>] 
  • 1.7.7/game/txt/hlp/pennfunc.hlp

    r469 r471  
    11221122  See also: @lock, locktypes 
    11231123& EMIT() 
     1124& NSEMIT() 
    11241125  emit(<message>) 
    11251126  nsemit(<message>) 
     
    18851886  lattrp(<object>[/<attribute pattern>]) 
    18861887  
    1887   Returns a space-separated list of the attribute names on the object. 
    1888   You must either be a Wizard or Royalty, own the object, have the 
     1888  Returns a space-separated list of the attribute names on the object 
     1889  that you are permitted to examine. To see the complete list, 
     1890  you must either be a Wizard or Royalty, own the object, have the 
    18891891  See_All power, or have the object set VISUAL in order to use this  
    18901892  function on the object. 
     
    19071909 
    19081910  This function (known by two names) returns the number of attributes 
    1909   on the object. You must have permission to examine the object 
    1910   in order to use this function, but its count may include attributes 
    1911   that are not visible to you.  This function is considerably faster 
    1912   than words(lattr()) and doesn't suffer from buffer length constraints. 
    1913   It's designed primarily for statistical purposes. 
     1911  on the object that you are permitted to examine.  This function is 
     1912  considerably faster than words(lattr()) and doesn't suffer from buffer 
     1913  length constraints.  It's designed primarily for statistical purposes. 
    19141914 
    19151915  nattrp() and attrpcnt() also count matching attributes on the parent. 
     
    19521952  Returns the first <length> characters from string. 
    19531953 
     1954& NSLEMIT() 
    19541955& LEMIT() 
    19551956  lemit(<message>) 
     
    21182119    n   -   Neighbors (other objects in same location as <looker>) 
    21192120    p   -   Player names prefixed by '*' 
     2121    y   -   Player names with or without a '*' prefix 
    21202122    z   -   English-style matching (my 2nd book) of <name> 
    21212123    *   -   All of the above (try a complete match) 
     
    22002202  function. 
    22012203 
    2202   See also: lvplayers(), lcon() 
     2204  See also: lvplayers(), lcon(), lthings() 
     2205& LTHINGS() 
     2206  lthings(<object>) 
     2207 
     2208  This function returns the dbrefs of all things, dark or not, in  
     2209  <object>. You must be in <object> or control it to use this function. 
     2210 
     2211  See also: lvthings(), lcon() 
    22032212& LPOS() 
    22042213  lpos(<string>, <character>) 
     
    23082317  in an object. You must be in the object or control it to use this  
    23092318  function. 
     2319& LVTHINGS() 
     2320  lvthings(<object>) 
     2321 
     2322  This function returns the dbrefs of all connected and non-dark things 
     2323  inside an object. You must be in the object or control it to use this  
     2324  function. 
    23102325& LWHO() 
    23112326  lwho() 
     
    27582773 
    27592774  See also: ncon(), nexits(), xplayers(), lplayers(), lvplayers() 
     2775& NVTHINGS() 
     2776& NTHINGS() 
     2777  nthings(<object>) 
     2778  nvthings(<object>) 
     2779 
     2780  These functions return a count of the things in a container. 
     2781 
     2782  nthings(<object>)  is identical to words(lthings(<object>)) 
     2783  nvthings(<object>) is identical to words(lvthings(<object>)) 
     2784 
     2785  See also: ncon(), nexits(), xthings(), lthings(), lvthings() 
    27602786& NWHO() 
    27612787  nwho() 
     
    28042830 
    28052831& OEMIT() 
     2832& NSOEMIT() 
    28062833  oemit([<room>/]<object> [<object> ...],<message>) 
    28072834  nsoemit([<room>/]<object> [<object> ...],<message>) 
     
    28702897  In this case, you must control the object. 
    28712898& PEMIT() 
     2899& NSPEMIT() 
    28722900  pemit(<object list>,<message>) 
    28732901  nspemit(<object list>,<message>) 
     
    30493077  See also: regrab() 
    30503078& REMIT() 
     3079& NSREMIT() 
    30513080  remit(<object>, <message>) 
    30523081  nsremit(<object>, <message>) 
     
    44534482 
    44544483  See also: nplayers(), lplayers(), lvplayers() 
     4484& XVTHINGS() 
     4485& XTHINGS() 
     4486  xthings(<object>,<start>,<count>) 
     4487  xvthings(<object>,<start>,<count>) 
     4488 
     4489  xthings() fetches <count> or fewer non-player dbrefs from <object>'s 
     4490  contents starting at position <start>. It is useful when the number of 
     4491  players in a container causes lthings() to exceed the buffer limit. 
     4492 
     4493  It is equivalent to extract(lthings(<object>),<start>,<count>) 
     4494 
     4495  xvthings() is identical, except it follows the restrictions of 
     4496  lvthings() 
     4497 
     4498  See also: nthings(), lthings(), lvthings() 
    44554499& XWHO() 
    44564500& XMWHO() 
     
    44694513  See also: lwho(), mwho(), nwho() 
    44704514& ZEMIT() 
     4515& NSZEMIT() 
    44714516  zemit(<zone>, <message>) 
    44724517  nszemit(<zone>, <message>) 
  • 1.7.7/game/txt/hlp/pennv177.hlp

    r469 r471  
    1 & 1.7.7p35 
     1& 1.7.7p36 
    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 36                     August 9, 2004 
     15 
     16Functions: 
     17  * l/lv/n/nv/x/xvthings() functions by Walker@M*U*S*H. 
     18  * New flag to locate(), 'y', for matching player names like pmatch(), 
     19    without requiring a leading * before the name like the 'p' flag. [SW] 
     20  * lattr()/nattr() works for mortals on non-owned objects, showing 
     21    or counting only attribs they can examine. Suggested by Philip Mak, 
     22    patch by Walker@M*U*S*H. 
     23Minor changes (user-visible): 
     24  * Mortals can no longer teleport HEAVY admin through exits. 
     25    Suggested by Ambrosia@M*U*S*H. 
     26Minor changes (internals): 
     27  * win32 directory has subdirectories for msvc6 and msvc.net. [EEH] 
     28  * locate() on dark rooms now works for see_all players. Suggested 
     29    by Wayne@PDX. 
     30Fixes: 
     31  * @mail subjects are stripped of ansi before being stored (escape 
     32    chars were always smashed on display). Suggested by Wayne@PDX. 
     33  * @command/delete by God of a non-existing command caused a crash. 
     34    Report by Wayne@PDX. 
     35  * Follow works again. Report by Shirow. 
     36  * Fix to digest()'s sha hash on systems without OpenSSL. [SW] 
     37  * @list/command no longer includes duplicates. Report by Relay@M*U*S*H. [EEH] 
     38  * comp() again returns -1/1 instead of -2/2. Report by Jessica Hawthorne. 
     39  * sort() of large floats works again. Report by Jessica Hawthorne. 
     40  * Linting of warnings in funlist.c. Report by Nymeria@M*U*S*H. 
     41  * It was possible for wizards to create circular zone chains that 
     42    would cause an infinite loop. Report by Wayne@PDX. 
     43  * safe_ansi_string was double-prepending starting ansi codes. 
     44    Report by Shirow. 
     45  * Debian packaging improvements. [EEH] 
     46  * Help fixes by Mike Griffiths. 
     47 
     48 
     49& 1.7.7p35 
    1450Version 1.7.7 patchlevel 35                     July 21, 2004 
    1551 
  • 1.7.7/game/txt/hlp/pennvOLD.hlp

    r469 r471  
    44194419 
    442044201.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
    4421        19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 
     4421       19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 
     4422       36 
    442244231.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 
    442344241.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 
  • 1.7.7/hdrs/conf.h

    r469 r471  
    346346#define DBCK_INTERVAL    (options.dbck_interval) 
    347347#define MAX_PARENTS (options.max_parents) 
     348#define MAX_ZONES (30) 
    348349#define MAX_DEPTH (options.max_depth) 
    349350#define MAX_PENNIES (options.max_pennies) 
  • 1.7.7/hdrs/copyrite.h

    r443 r471  
    1414 * Copyright (c) 1994-2002, Jean Marie Diaz, Lydia Leong, and Devin Hooker. 
    1515 * 
    16  * Some code used in this server may have been directive from TinyMUSH 2.0. 
     16 * Some code used in this server may have been derived from TinyMUSH 2.0. 
    1717 * Copyright (c) 1995, Joseph Traub, Glenn Crocker. 
    1818 * 
    19  * Some code used in this server may have been directive from TinyMUD. 
     19 * Some code used in this server may have been derived from TinyMUD. 
    2020 * Copyright (c) 1995, David Applegate, James Aspnes, Timothy Freeman 
    2121 * and Bennet Yee. 
     
    171171 * Past and present PennMUSH development team members: 
    172172 *  T. Alexander Popiel, Ralph Melton, Thorvald Natvig, Luuk de Waard, 
    173  *  Shawn Wagner 
     173 *  Shawn Wagner, Ervin Hearn III 
    174174 * Past and present PennMUSH porters: 
    175175 *  Nick Gammon, Sylvia, Dan Williams, Ervin Hearn III 
  • 1.7.7/hdrs/externs.h

    r469 r471  
    448448    extern int safe_ansi_string(ansi_string *as, size_t start, size_t len, 
    449449                char *buff, char **bp); 
     450    extern int safe_ansi_string2(ansi_string *as, size_t start, size_t len, 
     451                 char *buff, char **bp); 
    450452/* Append N copies of the character X to the end of a string */ 
    451453    extern int safe_fill(char x, size_t n, char *buff, char **bp); 
  • 1.7.7/hdrs/match.h

    r353 r471  
    2020#define MAT_POSSESSION   0x000200 
    2121#define MAT_EXIT         0x004000 
     22#define MAT_PMATCH       0x008000 
    2223  /* special things to match */ 
    2324#define MAT_CARRIED_EXIT     0x010000 
  • 1.7.7/hdrs/version.h

    r469 r471  
    11#define VERSION "1.7.7" 
    2 #define PATCHLEVEL "35
    3 #define PATCHDATE "[07/21/2004]" 
    4 #define NUMVERSION 001007007035 
     2#define PATCHLEVEL "36
     3#define PATCHDATE "[08/09/2004]" 
     4#define NUMVERSION 001007007036 
  • 1.7.7/src/command.c

    r469 r471  
    13771377  } 
    13781378  command = command_find(name); 
     1379  if (!command) { 
     1380    notify(player, T("No such command.")); 
     1381    return; 
     1382  } 
    13791383  if (command->func != cmd_unimplemented) { 
    13801384    notify(player, 
     
    15651569    command = (COMMAND_INFO *) ptab_nextentry(&ptab_command); 
    15661570  } 
     1571 
     1572  do_gensort((dbref) 0, (char **) ptrs, nptrs, ALPHANUM_LIST); 
    15671573  bp = buff; 
    15681574  safe_str(ptrs[0], buff, &bp); 
    15691575  for (i = 1; i < nptrs; i++) { 
    1570     safe_chr(' ', buff, &bp); 
    1571     safe_str(ptrs[i], buff, &bp); 
     1576    if (gencomp 
     1577    ((dbref) 0, (char *) ptrs[i], (char *) ptrs[i - 1], 
     1578     ALPHANUM_LIST) > 0) { 
     1579      safe_chr(' ', buff, &bp); 
     1580      safe_str(ptrs[i], buff, &bp); 
     1581    } 
    15721582  } 
    15731583  *bp = '\0'; 
  • 1.7.7/src/destroy.c

    r469 r471  
    11671167{ 
    11681168  dbref n, zone = NOTHING, tmp; 
     1169  int zone_depth; 
    11691170 
    11701171  for (n = 0; n < db_top; n++) { 
     
    11771178      continue; 
    11781179    if (zone != n)      /* Objects can be zoned to themselves */ 
    1179       for (tmp = Zone(zone); GoodObject(tmp); tmp = Zone(tmp)) { 
     1180      for (zone_depth = MAX_ZONES, tmp = Zone(zone); 
     1181       zone_depth-- && GoodObject(tmp); tmp = Zone(tmp)) { 
    11801182    if (tmp == n) { 
    11811183      notify_format(Owner(n), 
  • 1.7.7/src/extmail.c

    r469 r471  
    979979  char sbuf[BUFFER_LEN]; 
    980980  ATTR *a; 
     981  char *cp; 
    981982 
    982983  if (!IsPlayer(target)) { 
     
    10071008  newp->from = player; 
    10081009  newp->from_ctime = CreTime(player); 
     1010 
    10091011  /* Deal with the subject */ 
    1010   if (subject) 
    1011     strcpy(sbuf, subject); 
     1012  cp = remove_markup(subject, NULL); 
     1013  if (subject && cp && *cp) 
     1014    strcpy(sbuf, cp); 
    10121015  else 
    10131016    strcpy(sbuf, T("(no subject)")); 
  • 1.7.7/src/funcrypt.c

    r467 r471  
    3636 
    3737 
    38 static char *crunch_code _((char *code)); 
    39 static char *crypt_code _((char *code, char *text, int type)); 
     38static char *crunch_code(char *code); 
     39static char *crypt_code(char *code, char *text, int type); 
    4040 
    4141#ifdef HAS_OPENSSL 
    4242static void safe_hexchar(unsigned char c, char *buff, char **bp); 
    4343#endif 
     44 
     45static void safe_sha0(const char *text, size_t len, char *buff, char **bp); 
    4446 
    4547/* Copy over only alphanumeric chars */ 
     
    107109} 
    108110 
    109 FUNCTION(fun_encrypt) 
    110 
    111   safe_str(crypt_code(args[1], args[0], 1), buff, bp); 
    112 
    113  
    114 FUNCTION(fun_decrypt) 
    115 
    116   safe_str(crypt_code(args[1], args[0], 0), buff, bp); 
    117 
    118  
    119 FUNCTION(fun_checkpass) 
    120 
    121   dbref it = match_thing(executor, args[0]); 
    122   if (!(GoodObject(it) && IsPlayer(it))) { 
    123     safe_str(T("#-1 NO SUCH PLAYER"), buff, bp); 
    124     return; 
    125   } 
    126   safe_boolean(password_check(it, args[1]), buff, bp); 
    127 
    128  
    129 FUNCTION(fun_sha0) 
     111static void 
     112safe_sha0(const char *text, size_t len, char *buff, char **bp) 
    130113{ 
    131114#ifdef HAS_OPENSSL 
     
    133116  int n; 
    134117 
    135   SHA(args[0], arglens[0], hash); 
     118  SHA(text, len, hash); 
    136119 
    137120  for (n = 0; n < SHA_DIGEST_LENGTH; n++) 
     
    141124  shsInfo.reverse_wanted = (BYTE) options.reverse_shs; 
    142125  shsInit(&shsInfo); 
    143   shsUpdate(&shsInfo, (const BYTE *) args[0], arglens[0]); 
     126  shsUpdate(&shsInfo, (const BYTE *) text, len); 
    144127  shsFinal(&shsInfo); 
    145128  safe_format(buff, bp, "%0lx%0lx%0lx%0lx%0lx", shsInfo.digest[0], 
     
    149132} 
    150133 
     134FUNCTION(fun_encrypt) 
     135{ 
     136  safe_str(crypt_code(args[1], args[0], 1), buff, bp); 
     137} 
     138 
     139FUNCTION(fun_decrypt) 
     140{ 
     141  safe_str(crypt_code(args[1], args[0], 0), buff, bp); 
     142} 
     143 
     144FUNCTION(fun_checkpass) 
     145{ 
     146  dbref it = match_thing(executor, args[0]); 
     147  if (!(GoodObject(it) && IsPlayer(it))) { 
     148    safe_str(T("#-1 NO SUCH PLAYER"), buff, bp); 
     149    return; 
     150  } 
     151  safe_boolean(password_check(it, args[1]), buff, bp); 
     152} 
     153 
     154FUNCTION(fun_sha0) 
     155{ 
     156  safe_sha0(args[0], arglens[0], buff, bp); 
     157} 
     158 
    151159FUNCTION(fun_digest) 
    152160{ 
     
    172180#else 
    173181  if (strcmp(args[0], "sha") == 0) { 
    174     SHS_INFO shsInfo; 
    175     shsInfo.reverse_wanted = (BYTE) options.reverse_shs; 
    176     shsInit(&shsInfo); 
    177     shsUpdate(&shsInfo, (const BYTE *) args[0], arglens[0]); 
    178     shsFinal(&shsInfo); 
    179     safe_format(buff, bp, "%0lx%0lx%0lx%0lx%0lx", shsInfo.digest[0], 
    180         shsInfo.digest[1], shsInfo.digest[2], shsInfo.digest[3], 
    181         shsInfo.digest[4]); 
     182    safe_sha0(args[1], arglens[1], buff, bp); 
    182183  } else { 
    183184    safe_str(T("#-1 UNSUPPORTED DIGEST TYPE"), buff, bp); 
  • 1.7.7/src/function.c

    r469 r471  
    348348  {"LT", fun_lt, 2, 2, FN_REG}, 
    349349  {"LTE", fun_lte, 2, 2, FN_REG}, 
     350  {"LTHINGS", fun_dbwalker, 1, 1, FN_REG}, 
    350351  {"LVCON", fun_dbwalker, 1, 1, FN_REG}, 
    351352  {"LVEXITS", fun_dbwalker, 1, 1, FN_REG}, 
    352353  {"LVPLAYERS", fun_dbwalker, 1, 1, FN_REG}, 
     354  {"LVTHINGS", fun_dbwalker, 1, 1, FN_REG}, 
    353355  {"LWHO", fun_lwho, 0, 0, FN_REG}, 
    354356  {"MAIL", fun_mail, 0, 2, FN_REG}, 
     
    400402  {"NSREMIT", fun_remit, 2, -2, FN_REG}, 
    401403  {"NSZEMIT", fun_zemit, 2, -2, FN_REG}, 
     404  {"NTHINGS", fun_dbwalker, 1, 1, FN_REG}, 
    402405  {"NUM", fun_num, 1, 1, FN_REG}, 
    403406  {"NULL", fun_null, 1, INT_MAX, FN_REG}, 
     
    405408  {"NVEXITS", fun_dbwalker, 1, 1, FN_REG}, 
    406409  {"NVPLAYERS", fun_dbwalker, 1, 1, FN_REG}, 
     410  {"NVTHINGS", fun_dbwalker, 1, 1, FN_REG}, 
    407411  {"NWHO", fun_nwho, 0, 0, FN_REG}, 
    408412  {"OBJ", fun_obj, 1, 1, FN_REG}, 
     
    547551  {"XGET", fun_xget, 2, 2, FN_REG}, 
    548552  {"XOR", fun_xor, 2, INT_MAX, FN_REG}, 
     553  {"XTHINGS", fun_dbwalker, 3, 3, FN_REG}, 
    549554  {"XVCON", fun_dbwalker, 3, 3, FN_REG}, 
    550555  {"XVEXITS", fun_dbwalker, 3, 3, FN_REG}, 
    551556  {"XVPLAYERS", fun_dbwalker, 3, 3, FN_REG}, 
     557  {"XVTHINGS", fun_dbwalker, 3, 3, FN_REG}, 
    552558  {"XWHO", fun_xwho, 2, 2, FN_REG}, 
    553559  {"ZEMIT", fun_zemit, 2, -2, FN_REG}, 
  • 1.7.7/src/fundb.c

    r469 r471  
    125125    return; 
    126126  } 
    127   if (!Can_Examine(executor, thing)) { 
    128     safe_str(T(e_perm), buff, bp); 
    129     return; 
    130   } 
    131127 
    132128  doparent = strchr(called_as, 'P') ? 1 : 0; 
    133129 
    134   if (!doparent && pattern == matchall) { 
     130  if (!doparent && pattern == matchall && Can_Examine(executor, thing)) { 
    135131    safe_integer(AttrCount(thing), buff, bp); 
    136132  } else { 
    137     safe_integer(atr_pattern_count(executor, thing, pattern, doparent, 0), buff, 
    138         bp); 
     133    safe_integer(atr_pattern_count(executor, thing, pattern, doparent, 
     134                  !Can_Examine(executor, thing)), buff, bp); 
    139135  } 
    140136} 
     
    173169  if (!GoodObject(thing)) { 
    174170    safe_str(T(e_notvis), buff, bp); 
    175     return; 
    176   } 
    177   if (!Can_Examine(executor, thing)) { 
    178     safe_str(T(e_perm), buff, bp); 
    179171    return; 
    180172  } 
     
    183175  lh.bp = bp; 
    184176  if (strchr(called_as, 'P')) { 
    185     (void) atr_iter_get_parent(executor, thing, pattern, 0, lattr_helper, &lh); 
     177    (void) atr_iter_get_parent(executor, thing, pattern, 
     178                   !Can_Examine(executor, thing), lattr_helper, 
     179                   &lh); 
    186180  } else { 
    187     (void) atr_iter_get(executor, thing, pattern, 0, lattr_helper, &lh); 
     181    (void) atr_iter_get(executor, thing, pattern, 
     182            !Can_Examine(executor, thing), lattr_helper, &lh); 
    188183  } 
    189184} 
     
    628623  int nthing; 
    629624  dbref thing; 
    630   int validloc, validthing
     625  int validloc
    631626  dbref startdb; 
    632627 
     
    652647    first = 1; 
    653648    DOLIST_VISIBLE(thing, startdb, executor) { 
    654       validthing = can_interact(thing, executor, INTERACT_SEE); 
    655       if (type == TYPE_PLAYER) 
    656     validthing &= (skipdark ? (IsPlayer(thing) && !Dark(thing) 
    657                    && Connected(thing)) : IsPlayer(thing)); 
    658       else 
    659     validthing &= (skipdark ? (!Dark(thing)) : 1); 
    660       if (validthing) { 
    661     nthing += 1; 
    662     if (count < 1 || (nthing >= start && nthing < start + count)) { 
    663       if (buff) { 
    664         if (first) 
    665           first = 0; 
    666         else 
    667           safe_chr(' ', buff, bp); 
    668         safe_dbref(thing, buff, bp); 
    669       } 
     649      /* Skip if: 
     650       * - We're not checking this type 
     651       * - We can't interact with this thing 
     652       * - We're only listing visual objects, and it's dark 
     653       * - It's a player, not connected, and skipdark is true 
     654       *   Funkily, lvcon() shows unconnected players, so we 
     655       *   use type == TYPE_PLAYER for this check. :-/. 
     656       */ 
     657      if (!(Typeof(thing) & type) || 
     658      !can_interact(thing, executor, INTERACT_SEE) || 
     659      (skipdark && Dark(thing)) || 
     660      ((type == TYPE_PLAYER) && skipdark && !Connected(thing))) 
     661    continue; 
     662      nthing += 1; 
     663      if (count < 1 || (nthing >= start && nthing < start + count)) { 
     664    if (buff) { 
     665      if (first) 
     666        first = 0; 
     667      else 
     668        safe_chr(' ', buff, bp); 
     669      safe_dbref(thing, buff, bp); 
    670670    } 
    671     if (result == NOTHING) { 
    672       if (after == NOTHING) 
    673         result = thing; 
    674       if (after == thing) 
    675         after = NOTHING; 
    676     } 
    677     if (retcount) 
    678       *retcount = nthing; 
    679671      } 
     672      if (result == NOTHING) { 
     673    if (after == NOTHING) 
     674      result = thing; 
     675    if (after == thing) 
     676      after = NOTHING; 
     677      } 
     678      if (retcount) 
     679    *retcount = nthing; 
    680680    } 
    681681  } else if (buff) 
     
    726726  switch (*ptr) { 
    727727  case 'C':         /* con */ 
     728    type = TYPE_THING | TYPE_PLAYER; 
     729    break; 
     730  case 'T':         /* things */ 
    728731    type = TYPE_THING; 
    729732    break; 
     
    736739  default: 
    737740    /* This should never be reached ... */ 
    738     type = TYPE_THING
     741    type = TYPE_THING | TYPE_PLAYER
    739742  } 
    740743 
     
    17301733      match_flags |= MAT_NEIGHBOR; 
    17311734      break; 
     1735    case 'y': 
     1736      match_flags |= MAT_PMATCH; 
     1737      break; 
    17321738    case 'p': 
    17331739      match_flags |= MAT_PLAYER; 
     
    17771783      safe_dbref(NOTHING, buff, bp); 
    17781784  } else { 
    1779     if (can_interact(item, executor, INTERACT_SEE) && !DarkLegal(item)) 
     1785    if (can_interact(item, executor, INTERACT_SEE) 
     1786    && (See_All(executor) || !DarkLegal(item))) 
    17801787      safe_dbref(item, buff, bp); 
    17811788    else 
  • 1.7.7/src/funlist.c

    r469 r471  
    1919#include "pcre.h" 
    2020#include "match.h" 
     21#include "command.h" 
    2122#include "attrib.h" 
    2223#include "dbdefs.h" 
     
    701702typedef void (*makerecord) (s_rec *, dbref player, char *sortflags); 
    702703 
    703 #define GENRECORD(x) void x(s_rec *rec,dbref player,char *sortflags) 
     704#define GENRECORD(x) void x(s_rec *rec,dbref player,char *sortflags); \ 
     705  void x(s_rec *rec, \ 
     706    dbref player __attribute__ ((__unused__)), \ 
     707    char *sortflags __attribute__ ((__unused__))) 
    704708 
    705709/** Sorting strings by different values. We store both the string and 
     
    780784  const s_rec *sr1 = (const s_rec *) s1; 
    781785  const s_rec *sr2 = (const s_rec *) s2; 
    782   int res = 0; 
     786  NVAL res = 0; 
    783787  res = sr1->numval - sr2->numval; 
    784788  return Compare(res, sr1, sr2); 
     
    809813GENRECORD(gen_db_name) 
    810814{ 
    811   rec->str = ""; 
     815  rec->str = (char *) ""; 
    812816  if (RealGoodObject(rec->db)) 
    813817    rec->str = (char *) Name(rec->db); 
     
    860864  /* Eek, I hate dealing with memory issues. */ 
    861865 
    862   static char *defstr = ""; 
     866  static char *defstr = (char *) ""; 
    863867  const char *ptr; 
    864868 
     
    10281032     i++) ; 
    10291033  } 
    1030   // FIXME 
    10311034  s1.freestr = s2.freestr = 0; 
    10321035  if (ltypelist[i].isdbs) { 
     
    10861089     sorti++) ; 
    10871090  } 
    1088   // FIXME 
    10891091  sp = (s_rec *) mush_malloc(n * sizeof(s_rec), "do_gensort"); 
    10901092  for (i = 0; i < n; i++) { 
     
    28522854 
    28532855/* string, regexp, replacement string. Acts like sed or perl's s///g, 
    2854 //with an ig version */ 
     2856 * with an ig version */ 
    28552857int re_subpatterns = -1;  /**< Number of subpatterns in regexp */ 
    28562858int *re_offsets;      /**< Array of offsets to subpatterns */ 
  • 1.7.7/src/funstr.c

    r469 r471  
    4747              int linenum, char *fieldsep, int fslen, char *linesep, 
    4848              int lslen, char filler); 
     49static int comp_gencomp(dbref executor, char *left, char *right, char *type); 
    4950void init_tag_hashtab(void); 
    5051void init_pronouns(void); 
     
    461462} 
    462463 
     464static int 
     465comp_gencomp(dbref executor, char *left, char *right, char *type) 
     466{ 
     467  int c; 
     468  c = gencomp(executor, left, right, type); 
     469  return (c > 0 ? 1 : (c < 0 ? -1 : 0)); 
     470} 
     471 
    463472/* ARGSUSED */ 
    464473FUNCTION(fun_comp) 
     
    482491      r = remove_markup(args[1], &rlen); 
    483492      memcpy(right, r, rlen); 
    484       safe_integer(gencomp(executor, left, right, ALPHANUM_LIST), buff, bp); 
     493      safe_integer(comp_gencomp(executor, left, right, ALPHANUM_LIST), buff, 
     494           bp); 
    485495      return; 
    486496    } 
     
    493503      r = remove_markup(args[1], &rlen); 
    494504      memcpy(right, r, rlen); 
    495       safe_integer(gencomp(executor, left, right, INSENS_ALPHANUM_LIST), buff
    496            bp); 
     505      safe_integer(comp_gencomp(executor, left, right, INSENS_ALPHANUM_LIST)
     506           buff, bp); 
    497507      return; 
    498508    } 
     
    502512      return; 
    503513    } 
    504     safe_integer(gencomp(executor, args[0], args[1], NUMERIC_LIST), buff, bp); 
     514    safe_integer(comp_gencomp(executor, args[0], args[1], NUMERIC_LIST), buff, 
     515         bp); 
    505516    return; 
    506517  case 'F': 
     
    509520      return; 
    510521    } 
    511     safe_integer(gencomp(executor, args[0], args[1], FLOAT_LIST), buff, bp); 
     522    safe_integer(comp_gencomp(executor, args[0], args[1], FLOAT_LIST), buff, 
     523         bp); 
    512524    return; 
    513525  case 'D': 
     
    520532    return; 
    521533      } 
    522       safe_integer(gencomp(executor, args[0], args[1], DBREF_LIST), buff, bp); 
     534      safe_integer(comp_gencomp(executor, args[0], args[1], DBREF_LIST), buff, 
     535           bp); 
    523536      return; 
    524537    } 
     
    17901803    if (ansilen < 0) { 
    17911804      /* word doesn't fit on one line, so cut it */ 
    1792       safe_ansi_string(as, pstr - as->text, ansiwidth - 1, buff, bp); 
     1805      safe_ansi_string2(as, pstr - as->text, ansiwidth - 1, buff, bp); 
    17931806      safe_chr('-', buff, bp); 
    17941807      pstr += ansiwidth - 1;    /* move to start of next line */ 
    17951808    } else { 
    17961809      /* normal line */ 
    1797       safe_ansi_string(as, pstr - as->text, ansilen, buff, bp); 
     1810      safe_ansi_string2(as, pstr - as->text, ansilen, buff, bp); 
    17981811      if (pstr[ansilen] == '\r') 
    17991812    ++ansilen; 
     
    18581871    if (!*ptr) { 
    18591872      if (len > 0) { 
    1860     safe_ansi_string(as[i], ptrs[i] - (as[i]->text), len, segment, &sp); 
     1873    safe_ansi_string2(as[i], ptrs[i] - (as[i]->text), len, segment, &sp); 
    18611874      } 
    18621875      ptrs[i] = ptr; 
     
    18651878      len = (tptr - ptrs[i]) + 1; 
    18661879      if (len > 0) { 
    1867     safe_ansi_string(as[i], ptrs[i] - (as[i]->text), len, segment, &sp); 
     1880    safe_ansi_string2(as[i], ptrs[i] - (as[i]->text), len, segment, &sp); 
    18681881      } 
    18691882      ptrs[i] = ptr + 1; 
     
    18751888      len = (tptr - ptrs[i]) + 1; 
    18761889      if (len > 0) { 
    1877     safe_ansi_string(as[i], ptrs[i] - (as[i]->text), len, segment, &sp); 
     1890    safe_ansi_string2(as[i], ptrs[i] - (as[i]->text), len, segment, &sp); 
    18781891      } 
    18791892      ptrs[i] = lastspace; 
    18801893    } else { 
    18811894      if (len > 0) { 
    1882     safe_ansi_string(as[i], ptrs[i] - (as[i]->text), len, segment, &sp); 
     1895    safe_ansi_string2(as[i], ptrs[i] - (as[i]->text), len, segment, &sp); 
    18831896      } 
    18841897      ptrs[i] = ptr; 
  • 1.7.7/src/match.c

    r461 r471  
    6565#define match_absolute(name) parse_objid(name) 
    6666static dbref match_player(const dbref matcher, const char *match_name); 
     67static dbref match_pmatch(const dbref matcher, const char *match_name); 
    6768static dbref choose_thing(const dbref match_who, const int preferred_type, 
    6869              long int flags, dbref thing1, dbref thing2); 
     
    342343    return match; 
    343344    } 
     345    if (flags & MAT_PMATCH) { 
     346      match = match_pmatch(who, name); 
     347      if (GoodObject(match)) 
     348    return match; 
     349    } 
    344350  } else { 
    345351    /* We're doing a nearby match and the player doesn't have 
     
    485491    return NOTHING; 
    486492  for (p = match_name + 1; isspace((unsigned char) *p); p++) ; 
     493  /* If lookup_player fails, try a partial match on connected 
     494   * players, 2.0 style. That can return match, NOTHING, AMBIGUOUS 
     495   */ 
     496  match = lookup_player(p); 
     497  return (match != NOTHING) ? match : visible_short_page(matcher, p); 
     498} 
     499 
     500static dbref 
     501match_pmatch(const dbref matcher, const char *match_name) 
     502{ 
     503  dbref match; 
     504  const char *p; 
     505 
     506  for (p = match_name; isspace((unsigned char) *p); p++) ; 
    487507  /* If lookup_player fails, try a partial match on connected 
    488508   * players, 2.0 style. That can return match, NOTHING, AMBIGUOUS 
  • 1.7.7/src/move.c

    r469 r471  
    443443      /* Move the followers if the leader is elsewhere */ 
    444444      if (Location(player) != loc) 
    445         follower_command(player, loc, tprintf("%s #%d", "move", exit_m)); 
     445        follower_command(player, loc, tprintf("%s #%d", "goto", exit_m)); 
    446446      break; 
    447447    case TYPE_PLAYER: 
     
    459459      /* Move the followers if the leader is elsewhere */ 
    460460      if (Location(player) != loc) 
    461         follower_command(player, loc, tprintf("%s #%d", "move", exit_m)); 
     461        follower_command(player, loc, tprintf("%s #%d", "goto", exit_m)); 
    462462      break; 
    463463    case TYPE_EXIT: 
  • 1.7.7/src/set.c

    r469 r471  
    326326    Owner(thing) = Owner(newowner); 
    327327  } 
    328   Zone(thing) = Zone(newowner); 
     328  /* Don't allow circular zones */ 
     329  Zone(thing) = NOTHING; 
     330  if (GoodObject(Zone(newowner))) { 
     331    dbref tmp; 
     332    int ok_to_zone = 1; 
     333    int zone_depth = MAX_ZONES; 
     334    for (tmp = Zone(Zone(newowner)); GoodObject(tmp); tmp = Zone(tmp)) { 
     335      if (tmp == thing) { 
     336    notify(player, T("Circular zone broken.")); 
     337    ok_to_zone = 0; 
     338    break; 
     339      } 
     340      if (tmp == Zone(tmp)) /* Ran into an