Changeset 497
- Timestamp:
- 08/16/06 02:26:59 (2 years ago)
- Files:
-
- 1.8.0/CHANGES.180 (modified) (1 diff)
- 1.8.0/Patchlevel (modified) (1 diff)
- 1.8.0/README.SQL (modified) (1 diff)
- 1.8.0/game/README (modified) (1 diff)
- 1.8.0/game/restart (modified) (7 diffs)
- 1.8.0/game/txt/hlp/penncmd.hlp (modified) (1 diff)
- 1.8.0/game/txt/hlp/pennfunc.hlp (modified) (3 diffs)
- 1.8.0/game/txt/hlp/penntop.hlp (modified) (4 diffs)
- 1.8.0/game/txt/hlp/pennv180.hlp (modified) (2 diffs)
- 1.8.0/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.8.0/hdrs/version.h (modified) (1 diff)
- 1.8.0/src/attrib.c (modified) (1 diff)
- 1.8.0/src/conf.c (modified) (6 diffs)
- 1.8.0/src/create.c (modified) (3 diffs)
- 1.8.0/src/filecopy.c (modified) (2 diffs)
- 1.8.0/src/flags.c (modified) (1 diff)
- 1.8.0/src/fundb.c (modified) (2 diffs)
- 1.8.0/src/funmath.c (modified) (8 diffs)
- 1.8.0/src/lock.c (modified) (1 diff)
- 1.8.0/src/set.c (modified) (1 diff)
- 1.8.0/src/sql.c (modified) (1 diff)
- 1.8.0/src/wiz.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.0/CHANGES.180
r495 r497 12 12 13 13 ========================================================================== 14 15 Version 1.8.0 patchlevel 7 August 29, 2005 16 17 Fixes: 18 * lsearch() with no results no longer returns #-1. It still does so when 19 there's an error. Suggested by Nathan Baum. [SW] 20 * Improved messages for @link of exits. Report by Nathan Baum. [SW] 21 * Restart script more portable to older bourne-like shells. 22 Patch by Walker@M*U*S*H. 23 * Fix to MinGW reboot. Patch by Nathan Baum. 24 * Help fixes by Tyr@M*U*S*H, Talvo@M*U*S*H, Dizzy@Forgotten Time, 25 and Trinsec@M*U*S*H. 26 * @flag/add of a flag with a name that is a unique prefix of an existing 27 flag wouldn't add the new flag. Reported by Mike Griffiths. [SW] 28 * @config/set of an invalid option would still return a success message. 29 Report by Sholevi@M*U*S*H. [SW] 30 * sql() without a field delimiter defaulted to using the row delimiter, 31 instead of a space. Report by Kali@M*U*S*H. 32 * lock() didn't set user-defined locks properly. Report by 33 Dahan@M*U*S*H. [SW] 34 * Infinite loop in fraction() fixed. 35 * FIXED players may no longer teleport through exits. Report by 36 Anyasha@bDv2 37 * Better messages when attempting to wipe SAFE attributes. 38 Suggested by Nathan Baum. 39 14 40 15 41 Version 1.8.0 patchlevel 6 June 24, 2005 1.8.0/Patchlevel
r495 r497 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.8.0p 62 This is PennMUSH 1.8.0p7 1.8.0/README.SQL
r469 r497 17 17 III. SQL setup tips 18 18 19 I. Compiling with iMySQL19 I. Compiling with MySQL 20 20 21 21 The Configure script distributed with PennMUSH automatically detects 1.8.0/game/README
r469 r497 42 42 in mush.cnf) every time, since errors and other important messages get 43 43 printed to that logfile. 44 45 After your first startup, it's a good idea to make some small 46 change to the database (e.g., @create an object) and then 47 do an @shutdown. Restart the game again and ensure that your 48 object is still present - this verifies that the server is 49 successfully dumping. 44 50 45 51 ============================================================================ 1.8.0/game/restart
r463 r497 37 37 ####################################################################### 38 38 39 if [ -z $GAMEDIR]; then39 if [ -z "$GAMEDIR" ]; then 40 40 echo "You must set GAMEDIR in the restart script." 41 41 exit 1 42 42 fi 43 43 44 if [ ! -d $GAMEDIR]; then44 if [ ! -d "$GAMEDIR" ]; then 45 45 echo "GAMEDIR doesn't appear to be a directory. It's: $GAMEDIR" 46 46 exit 1 … … 50 50 echo Running from `pwd` 51 51 52 if [ ! -f $CONF_FILE]; then52 if [ ! -f "$CONF_FILE" ]; then 53 53 echo "CONF_FILE doesn't exist. It's: $CONF_FILE" 54 54 echo "Create $CONF_FILE from $GAMEDIR/mushcnf.dst" … … 76 76 egrep -s "^compress_program[ ]*[A-Za-z0-9]" $CONF_FILE 77 77 nocompress=$? 78 if [ $nocompress-eq 0 ]; then78 if [ "$nocompress" -eq 0 ]; then 79 79 COMPRESSOR=`egrep "^compress_program" $CONF_FILE | sed "s/[^ ]*[ ]*\(.*\)/\1/"` 80 80 SUFFIX=`egrep "^compress_suffix" $CONF_FILE | sed "s/[^ ]*[ ]*\(.*\)/\1/"` … … 89 89 90 90 91 if [ $mush-gt 0 ]; then91 if [ "$mush" -gt 0 ]; then 92 92 echo Mush already active or some other process is using $GAMEDIR/$CONF_FILE. 93 93 exit 0 … … 99 99 echo Restarting Mush. 100 100 101 if [ -r $PANICDIR/$PANICDB]; then101 if [ -r "$PANICDIR/$PANICDB" ]; then 102 102 end="`tail -1 $PANICDIR/$PANICDB`" 103 103 if [ "$end" = "***END OF DUMP***" ]; then … … 114 114 rm -f log/*.log 115 115 116 if [ -r data/$OUTDB$SUFFIX]; then116 if [ -r "data/$OUTDB$SUFFIX" ]; then 117 117 rm -f save/$INDB$SUFFIX.old 118 118 mv -f data/$INDB$SUFFIX save/$INDB$SUFFIX.old … … 120 120 else 121 121 echo "No $OUTDB$SUFFIX found." 122 if [ -r data/$INDB$SUFFIX]; then122 if [ -r "data/$INDB$SUFFIX" ]; then 123 123 echo "Using $INDB$SUFFIX." 124 124 else 125 125 echo "No $INDB$SUFFIX found." 126 if [ -r save/$INDB$SUFFIX.old]; then126 if [ -r "save/$INDB$SUFFIX.old" ]; then 127 127 echo "Using save/$INDB$SUFFIX.old." 128 128 cp save/$INDB$SUFFIX.old data/$INDB$SUFFIX 1.8.0/game/txt/hlp/penncmd.hlp
r487 r497 611 611 are parsed by default, but you can call foo/noeval. Note: the $-command 612 612 needs to make allowances for the /noeval switch in it's matching. 613 614 Commands added with @command/add, like other standard commands, 615 are never case-sensitive (regardless of CASE flag on the attribute). 613 616 614 617 (examples in help @command3) 1.8.0/game/txt/hlp/pennfunc.hlp
r493 r497 2329 2329 lvthings(<object>) 2330 2330 2331 This function returns the dbrefs of all connected and non-dark things 2332 inside an object. You must be in the object or control it to use this 2333 function. 2331 This function returns the dbrefs of all non-dark things inside an 2332 object. You must be in the object or control it to use this function. 2334 2333 & LWHO() 2335 2334 lwho() … … 2942 2941 pmatch(<string>) 2943 2942 2944 Given the partial name of a player, itreturns that player's dbref2943 Given the partial name of a connected player, returns that player's dbref 2945 2944 number. This partial name completion works similarly to the partial 2946 2945 name completion of the "page" command - i.e. it first attempts to match 2947 the normal names of all players (connected or not), and if that fails,2946 the full names of all players (connected or not), and if that fails, 2948 2947 it tries to match the partial names of connected players visible to 2949 2948 the enactor. If no player is matched, it returns "#-1". If more than … … 3594 3593 3595 3594 &SEL_GETID obj = SELECT id FROM mytable WHERE name = '[sqlescape(%0)]' 3596 &DOIT obj = $do *: ... [setq(0, u(SEL_GETID,%0))] ...3595 &DOIT obj = $do *: ... [setq(0,sql(u(SEL_GETID,%0),~,|))] ... 3597 3596 3598 3597 See also: sqlescape(), @sql 1.8.0/game/txt/hlp/penntop.hlp
r493 r497 1186 1186 pattern, and match the corresponding characters in the subject. 1187 1187 1188 There are two different sets of meta-characters: those that are1188 There are two different sets of meta-characters: those that are 1189 1189 recognized anywhere in the pattern except within square brackets, 1190 1190 and those that are recognized in square brackets. Outside square … … 1231 1231 (Cont'd in help regexp syntax4) 1232 1232 & regexp syntax4 1233 A backlash can also two useful assertions -- conditions that1233 A backlash can also be used for two useful assertions -- conditions that 1234 1234 must be met at a particular point in a match: 1235 1235 … … 1517 1517 Nonstandard attributes are set using &<attrib> <obj>=<value> 1518 1518 Attributes may also be set using @set <obj>=<attrib>:<value> 1519 or the set() function. 1519 1520 1520 1521 Attributes are cleared using @<attrib> <obj> or &<attrib> <obj> 1521 or with @wipe. 1522 1523 Note that there is a difference between clearing an attribute 1524 and setting an attribute to a null value: 1522 or with @wipe or wipe(). 1523 1524 Note that if the empty_attrs configuration option is set 1525 (@config empty_attrs to check), there is a difference between 1526 clearing an attribute and setting an attribute to a null value: 1525 1527 @va me <--- wipes out my VA attribute 1526 1528 @va me= <--- sets my VA attribute to be empty … … 1529 1531 are gone forever. 1530 1532 1531 See also ATTRIBUTES, NON-STANDARD ATTRIBUTES, @set, @wipe 1533 See also ATTRIBUTES, NON-STANDARD ATTRIBUTES, @set, @wipe, set(), wipe() 1532 1534 & SPOOFING 1533 1535 Spoofing is the act of making other characters think that a person 1.8.0/game/txt/hlp/pennv180.hlp
r495 r497 1 & 1.8.0p 61 & 1.8.0p7 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.0 patchlevel 7 August 29, 2005 15 16 Fixes: 17 * lsearch() with no results no longer returns #-1. It still does so when 18 there's an error. Suggested by Nathan Baum. [SW] 19 * Improved messages for @link of exits. Report by Nathan Baum. [SW] 20 * Restart script more portable to older bourne-like shells. 21 Patch by Walker@M*U*S*H. 22 * Fix to MinGW reboot. Patch by Nathan Baum. 23 * Help fixes by Tyr@M*U*S*H, Talvo@M*U*S*H, Dizzy@Forgotten Time, 24 and Trinsec@M*U*S*H. 25 * @flag/add of a flag with a name that is a unique prefix of an existing 26 flag wouldn't add the new flag. Reported by Mike Griffiths. [SW] 27 * @config/set of an invalid option would still return a success message. 28 Report by Sholevi@M*U*S*H. [SW] 29 * sql() without a field delimiter defaulted to using the row delimiter, 30 instead of a space. Report by Kali@M*U*S*H. 31 * lock() didn't set user-defined locks properly. Report by 32 Dahan@M*U*S*H. [SW] 33 * Infinite loop in fraction() fixed. 34 * FIXED players may no longer teleport through exits. Report by 35 Anyasha@bDv2 36 * Better messages when attempting to wipe SAFE attributes. 37 Suggested by Nathan Baum. 38 39 40 & 1.8.0p6 14 41 Version 1.8.0 patchlevel 6 June 24, 2005 15 42 1.8.0/game/txt/hlp/pennvOLD.hlp
r495 r497 4418 4418 type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 4419 4419 4420 1.8.0: 0, 1, 2, 3, 4, 5, 6 4420 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7 4421 4421 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 4422 4422 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 1.8.0/hdrs/version.h
r495 r497 1 1 #define VERSION "1.8.0" 2 #define PATCHLEVEL " 6"3 #define PATCHDATE "[0 6/24/2005]"4 #define NUMVERSION 100800000 62 #define PATCHLEVEL "7" 3 #define PATCHDATE "[08/29/2005]" 4 #define NUMVERSION 1008000007 1.8.0/src/attrib.c
r479 r497 1555 1555 : atr_clr(thing, name, player); 1556 1556 if (res == AE_SAFE) { 1557 notify(player, T("That attribute is SAFE. Set it !SAFE to modify it.")); 1557 notify_format(player, T("Attribute %s is SAFE. Set it !SAFE to modify it."), 1558 name); 1558 1559 return 0; 1559 1560 } else if (res == AE_BADNAME) { 1.8.0/src/conf.c
r493 r497 830 830 if (!strcasecmp(opt, "restrict_command")) { 831 831 if (!restrictions) 832 return 1;832 return 0; 833 833 for (p = val; *p && !isspace((unsigned char) *p); p++) ; 834 834 if (*p) { … … 853 853 } else if (!strcasecmp(opt, "restrict_function")) { 854 854 if (!restrictions) 855 return 1;855 return 0; 856 856 for (p = val; *p && !isspace((unsigned char) *p); p++) ; 857 857 if (*p) { … … 877 877 } else if (!strcasecmp(opt, "reserve_alias")) { 878 878 if (!restrictions) 879 return 1;879 return 0; 880 880 reserve_alias(val); 881 881 return 1; 882 882 } else if (!strcasecmp(opt, "command_alias")) { 883 883 if (!restrictions) 884 return 1;884 return 0; 885 885 for (p = val; *p && !isspace((unsigned char) *p); p++) ; 886 886 if (*p) { … … 902 902 } else if (!strcasecmp(opt, "attribute_alias")) { 903 903 if (!restrictions) 904 return 1;904 return 0; 905 905 for (p = val; *p && !isspace((unsigned char) *p); p++) ; 906 906 if (*p) { … … 922 922 } else if (!strcasecmp(opt, "function_alias")) { 923 923 if (!restrictions) 924 return 1;924 return 0; 925 925 for (p = val; *p && !isspace((unsigned char) *p); p++) ; 926 926 if (*p) { … … 945 945 int admin = !strcasecmp(opt, "ahelp_command"); 946 946 if (!restrictions) 947 return 1;947 return 0; 948 948 /* Add a new help-like command */ 949 949 if (source == 1) 1.8.0/src/create.c
r469 r497 183 183 do_unlink(dbref player, const char *name) 184 184 { 185 dbref exit_l ;185 dbref exit_l, old_loc; 186 186 long match_flags = MAT_EXIT | MAT_HERE | MAT_ABSOLUTE; 187 187 … … 202 202 switch (Typeof(exit_l)) { 203 203 case TYPE_EXIT: 204 old_loc = Location(exit_l); 204 205 Location(exit_l) = NOTHING; 205 notify_format(player, T("Unlinked exit #%d."), exit_l); 206 notify_format(player, T("Unlinked exit #%d (Used to lead to %s)."), 207 exit_l, unparse_object(player, old_loc)); 206 208 break; 207 209 case TYPE_ROOM: … … 305 307 306 308 /* notify the player */ 307 notify_format(player, T("Linked exit #%d to #%d"), thing, room); 309 notify_format(player, T("Linked exit #%d to %s"), thing, 310 unparse_object(player, room)); 308 311 break; 309 312 case TYPE_PLAYER: 1.8.0/src/filecopy.c
r473 r497 25 25 #include "log.h" 26 26 #include "confmagic.h" 27 28 extern char confname[BUFFER_LEN]; /* From bsd.c */ 27 29 28 30 #ifdef WIN32 … … 208 210 if (CopyFile("pennmush.exe", "pennmush_run.exe", FALSE)) { 209 211 do_rawlog(LT_ERR, "Successfully copied executable, starting copy."); 212 #ifdef WIN32SERVICES 210 213 execl("pennmush_run.exe", "pennmush_run.exe", "/run", NULL); 214 #else 215 execl("pennmush_run.exe", "pennmush_run.exe", confname, NULL); 216 #endif 211 217 } 212 218 } 1.8.0/src/flags.c
r479 r497 1887 1887 Flagspace_Lookup(n, ns); 1888 1888 /* Don't double-add */ 1889 if ((f = match_flag_ns(n, strupper(name)))) 1890 return f; 1889 if ((f = match_flag_ns(n, strupper(name)))) { 1890 if (strcasecmp(f->name, name) == 0) 1891 return f; 1892 } 1891 1893 f = new_flag(); 1892 1894 f->name = mush_strdup(strupper(name), "flag name"); 1.8.0/src/fundb.c
r493 r497 1228 1228 { 1229 1229 dbref it; 1230 char *p; 1231 lock_type ltype; 1232 1233 if ((p = strchr(args[0], '/'))) 1234 *p++ = '\0'; 1230 char *ltype = NULL; 1231 lock_type real_ltype; 1232 1233 if ((ltype = strchr(args[0], '/'))) { 1234 *ltype++ = '\0'; 1235 upcasestr(ltype); 1236 } 1237 1238 real_ltype = get_locktype(ltype); 1235 1239 1236 1240 it = match_thing(executor, args[0]); 1237 ltype = get_locktype(p);1238 1241 1239 1242 if (nargs == 2) { … … 1249 1252 } 1250 1253 } 1251 if (GoodObject(it) && (ltype != NULL) 1252 && Can_Read_Lock(executor, it, ltype)) { 1253 safe_str(unparse_boolexp(executor, getlock(it, ltype), UB_DBREF), buff, bp); 1254 if (GoodObject(it) && (real_ltype != NULL) 1255 && Can_Read_Lock(executor, it, real_ltype)) { 1256 safe_str(unparse_boolexp(executor, getlock(it, real_ltype), UB_DBREF), 1257 buff, bp); 1254 1258 return; 1255 1259 } 1.8.0/src/funmath.c
r493 r497 51 51 static NVAL angle_to_rad(NVAL angle, const char *from); 52 52 static NVAL rad_to_angle(NVAL angle, const char *to); 53 static double frac(double v, int *RESTRICT n, int *RESTRICT d, double error); 53 static double frac(double v, double *RESTRICT n, double *RESTRICT d, 54 double error); 54 55 void init_math_hashtab(void); 55 56 … … 1146 1147 */ 1147 1148 static double 1148 frac(double v, int *RESTRICT n, int*RESTRICT d, double error)1149 frac(double v, double *RESTRICT n, double *RESTRICT d, double error) 1149 1150 { 1150 1151 … … 1165 1166 1166 1167 1167 intD, N, t;1168 double D, N, t; 1168 1169 int first = 1; 1169 1170 double epsilon, r = 0.0, m; … … 1172 1173 return -1.0; 1173 1174 *d = D = 1; 1174 *n = (int) v;1175 *n = floor(v); 1175 1176 N = *n + 1; 1176 1177 … … 1179 1180 if (r <= 1.0) 1180 1181 r = 1.0 / r; 1181 N += *n * (int) r;1182 D += *d * (int) r;1182 N += *n * floor(r); 1183 D += *d * floor(r); 1183 1184 *n += N; 1184 1185 *d += D; … … 1204 1205 m *= 10.0; 1205 1206 } while (m * epsilon < 1.0); 1206 epsilon = 1.0 / m * ( (int)(0.5 + m * epsilon));1207 epsilon = 1.0 / m * (floor(0.5 + m * epsilon)); 1207 1208 if (epsilon <= error) 1208 1209 return epsilon; … … 1213 1214 FUNCTION(fun_fraction) 1214 1215 { 1215 intnum = 0, denom = 0;1216 double num = 0, denom = 0; 1216 1217 NVAL n; 1217 1218 int sign = 0; … … 1237 1238 safe_chr('-', buff, bp); 1238 1239 1239 if ( denom == 1)1240 safe_ integer(num, buff, bp);1240 if (fabs(denom - 1) < 1.0e-10) 1241 safe_format(buff, bp, "%.0lf", num); 1241 1242 else 1242 safe_format(buff, bp, "% d/%d", num, denom);1243 safe_format(buff, bp, "%.0lf/%.0lf", num, denom); 1243 1244 } 1244 1245 1.8.0/src/lock.c
r479 r497 735 735 if (!IsPlayer(thing)) 736 736 ModTime(thing) = mudtime; 737 } else 737 } else { 738 738 notify(player, T("Permission denied.")); 739 } 739 free_boolexp(key); 740 } 741 } else 742 free_boolexp(key); 740 743 } 741 744 } 1.8.0/src/set.c
r485 r497 1125 1125 1126 1126 if (!atr_iter_get(player, thing, pattern, 0, wipe_helper, NULL)) 1127 notify(player, T("No matching attributes."));1127 notify(player, T("No attributes wiped.")); 1128 1128 else 1129 1129 notify(player, T("Attributes wiped.")); 1.8.0/src/sql.c
r469 r497 225 225 return; 226 226 if (nargs < 3) 227 field_delim = row_delim;227 field_delim = ' '; 228 228 else if (!delim_check(buff, bp, nargs, args, 3, &field_delim)) 229 229 return; 1.8.0/src/wiz.c
r493 r497 539 539 } else { 540 540 /* attempted teleport to an exit */ 541 if (tport_control_ok(player, victim, Location(victim))) 541 if (tport_control_ok(player, victim, Location(victim)) 542 && (Tel_Anything(player) || 543 (Tel_Anywhere(player) && (player == victim)) || 544 (!Fixed(Owner(victim)) && !Fixed(player)))) { 542 545 do_move(victim, to, MOVE_NORMAL); 543 else {546 } else { 544 547 notify(player, T("Permission denied.")); 545 notify_format(victim, 546 T("%s tries to impose his will on you and fails."), 547 Name(player)); 548 if (victim != player) 549 notify_format(victim, 550 T("%s tries to impose his will on you and fails."), 551 Name(player)); 548 552 } 549 553 } … … 712 716 } else { 713 717 notify_format(player, 714 T("%d objects = %d rooms, %d exits, %d things, %d players."), 718 T 719 ("%d objects = %d rooms, %d exits, %d things, %d players."), 715 720 si->total - si->garbage, si->rooms, si->exits, si->things, 716 721 si->players); … … 1295 1300 NULL, &results, pe_info); 1296 1301 else 1297 nresults = raw_search(executor, args[0], args[1], args[2], args[3], args[4], 1298 &results, pe_info); 1302 nresults = 1303 raw_search(executor, args[0], args[1], args[2], args[3], args[4], 1304 &results, pe_info); 1299 1305 1300 1306 if (nresults < 0) { … … 1302 1308 } else if (nresults == 0) { 1303 1309 notify(executor, T("Nothing found.")); 1304 safe_str("#-1", buff, bp);1305 1310 } else { 1306 1311 int first = 1, n; … … 1410 1415 return -1; 1411 1416 } 1412 } else if (string_prefix("things", class) || string_prefix("objects", class)) { 1417 } else if (string_prefix("things", class) 1418 || string_prefix("objects", class)) { 1413 1419 sclass = S_NAME; 1414 1420 restrict_type = TYPE_THING; … … 1722 1728 */ 1723 1729 void 1724 do_sitelock(dbref player, const char *site, const char *opts, const char *who,1725 enum sitelock_type type)1730 do_sitelock(dbref player, const char *site, const char *opts, 1731 const char *who, enum sitelock_type type) 1726 1732 { 1727 1733 if (!Wizard(player)) {
