Changeset 513
- Timestamp:
- 08/16/06 02:52:05 (2 years ago)
- Files:
-
- 1.8.1/CHANGES.181 (modified) (1 diff)
- 1.8.1/Patchlevel (modified) (1 diff)
- 1.8.1/game/txt/hlp/pennv181.hlp (modified) (2 diffs)
- 1.8.1/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.8.1/hdrs/version.h (modified) (1 diff)
- 1.8.1/src/atr_tab.c (modified) (4 diffs)
- 1.8.1/src/attrib.c (modified) (6 diffs)
- 1.8.1/src/db.c (modified) (2 diffs)
- 1.8.1/src/fundb.c (modified) (3 diffs)
- 1.8.1/src/look.c (modified) (4 diffs)
- 1.8.1/src/predicat.c (modified) (2 diffs)
- 1.8.1/src/privtab.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.1/CHANGES.181
r511 r513 12 12 13 13 ========================================================================== 14 15 Version 1.8.1 patchlevel 1 June 27, 2005 16 17 Fixes: 18 * Players could set the 'internal' attribute flag, which causes 19 confusion. Report by Cooee@PDX. 20 * Setting attribute flags by character alias did not work 21 properly. 22 14 23 15 24 Version 1.8.1 patchlevel 0 June 25, 2005 1.8.1/Patchlevel
r511 r513 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.8.1p 02 This is PennMUSH 1.8.1p1 1.8.1/game/txt/hlp/pennv181.hlp
r511 r513 1 & 1.8.1p 01 & 1.8.1p1 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.8.1 patchlevel 1 June 27, 2005 15 16 Fixes: 17 * Players could set the 'internal' attribute flag, which causes 18 confusion. Report by Cooee@PDX. 19 * Setting attribute flags by character alias did not work 20 properly. 21 22 23 & 1.8.1p0 14 24 Version 1.8.1 patchlevel 0 June 25, 2005 15 25 1.8.1/game/txt/hlp/pennvOLD.hlp
r511 r513 4418 4418 type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 4419 4419 4420 1.8.1: 0 4420 1.8.1: 0, 1 4421 4421 1.8.0: 0, 1, 2, 3, 4, 5, 6 4422 4422 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1.8.1/hdrs/version.h
r511 r513 1 1 #define VERSION "1.8.1" 2 #define PATCHLEVEL " 0"3 #define PATCHDATE "[06/2 5/2005]"4 #define NUMVERSION 100800100 02 #define PATCHLEVEL "1" 3 #define PATCHDATE "[06/27/2005]" 4 #define NUMVERSION 1008001001 1.8.1/src/atr_tab.c
r511 r513 35 35 PTAB ptab_attrib; 36 36 37 /** Attribute flags */ 38 PRIV attr_privs[] = { 37 /** Attribute flags for setting */ 38 PRIV attr_privs_set[] = { 39 {"no_command", '$', AF_NOPROG, AF_NOPROG}, 40 {"no_inherit", 'i', AF_PRIVATE, AF_PRIVATE}, 41 {"private", 'i', AF_PRIVATE, AF_PRIVATE}, 42 {"no_clone", 'c', AF_NOCOPY, AF_NOCOPY}, 43 {"wizard", 'w', AF_WIZARD, AF_WIZARD}, 44 {"visual", 'v', AF_VISUAL, AF_VISUAL}, 45 {"mortal_dark", 'm', AF_MDARK, AF_MDARK}, 46 {"hidden", 'm', AF_MDARK, AF_MDARK}, 47 {"regexp", 'R', AF_REGEXP, AF_REGEXP}, 48 {"case", 'C', AF_CASE, AF_CASE}, 49 {"locked", '+', AF_LOCKED, AF_LOCKED}, 50 {"safe", 'S', AF_SAFE, AF_SAFE}, 51 {"prefixmatch", '\0', AF_PREFIXMATCH, AF_PREFIXMATCH}, 52 {"veiled", 'V', AF_VEILED, AF_VEILED}, 53 {"debug", 'b', AF_DEBUG, AF_DEBUG}, 54 {"public", 'p', AF_PUBLIC, AF_PUBLIC}, 55 {"nearby", 'n', AF_NEARBY, AF_NEARBY}, 56 {"noname", 'N', AF_NONAME, AF_NONAME}, 57 {"nospace", 's', AF_NOSPACE, AF_NOSPACE}, 58 {NULL, '\0', 0, 0} 59 }; 60 61 /** Attribute flags for viewing */ 62 PRIV attr_privs_view[] = { 39 63 {"no_command", '$', AF_NOPROG, AF_NOPROG}, 40 64 {"no_inherit", 'i', AF_PRIVATE, AF_PRIVATE}, … … 158 182 } 159 183 if (strcasecmp(perms, "none")) { 160 flags = string_to_privs(attr_privs , perms, 0);184 flags = string_to_privs(attr_privs_set, perms, 0); 161 185 if (!flags) { 162 186 notify(player, T("I don't understand those permissions.")); … … 213 237 214 238 notify_format(player, T("%s -- Attribute permissions now: %s"), name, 215 privs_to_string(attr_privs , flags));239 privs_to_string(attr_privs_view, flags)); 216 240 } 217 241 … … 326 350 notify_format(player, "Attribute: %s", AL_NAME(ap)); 327 351 notify_format(player, 328 " Flags: %s", privs_to_string(attr_privs, AL_FLAGS(ap))); 352 " Flags: %s", privs_to_string(attr_privs_view, 353 AL_FLAGS(ap))); 329 354 notify_format(player, " Creator: %s", unparse_dbref(AL_CREATOR(ap))); 330 355 return; 1.8.1/src/attrib.c
r511 r513 37 37 StrTree atr_names; 38 38 /** Table of attribute flags. */ 39 extern PRIV attr_privs[]; 39 extern PRIV attr_privs_set[]; 40 extern PRIV attr_privs_view[]; 40 41 41 42 /** A flag to show if we're in the middle of a @wipe (this changes … … 205 206 { 206 207 int f; 207 f = string_to_privs(attr_privs , p, 0);208 f = string_to_privs(attr_privs_set, p, 0); 208 209 if (!f) 209 210 return -1; … … 212 213 if (!See_All(player) && (f & AF_WIZARD)) 213 214 return -1; 215 f &= ~AF_INTERNAL; 214 216 return f; 215 217 } … … 230 232 int f; 231 233 *setbits = *clrbits = 0; 232 f = string_to_privsets(attr_privs , p, setbits, clrbits);234 f = string_to_privsets(attr_privs_set, p, setbits, clrbits); 233 235 if (f <= 0) 234 236 return -1; … … 237 239 if (!See_All(player) && ((*setbits & AF_WIZARD) || (*clrbits & AF_WIZARD))) 238 240 return -1; 241 f &= ~AF_INTERNAL; 239 242 return *setbits; 240 243 } … … 248 251 atrflag_to_string(int mask) 249 252 { 250 return privs_to_string(attr_privs , mask);253 return privs_to_string(attr_privs_view, mask); 251 254 } 252 255 1.8.1/src/db.c
r511 r513 1188 1188 } 1189 1189 1190 extern PRIV attr_privs [];1190 extern PRIV attr_privs_view[]; 1191 1191 1192 1192 /** Read an attribute list for an object from a file … … 1212 1212 db_read_this_labeled_dbref(f, "owner", &owner); 1213 1213 db_read_this_labeled_string(f, "flags", &tmp); 1214 flags = string_to_privs(attr_privs , tmp, 0);1214 flags = string_to_privs(attr_privs_view, tmp, 0); 1215 1215 db_read_this_labeled_number(f, "derefs", &derefs); 1216 1216 db_read_this_labeled_string(f, "value", &tmp); 1.8.1/src/fundb.c
r511 r513 32 32 #endif 33 33 34 extern PRIV attr_privs [];34 extern PRIV attr_privs_view[]; 35 35 static lock_type get_locktype(char *str); 36 36 extern struct db_stat_info *get_stats(dbref owner); … … 469 469 return; 470 470 } 471 safe_str(privs_to_letters(attr_privs , AL_FLAGS(a)), buff, bp);471 safe_str(privs_to_letters(attr_privs_view, AL_FLAGS(a)), buff, bp); 472 472 if (atr_sub_branch(a)) 473 473 safe_chr('`', buff, bp); … … 502 502 return; 503 503 } 504 safe_str(privs_to_string(attr_privs , AL_FLAGS(a)), buff, bp);504 safe_str(privs_to_string(attr_privs_view, AL_FLAGS(a)), buff, bp); 505 505 } else { 506 506 /* Object flags, visible to all */ 1.8.1/src/look.c
r511 r513 52 52 static char *parent_chain(dbref player, dbref thing); 53 53 54 extern PRIV attr_privs [];54 extern PRIV attr_privs_view[]; 55 55 56 56 static void … … 317 317 if (parent == thing || !GoodObject(parent)) 318 318 parent = NOTHING; 319 strcpy(fbuf, privs_to_letters(attr_privs , AL_FLAGS(atr)));319 strcpy(fbuf, privs_to_letters(attr_privs_view, AL_FLAGS(atr))); 320 320 if (atr_sub_branch(atr)) 321 321 strcat(fbuf, "`"); … … 379 379 if (parent == thing || !GoodObject(parent)) 380 380 parent = NOTHING; 381 strcpy(fbuf, privs_to_letters(attr_privs , AL_FLAGS(atr)));381 strcpy(fbuf, privs_to_letters(attr_privs_view, AL_FLAGS(atr))); 382 382 if (atr_sub_branch(atr)) 383 383 strcat(fbuf, "`"); … … 1479 1479 int npmflags = AL_FLAGS(ptr) & (~AF_PREFIXMATCH); 1480 1480 if (AL_FLAGS(atr) != AL_FLAGS(ptr) && AL_FLAGS(atr) != npmflags) 1481 privs = privs_to_string(attr_privs , AL_FLAGS(atr));1481 privs = privs_to_string(attr_privs_view, AL_FLAGS(atr)); 1482 1482 } else { 1483 privs = privs_to_string(attr_privs , AL_FLAGS(atr));1483 privs = privs_to_string(attr_privs_view, AL_FLAGS(atr)); 1484 1484 } 1485 1485 if (privs && *privs) 1.8.1/src/predicat.c
r511 r513 48 48 void do_grep(dbref player, char *obj, char *lookfor, int flag, int insensitive); 49 49 static int pay_quota(dbref, int); 50 extern PRIV attr_privs [];50 extern PRIV attr_privs_view[]; 51 51 52 52 /** A generic function to generate a formatted string. The … … 1344 1344 ANSI_HILITE, AL_NAME(atr), 1345 1345 Owner(AL_CREATOR(atr)), 1346 privs_to_letters(attr_privs , AL_FLAGS(atr)),1346 privs_to_letters(attr_privs_view, AL_FLAGS(atr)), 1347 1347 ANSI_NORMAL, tbuf1); 1348 1348 return found; 1.8.1/src/privtab.c
r511 r513 35 35 long int yes = 0; 36 36 long int no = 0; 37 long int ltr = 0; 37 38 char *p, *r; 38 39 char tbuf1[BUFFER_LEN]; … … 52 53 continue; 53 54 } 54 for (c = table; c->name; c++) { 55 if (string_prefix(c->name, p)) { 56 if (not) 57 no |= c->bits_to_set; 58 else 59 yes |= c->bits_to_set; 60 break; 55 ltr = 0; 56 if (strlen(p) == 1) { 57 /* One-letter string is treated as a character if possible */ 58 ltr = letter_to_privs(table, p, 0); 59 if (not) 60 no |= ltr; 61 else 62 yes |= ltr; 63 } 64 /* If we didn't handle a one-char string as a character, 65 * or if the string is longer than one char, use prefix-matching 66 */ 67 if (!ltr) { 68 for (c = table; c->name; c++) { 69 if (string_prefix(c->name, p)) { 70 if (not) 71 no |= c->bits_to_set; 72 else 73 yes |= c->bits_to_set; 74 break; 75 } 61 76 } 62 77 } … … 86 101 char tbuf1[BUFFER_LEN]; 87 102 int not; 103 long int ltr; 88 104 int words = 0; 89 105 int err = 0; … … 105 121 } 106 122 } 107 for (c = table; c->name; c++) { 108 if (string_prefix(c->name, p)) { 109 found++; 110 if (not) 111 *clrprivs |= c->bits_to_set; 112 else 113 *setprivs |= c->bits_to_set; 114 break; 123 ltr = 0; 124 if (strlen(p) == 1) { 125 /* One-letter string is treated as a character if possible */ 126 ltr = letter_to_privs(table, p, 0); 127 if (not) 128 *clrprivs |= ltr; 129 else 130 *setprivs |= ltr; 131 } 132 if (ltr) { 133 found++; 134 } else { 135 for (c = table; c->name; c++) { 136 if (string_prefix(c->name, p)) { 137 found++; 138 if (not) 139 *clrprivs |= c->bits_to_set; 140 else 141 *setprivs |= c->bits_to_set; 142 break; 143 } 115 144 } 116 145 }
