Changeset 471
- Timestamp:
- 08/16/06 01:21:00 (2 years ago)
- Files:
-
- 1.7.7/CHANGES.177 (modified) (1 diff)
- 1.7.7/COPYRITE (modified) (1 diff)
- 1.7.7/MANIFEST (modified) (1 diff)
- 1.7.7/Patchlevel (modified) (1 diff)
- 1.7.7/game/aliascnf.dst (modified) (1 diff)
- 1.7.7/game/txt/hlp/penncmd.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennfunc.hlp (modified) (13 diffs)
- 1.7.7/game/txt/hlp/pennv177.hlp (modified) (2 diffs)
- 1.7.7/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.7.7/hdrs/conf.h (modified) (1 diff)
- 1.7.7/hdrs/copyrite.h (modified) (2 diffs)
- 1.7.7/hdrs/externs.h (modified) (1 diff)
- 1.7.7/hdrs/match.h (modified) (1 diff)
- 1.7.7/hdrs/version.h (modified) (1 diff)
- 1.7.7/src/command.c (modified) (2 diffs)
- 1.7.7/src/destroy.c (modified) (2 diffs)
- 1.7.7/src/extmail.c (modified) (2 diffs)
- 1.7.7/src/funcrypt.c (modified) (6 diffs)
- 1.7.7/src/function.c (modified) (4 diffs)
- 1.7.7/src/fundb.c (modified) (9 diffs)
- 1.7.7/src/funlist.c (modified) (8 diffs)
- 1.7.7/src/funstr.c (modified) (11 diffs)
- 1.7.7/src/match.c (modified) (3 diffs)
- 1.7.7/src/move.c (modified) (2 diffs)
- 1.7.7/src/set.c (modified) (3 diffs)
- 1.7.7/src/strutil.c (modified) (2 diffs)
- 1.7.7/src/wiz.c (modified) (1 diff)
- 1.7.7/utils/penn-install (modified) (4 diffs)
- 1.7.7/win32/README.mingw (modified) (1 diff)
- 1.7.7/win32/confmagic.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.7.7/CHANGES.177
r469 r471 18 18 19 19 ========================================================================== 20 21 Version 1.7.7 patchlevel 36 August 9, 2004 22 23 Functions: 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. 30 Minor changes (user-visible): 31 * Mortals can no longer teleport HEAVY admin through exits. 32 Suggested by Ambrosia@M*U*S*H. 33 Minor 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. 37 Fixes: 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 20 55 21 56 Version 1.7.7 patchlevel 35 July 21, 2004 1.7.7/COPYRITE
r469 r471 171 171 * Past and present PennMUSH development team members: 172 172 * T. Alexander Popiel, Ralph Melton, Thorvald Natvig, Luuk de Waard, 173 * Shawn Wagner 173 * Shawn Wagner, Ervin Hearn III 174 174 * Past and present PennMUSH porters: 175 175 * Nick Gammon, Sylvia, Dan Williams, Ervin Hearn III 1.7.7/MANIFEST
r467 r471 234 234 win32/options.h 235 235 win32/patches.h 236 win32/ pennmush.dsp237 win32/ pennmush.dsw238 win32/ pennmush.vcproj239 win32/ pennmush.sln236 win32/msvc6/pennmush.dsp 237 win32/msvc6/pennmush.dsw 238 win32/msvc.net/pennmush.vcproj 239 win32/msvc.net/pennmush.sln 240 240 win32/README.mingw 241 241 src/SWITCHES 1.7.7/Patchlevel
r469 r471 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.7.7p3 52 This is PennMUSH 1.7.7p36 1.7.7/game/aliascnf.dst
r469 r471 53 53 function_alias modulo modulus 54 54 function_alias randword pickrand 55 function_alias lthings lobjects 56 function_alias lvthings lvobjects 57 function_alias nthings nobjects 58 function_alias nvthings nvobjects 59 function_alias xthings xobjects 60 function_alias xvthings xvobjects 55 61 56 62 # For rhost compatibility 1.7.7/game/txt/hlp/penncmd.hlp
r469 r471 2218 2218 @nspemit[/switches] <object>=<message> 2219 2219 @nsremit[/switches] <object> = <message>. 2220 @nsoemit[/<switch>] [<room>/]<object> [<object>...] = <message> 2220 2221 @nszemit <zone> = <message> 2221 2222 2222 2223 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. 2224 2225 They are meant to be used by commands in the master room where the 2225 2226 nospoof information is just useless noise. They take all switches 2226 2227 of their respective commands. 2227 2228 2228 See also: @emit, @lemit, @pemit, @remit, @ zemit, nsemit(), nslemit(),2229 nspemit(), nsremit(), ns zemit()2229 See also: @emit, @lemit, @pemit, @remit, @oemit, @zemit, nsemit(), nslemit(), 2230 nspemit(), nsremit(), nsoemit(), nszemit() 2230 2231 & @odeath 2231 2232 @odeath <player> [=<message>] 1.7.7/game/txt/hlp/pennfunc.hlp
r469 r471 1122 1122 See also: @lock, locktypes 1123 1123 & EMIT() 1124 & NSEMIT() 1124 1125 emit(<message>) 1125 1126 nsemit(<message>) … … 1885 1886 lattrp(<object>[/<attribute pattern>]) 1886 1887 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 1889 1891 See_All power, or have the object set VISUAL in order to use this 1890 1892 function on the object. … … 1907 1909 1908 1910 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. 1914 1914 1915 1915 nattrp() and attrpcnt() also count matching attributes on the parent. … … 1952 1952 Returns the first <length> characters from string. 1953 1953 1954 & NSLEMIT() 1954 1955 & LEMIT() 1955 1956 lemit(<message>) … … 2118 2119 n - Neighbors (other objects in same location as <looker>) 2119 2120 p - Player names prefixed by '*' 2121 y - Player names with or without a '*' prefix 2120 2122 z - English-style matching (my 2nd book) of <name> 2121 2123 * - All of the above (try a complete match) … … 2200 2202 function. 2201 2203 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() 2203 2212 & LPOS() 2204 2213 lpos(<string>, <character>) … … 2308 2317 in an object. You must be in the object or control it to use this 2309 2318 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. 2310 2325 & LWHO() 2311 2326 lwho() … … 2758 2773 2759 2774 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() 2760 2786 & NWHO() 2761 2787 nwho() … … 2804 2830 2805 2831 & OEMIT() 2832 & NSOEMIT() 2806 2833 oemit([<room>/]<object> [<object> ...],<message>) 2807 2834 nsoemit([<room>/]<object> [<object> ...],<message>) … … 2870 2897 In this case, you must control the object. 2871 2898 & PEMIT() 2899 & NSPEMIT() 2872 2900 pemit(<object list>,<message>) 2873 2901 nspemit(<object list>,<message>) … … 3049 3077 See also: regrab() 3050 3078 & REMIT() 3079 & NSREMIT() 3051 3080 remit(<object>, <message>) 3052 3081 nsremit(<object>, <message>) … … 4453 4482 4454 4483 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() 4455 4499 & XWHO() 4456 4500 & XMWHO() … … 4469 4513 See also: lwho(), mwho(), nwho() 4470 4514 & ZEMIT() 4515 & NSZEMIT() 4471 4516 zemit(<zone>, <message>) 4472 4517 nszemit(<zone>, <message>) 1.7.7/game/txt/hlp/pennv177.hlp
r469 r471 1 & 1.7.7p3 51 & 1.7.7p36 2 2 & changes 3 3 This is a list of changes in this patchlevel which are probably of … … 12 12 be read in 'help patchlevels'. 13 13 14 Version 1.7.7 patchlevel 36 August 9, 2004 15 16 Functions: 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. 23 Minor changes (user-visible): 24 * Mortals can no longer teleport HEAVY admin through exits. 25 Suggested by Ambrosia@M*U*S*H. 26 Minor 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. 30 Fixes: 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 14 50 Version 1.7.7 patchlevel 35 July 21, 2004 15 51 1.7.7/game/txt/hlp/pennvOLD.hlp
r469 r471 4419 4419 4420 4420 1.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 4422 4423 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 4423 4424 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 1.7.7/hdrs/conf.h
r469 r471 346 346 #define DBCK_INTERVAL (options.dbck_interval) 347 347 #define MAX_PARENTS (options.max_parents) 348 #define MAX_ZONES (30) 348 349 #define MAX_DEPTH (options.max_depth) 349 350 #define MAX_PENNIES (options.max_pennies) 1.7.7/hdrs/copyrite.h
r443 r471 14 14 * Copyright (c) 1994-2002, Jean Marie Diaz, Lydia Leong, and Devin Hooker. 15 15 * 16 * Some code used in this server may have been d irectivefrom TinyMUSH 2.0.16 * Some code used in this server may have been derived from TinyMUSH 2.0. 17 17 * Copyright (c) 1995, Joseph Traub, Glenn Crocker. 18 18 * 19 * Some code used in this server may have been d irectivefrom TinyMUD.19 * Some code used in this server may have been derived from TinyMUD. 20 20 * Copyright (c) 1995, David Applegate, James Aspnes, Timothy Freeman 21 21 * and Bennet Yee. … … 171 171 * Past and present PennMUSH development team members: 172 172 * T. Alexander Popiel, Ralph Melton, Thorvald Natvig, Luuk de Waard, 173 * Shawn Wagner 173 * Shawn Wagner, Ervin Hearn III 174 174 * Past and present PennMUSH porters: 175 175 * Nick Gammon, Sylvia, Dan Williams, Ervin Hearn III 1.7.7/hdrs/externs.h
r469 r471 448 448 extern int safe_ansi_string(ansi_string *as, size_t start, size_t len, 449 449 char *buff, char **bp); 450 extern int safe_ansi_string2(ansi_string *as, size_t start, size_t len, 451 char *buff, char **bp); 450 452 /* Append N copies of the character X to the end of a string */ 451 453 extern int safe_fill(char x, size_t n, char *buff, char **bp); 1.7.7/hdrs/match.h
r353 r471 20 20 #define MAT_POSSESSION 0x000200 21 21 #define MAT_EXIT 0x004000 22 #define MAT_PMATCH 0x008000 22 23 /* special things to match */ 23 24 #define MAT_CARRIED_EXIT 0x010000 1.7.7/hdrs/version.h
r469 r471 1 1 #define VERSION "1.7.7" 2 #define PATCHLEVEL "3 5"3 #define PATCHDATE "[0 7/21/2004]"4 #define NUMVERSION 00100700703 52 #define PATCHLEVEL "36" 3 #define PATCHDATE "[08/09/2004]" 4 #define NUMVERSION 001007007036 1.7.7/src/command.c
r469 r471 1377 1377 } 1378 1378 command = command_find(name); 1379 if (!command) { 1380 notify(player, T("No such command.")); 1381 return; 1382 } 1379 1383 if (command->func != cmd_unimplemented) { 1380 1384 notify(player, … … 1565 1569 command = (COMMAND_INFO *) ptab_nextentry(&ptab_command); 1566 1570 } 1571 1572 do_gensort((dbref) 0, (char **) ptrs, nptrs, ALPHANUM_LIST); 1567 1573 bp = buff; 1568 1574 safe_str(ptrs[0], buff, &bp); 1569 1575 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 } 1572 1582 } 1573 1583 *bp = '\0'; 1.7.7/src/destroy.c
r469 r471 1167 1167 { 1168 1168 dbref n, zone = NOTHING, tmp; 1169 int zone_depth; 1169 1170 1170 1171 for (n = 0; n < db_top; n++) { … … 1177 1178 continue; 1178 1179 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)) { 1180 1182 if (tmp == n) { 1181 1183 notify_format(Owner(n), 1.7.7/src/extmail.c
r469 r471 979 979 char sbuf[BUFFER_LEN]; 980 980 ATTR *a; 981 char *cp; 981 982 982 983 if (!IsPlayer(target)) { … … 1007 1008 newp->from = player; 1008 1009 newp->from_ctime = CreTime(player); 1010 1009 1011 /* 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); 1012 1015 else 1013 1016 strcpy(sbuf, T("(no subject)")); 1.7.7/src/funcrypt.c
r467 r471 36 36 37 37 38 static char *crunch_code _((char *code));39 static char *crypt_code _((char *code, char *text, int type));38 static char *crunch_code(char *code); 39 static char *crypt_code(char *code, char *text, int type); 40 40 41 41 #ifdef HAS_OPENSSL 42 42 static void safe_hexchar(unsigned char c, char *buff, char **bp); 43 43 #endif 44 45 static void safe_sha0(const char *text, size_t len, char *buff, char **bp); 44 46 45 47 /* Copy over only alphanumeric chars */ … … 107 109 } 108 110 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) 111 static void 112 safe_sha0(const char *text, size_t len, char *buff, char **bp) 130 113 { 131 114 #ifdef HAS_OPENSSL … … 133 116 int n; 134 117 135 SHA( args[0], arglens[0], hash);118 SHA(text, len, hash); 136 119 137 120 for (n = 0; n < SHA_DIGEST_LENGTH; n++) … … 141 124 shsInfo.reverse_wanted = (BYTE) options.reverse_shs; 142 125 shsInit(&shsInfo); 143 shsUpdate(&shsInfo, (const BYTE *) args[0], arglens[0]);126 shsUpdate(&shsInfo, (const BYTE *) text, len); 144 127 shsFinal(&shsInfo); 145 128 safe_format(buff, bp, "%0lx%0lx%0lx%0lx%0lx", shsInfo.digest[0], … … 149 132 } 150 133 134 FUNCTION(fun_encrypt) 135 { 136 safe_str(crypt_code(args[1], args[0], 1), buff, bp); 137 } 138 139 FUNCTION(fun_decrypt) 140 { 141 safe_str(crypt_code(args[1], args[0], 0), buff, bp); 142 } 143 144 FUNCTION(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 154 FUNCTION(fun_sha0) 155 { 156 safe_sha0(args[0], arglens[0], buff, bp); 157 } 158 151 159 FUNCTION(fun_digest) 152 160 { … … 172 180 #else 173 181 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); 182 183 } else { 183 184 safe_str(T("#-1 UNSUPPORTED DIGEST TYPE"), buff, bp); 1.7.7/src/function.c
r469 r471 348 348 {"LT", fun_lt, 2, 2, FN_REG}, 349 349 {"LTE", fun_lte, 2, 2, FN_REG}, 350 {"LTHINGS", fun_dbwalker, 1, 1, FN_REG}, 350 351 {"LVCON", fun_dbwalker, 1, 1, FN_REG}, 351 352 {"LVEXITS", fun_dbwalker, 1, 1, FN_REG}, 352 353 {"LVPLAYERS", fun_dbwalker, 1, 1, FN_REG}, 354 {"LVTHINGS", fun_dbwalker, 1, 1, FN_REG}, 353 355 {"LWHO", fun_lwho, 0, 0, FN_REG}, 354 356 {"MAIL", fun_mail, 0, 2, FN_REG}, … … 400 402 {"NSREMIT", fun_remit, 2, -2, FN_REG}, 401 403 {"NSZEMIT", fun_zemit, 2, -2, FN_REG}, 404 {"NTHINGS", fun_dbwalker, 1, 1, FN_REG}, 402 405 {"NUM", fun_num, 1, 1, FN_REG}, 403 406 {"NULL", fun_null, 1, INT_MAX, FN_REG}, … … 405 408 {"NVEXITS", fun_dbwalker, 1, 1, FN_REG}, 406 409 {"NVPLAYERS", fun_dbwalker, 1, 1, FN_REG}, 410 {"NVTHINGS", fun_dbwalker, 1, 1, FN_REG}, 407 411 {"NWHO", fun_nwho, 0, 0, FN_REG}, 408 412 {"OBJ", fun_obj, 1, 1, FN_REG}, … … 547 551 {"XGET", fun_xget, 2, 2, FN_REG}, 548 552 {"XOR", fun_xor, 2, INT_MAX, FN_REG}, 553 {"XTHINGS", fun_dbwalker, 3, 3, FN_REG}, 549 554 {"XVCON", fun_dbwalker, 3, 3, FN_REG}, 550 555 {"XVEXITS", fun_dbwalker, 3, 3, FN_REG}, 551 556 {"XVPLAYERS", fun_dbwalker, 3, 3, FN_REG}, 557 {"XVTHINGS", fun_dbwalker, 3, 3, FN_REG}, 552 558 {"XWHO", fun_xwho, 2, 2, FN_REG}, 553 559 {"ZEMIT", fun_zemit, 2, -2, FN_REG}, 1.7.7/src/fundb.c
r469 r471 125 125 return; 126 126 } 127 if (!Can_Examine(executor, thing)) {128 safe_str(T(e_perm), buff, bp);129 return;130 }131 127 132 128 doparent = strchr(called_as, 'P') ? 1 : 0; 133 129 134 if (!doparent && pattern == matchall ) {130 if (!doparent && pattern == matchall && Can_Examine(executor, thing)) { 135 131 safe_integer(AttrCount(thing), buff, bp); 136 132 } 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); 139 135 } 140 136 } … … 173 169 if (!GoodObject(thing)) { 174 170 safe_str(T(e_notvis), buff, bp); 175 return;176 }177 if (!Can_Examine(executor, thing)) {178 safe_str(T(e_perm), buff, bp);179 171 return; 180 172 } … … 183 175 lh.bp = bp; 184 176 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); 186 180 } 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); 188 183 } 189 184 } … … 628 623 int nthing; 629 624 dbref thing; 630 int validloc , validthing;625 int validloc; 631 626 dbref startdb; 632 627 … … 652 647 first = 1; 653 648 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); 670 670 } 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;679 671 } 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; 680 680 } 681 681 } else if (buff) … … 726 726 switch (*ptr) { 727 727 case 'C': /* con */ 728 type = TYPE_THING | TYPE_PLAYER; 729 break; 730 case 'T': /* things */ 728 731 type = TYPE_THING; 729 732 break; … … 736 739 default: 737 740 /* This should never be reached ... */ 738 type = TYPE_THING ;741 type = TYPE_THING | TYPE_PLAYER; 739 742 } 740 743 … … 1730 1733 match_flags |= MAT_NEIGHBOR; 1731 1734 break; 1735 case 'y': 1736 match_flags |= MAT_PMATCH; 1737 break; 1732 1738 case 'p': 1733 1739 match_flags |= MAT_PLAYER; … … 1777 1783 safe_dbref(NOTHING, buff, bp); 1778 1784 } 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))) 1780 1787 safe_dbref(item, buff, bp); 1781 1788 else 1.7.7/src/funlist.c
r469 r471 19 19 #include "pcre.h" 20 20 #include "match.h" 21 #include "command.h" 21 22 #include "attrib.h" 22 23 #include "dbdefs.h" … … 701 702 typedef void (*makerecord) (s_rec *, dbref player, char *sortflags); 702 703 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__))) 704 708 705 709 /** Sorting strings by different values. We store both the string and … … 780 784 const s_rec *sr1 = (const s_rec *) s1; 781 785 const s_rec *sr2 = (const s_rec *) s2; 782 intres = 0;786 NVAL res = 0; 783 787 res = sr1->numval - sr2->numval; 784 788 return Compare(res, sr1, sr2); … … 809 813 GENRECORD(gen_db_name) 810 814 { 811 rec->str = "";815 rec->str = (char *) ""; 812 816 if (RealGoodObject(rec->db)) 813 817 rec->str = (char *) Name(rec->db); … … 860 864 /* Eek, I hate dealing with memory issues. */ 861 865 862 static char *defstr = "";866 static char *defstr = (char *) ""; 863 867 const char *ptr; 864 868 … … 1028 1032 i++) ; 1029 1033 } 1030 // FIXME1031 1034 s1.freestr = s2.freestr = 0; 1032 1035 if (ltypelist[i].isdbs) { … … 1086 1089 sorti++) ; 1087 1090 } 1088 // FIXME1089 1091 sp = (s_rec *) mush_malloc(n * sizeof(s_rec), "do_gensort"); 1090 1092 for (i = 0; i < n; i++) { … … 2852 2854 2853 2855 /* string, regexp, replacement string. Acts like sed or perl's s///g, 2854 //with an ig version */2856 * with an ig version */ 2855 2857 int re_subpatterns = -1; /**< Number of subpatterns in regexp */ 2856 2858 int *re_offsets; /**< Array of offsets to subpatterns */ 1.7.7/src/funstr.c
r469 r471 47 47 int linenum, char *fieldsep, int fslen, char *linesep, 48 48 int lslen, char filler); 49 static int comp_gencomp(dbref executor, char *left, char *right, char *type); 49 50 void init_tag_hashtab(void); 50 51 void init_pronouns(void); … … 461 462 } 462 463 464 static int 465 comp_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 463 472 /* ARGSUSED */ 464 473 FUNCTION(fun_comp) … … 482 491 r = remove_markup(args[1], &rlen); 483 492 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); 485 495 return; 486 496 } … … 493 503 r = remove_markup(args[1], &rlen); 494 504 memcpy(right, r, rlen); 495 safe_integer( gencomp(executor, left, right, INSENS_ALPHANUM_LIST), buff,496 b p);505 safe_integer(comp_gencomp(executor, left, right, INSENS_ALPHANUM_LIST), 506 buff, bp); 497 507 return; 498 508 } … … 502 512 return; 503 513 } 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); 505 516 return; 506 517 case 'F': … … 509 520 return; 510 521 } 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); 512 524 return; 513 525 case 'D': … … 520 532 return; 521 533 } 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); 523 536 return; 524 537 } … … 1790 1803 if (ansilen < 0) { 1791 1804 /* 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); 1793 1806 safe_chr('-', buff, bp); 1794 1807 pstr += ansiwidth - 1; /* move to start of next line */ 1795 1808 } else { 1796 1809 /* normal line */ 1797 safe_ansi_string (as, pstr - as->text, ansilen, buff, bp);1810 safe_ansi_string2(as, pstr - as->text, ansilen, buff, bp); 1798 1811 if (pstr[ansilen] == '\r') 1799 1812 ++ansilen; … … 1858 1871 if (!*ptr) { 1859 1872 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); 1861 1874 } 1862 1875 ptrs[i] = ptr; … … 1865 1878 len = (tptr - ptrs[i]) + 1; 1866 1879 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); 1868 1881 } 1869 1882 ptrs[i] = ptr + 1; … … 1875 1888 len = (tptr - ptrs[i]) + 1; 1876 1889 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); 1878 1891 } 1879 1892 ptrs[i] = lastspace; 1880 1893 } else { 1881 1894 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); 1883 1896 } 1884 1897 ptrs[i] = ptr; 1.7.7/src/match.c
r461 r471 65 65 #define match_absolute(name) parse_objid(name) 66 66 static dbref match_player(const dbref matcher, const char *match_name); 67 static dbref match_pmatch(const dbref matcher, const char *match_name); 67 68 static dbref choose_thing(const dbref match_who, const int preferred_type, 68 69 long int flags, dbref thing1, dbref thing2); … … 342 343 return match; 343 344 } 345 if (flags & MAT_PMATCH) { 346 match = match_pmatch(who, name); 347 if (GoodObject(match)) 348 return match; 349 } 344 350 } else { 345 351 /* We're doing a nearby match and the player doesn't have … … 485 491 return NOTHING; 486 492 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 500 static dbref 501 match_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++) ; 487 507 /* If lookup_player fails, try a partial match on connected 488 508 * players, 2.0 style. That can return match, NOTHING, AMBIGUOUS 1.7.7/src/move.c
r469 r471 443 443 /* Move the followers if the leader is elsewhere */ 444 444 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)); 446 446 break; 447 447 case TYPE_PLAYER: … … 459 459 /* Move the followers if the leader is elsewhere */ 460 460 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)); 462 462 break; 463 463 case TYPE_EXIT: 1.7.7/src/set.c
r469 r471 326 326 Owner(thing) = Owner(newowner); 327 327 } 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
