PennMUSH Community

Changeset 497

Show
Ignore:
Timestamp:
08/16/06 02:26:59 (2 years ago)
Author:
pennmush
Message:

PennMUSH 1.8.0p7 Archival

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.0/CHANGES.180

    r495 r497  
    1212 
    1313========================================================================== 
     14 
     15Version 1.8.0 patchlevel 7                      August 29, 2005 
     16 
     17Fixes: 
     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 
    1440 
    1541Version 1.8.0 patchlevel 6                      June 24, 2005 
  • 1.8.0/Patchlevel

    r495 r497  
    11Do not edit this file. It is maintained by the official PennMUSH patches. 
    2 This is PennMUSH 1.8.0p6 
     2This is PennMUSH 1.8.0p7 
  • 1.8.0/README.SQL

    r469 r497  
    1717   III. SQL setup tips 
    1818 
    19 I. Compiling withi MySQL 
     19I. Compiling with MySQL 
    2020 
    2121  The Configure script distributed with PennMUSH automatically detects 
  • 1.8.0/game/README

    r469 r497  
    4242in mush.cnf) every time, since errors and other important messages get 
    4343printed to that logfile. 
     44 
     45After your first startup, it's a good idea to make some small 
     46change to the database (e.g., @create an object) and then 
     47do an @shutdown. Restart the game again and ensure that your 
     48object is still present - this verifies that the server is 
     49successfully dumping. 
    4450 
    4551============================================================================ 
  • 1.8.0/game/restart

    r463 r497  
    3737####################################################################### 
    3838 
    39 if [ -z $GAMEDIR ]; then 
     39if [ -z "$GAMEDIR" ]; then 
    4040  echo "You must set GAMEDIR in the restart script." 
    4141  exit 1 
    4242fi 
    4343 
    44 if [ ! -d $GAMEDIR ]; then 
     44if [ ! -d "$GAMEDIR" ]; then 
    4545  echo "GAMEDIR doesn't appear to be a directory. It's: $GAMEDIR" 
    4646  exit 1 
     
    5050echo Running from `pwd` 
    5151 
    52 if [ ! -f $CONF_FILE ]; then 
     52if [ ! -f "$CONF_FILE" ]; then 
    5353  echo "CONF_FILE doesn't exist. It's: $CONF_FILE" 
    5454  echo "Create $CONF_FILE from $GAMEDIR/mushcnf.dst" 
     
    7676egrep -s "^compress_program[    ]*[A-Za-z0-9]" $CONF_FILE 
    7777nocompress=$? 
    78 if [ $nocompress -eq 0 ]; then 
     78if [ "$nocompress" -eq 0 ]; then 
    7979    COMPRESSOR=`egrep "^compress_program" $CONF_FILE | sed "s/[^    ]*[     ]*\(.*\)/\1/"` 
    8080    SUFFIX=`egrep "^compress_suffix" $CONF_FILE | sed "s/[^     ]*[     ]*\(.*\)/\1/"` 
     
    8989 
    9090 
    91 if [ $mush -gt 0 ]; then 
     91if [ "$mush" -gt 0 ]; then 
    9292  echo Mush already active or some other process is using $GAMEDIR/$CONF_FILE. 
    9393  exit 0 
     
    9999echo Restarting Mush. 
    100100 
    101 if [ -r $PANICDIR/$PANICDB ]; then 
     101if [ -r "$PANICDIR/$PANICDB" ]; then 
    102102   end="`tail -1 $PANICDIR/$PANICDB`" 
    103103   if [ "$end" = "***END OF DUMP***" ]; then 
     
    114114rm -f log/*.log 
    115115 
    116 if [ -r data/$OUTDB$SUFFIX ]; then 
     116if [ -r "data/$OUTDB$SUFFIX" ]; then 
    117117   rm -f save/$INDB$SUFFIX.old 
    118118   mv -f data/$INDB$SUFFIX save/$INDB$SUFFIX.old 
     
    120120else 
    121121   echo "No $OUTDB$SUFFIX found." 
    122    if [ -r data/$INDB$SUFFIX ]; then 
     122   if [ -r "data/$INDB$SUFFIX" ]; then 
    123123      echo "Using $INDB$SUFFIX." 
    124124   else 
    125125      echo "No $INDB$SUFFIX found." 
    126       if [ -r save/$INDB$SUFFIX.old ]; then 
     126      if [ -r "save/$INDB$SUFFIX.old" ]; then 
    127127     echo "Using save/$INDB$SUFFIX.old." 
    128128     cp save/$INDB$SUFFIX.old data/$INDB$SUFFIX 
  • 1.8.0/game/txt/hlp/penncmd.hlp

    r487 r497  
    611611  are parsed by default, but you can call foo/noeval. Note: the $-command 
    612612  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). 
    613616 
    614617(examples in help @command3) 
  • 1.8.0/game/txt/hlp/pennfunc.hlp

    r493 r497  
    23292329  lvthings(<object>) 
    23302330 
    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. 
    23342333& LWHO() 
    23352334  lwho() 
     
    29422941  pmatch(<string>) 
    29432942  
    2944   Given the partial name of a player, it returns that player's dbref 
     2943  Given the partial name of a connected player, returns that player's dbref 
    29452944  number. This partial name completion works similarly to the partial 
    29462945  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, 
    29482947  it tries to match the partial names of connected players visible to 
    29492948  the enactor. If no player is matched, it returns "#-1". If more than 
     
    35943593 
    35953594     &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),~,|))] ... 
    35973596 
    35983597  See also: sqlescape(), @sql 
  • 1.8.0/game/txt/hlp/penntop.hlp

    r493 r497  
    11861186  pattern, and match the corresponding characters in the subject.  
    11871187 
    1188   There are two different sets of meta-characters: those that are 
     1188  There are two different sets of meta-characters: those that are 
    11891189  recognized anywhere in the pattern except within square brackets, 
    11901190  and those that are recognized in square  brackets.  Outside square 
     
    12311231  (Cont'd in help regexp syntax4) 
    12321232& regexp syntax4 
    1233   A backlash can also two useful assertions -- conditions that 
     1233  A backlash can also be used for two useful assertions -- conditions that 
    12341234  must be met at a particular point in a match: 
    12351235 
     
    15171517  Nonstandard attributes are set using &<attrib> <obj>=<value>  
    15181518  Attributes may also be set using @set <obj>=<attrib>:<value> 
     1519  or the set() function. 
    15191520   
    15201521  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: 
    15251527    @va me       <--- wipes out my VA attribute 
    15261528    @va me=      <--- sets my VA attribute to be empty 
     
    15291531  are gone forever. 
    15301532   
    1531   See also ATTRIBUTES, NON-STANDARD ATTRIBUTES, @set, @wipe 
     1533  See also ATTRIBUTES, NON-STANDARD ATTRIBUTES, @set, @wipe, set(), wipe() 
    15321534& SPOOFING 
    15331535  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.0p6 
     1& 1.8.0p7 
    22& changes 
    33This is a list of changes in this patchlevel which are probably of 
     
    1212be read in 'help patchlevels'. 
    1313 
     14Version 1.8.0 patchlevel 7                      August 29, 2005 
     15 
     16Fixes: 
     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 
    1441Version 1.8.0 patchlevel 6                      June 24, 2005 
    1542 
  • 1.8.0/game/txt/hlp/pennvOLD.hlp

    r495 r497  
    44184418type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 
    44194419 
    4420 1.8.0: 0, 1, 2, 3, 4, 5, 6 
     44201.8.0: 0, 1, 2, 3, 4, 5, 6, 7 
    442144211.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
    44224422       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  
    11#define VERSION "1.8.0" 
    2 #define PATCHLEVEL "6
    3 #define PATCHDATE "[06/24/2005]" 
    4 #define NUMVERSION 1008000006 
     2#define PATCHLEVEL "7
     3#define PATCHDATE "[08/29/2005]" 
     4#define NUMVERSION 1008000007 
  • 1.8.0/src/attrib.c

    r479 r497  
    15551555    : atr_clr(thing, name, player); 
    15561556  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); 
    15581559    return 0; 
    15591560  } else if (res == AE_BADNAME) { 
  • 1.8.0/src/conf.c

    r493 r497  
    830830  if (!strcasecmp(opt, "restrict_command")) { 
    831831    if (!restrictions) 
    832       return 1
     832      return 0
    833833    for (p = val; *p && !isspace((unsigned char) *p); p++) ; 
    834834    if (*p) { 
     
    853853  } else if (!strcasecmp(opt, "restrict_function")) { 
    854854    if (!restrictions) 
    855       return 1
     855      return 0
    856856    for (p = val; *p && !isspace((unsigned char) *p); p++) ; 
    857857    if (*p) { 
     
    877877  } else if (!strcasecmp(opt, "reserve_alias")) { 
    878878    if (!restrictions) 
    879       return 1
     879      return 0
    880880    reserve_alias(val); 
    881881    return 1; 
    882882  } else if (!strcasecmp(opt, "command_alias")) { 
    883883    if (!restrictions) 
    884       return 1
     884      return 0
    885885    for (p = val; *p && !isspace((unsigned char) *p); p++) ; 
    886886    if (*p) { 
     
    902902  } else if (!strcasecmp(opt, "attribute_alias")) { 
    903903    if (!restrictions) 
    904       return 1
     904      return 0
    905905    for (p = val; *p && !isspace((unsigned char) *p); p++) ; 
    906906    if (*p) { 
     
    922922  } else if (!strcasecmp(opt, "function_alias")) { 
    923923    if (!restrictions) 
    924       return 1
     924      return 0
    925925    for (p = val; *p && !isspace((unsigned char) *p); p++) ; 
    926926    if (*p) { 
     
    945945    int admin = !strcasecmp(opt, "ahelp_command"); 
    946946    if (!restrictions) 
    947       return 1
     947      return 0
    948948    /* Add a new help-like command */ 
    949949    if (source == 1) 
  • 1.8.0/src/create.c

    r469 r497  
    183183do_unlink(dbref player, const char *name) 
    184184{ 
    185   dbref exit_l
     185  dbref exit_l, old_loc
    186186  long match_flags = MAT_EXIT | MAT_HERE | MAT_ABSOLUTE; 
    187187 
     
    202202      switch (Typeof(exit_l)) { 
    203203      case TYPE_EXIT: 
     204    old_loc = Location(exit_l); 
    204205    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)); 
    206208    break; 
    207209      case TYPE_ROOM: 
     
    305307 
    306308      /* 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)); 
    308311      break; 
    309312    case TYPE_PLAYER: 
  • 1.8.0/src/filecopy.c

    r473 r497  
    2525#include "log.h" 
    2626#include "confmagic.h" 
     27 
     28extern char confname[BUFFER_LEN];   /* From bsd.c */ 
    2729 
    2830#ifdef WIN32 
     
    208210      if (CopyFile("pennmush.exe", "pennmush_run.exe", FALSE)) { 
    209211    do_rawlog(LT_ERR, "Successfully copied executable, starting copy."); 
     212#ifdef WIN32SERVICES 
    210213    execl("pennmush_run.exe", "pennmush_run.exe", "/run", NULL); 
     214#else 
     215    execl("pennmush_run.exe", "pennmush_run.exe", confname, NULL); 
     216#endif 
    211217      } 
    212218    } 
  • 1.8.0/src/flags.c

    r479 r497  
    18871887  Flagspace_Lookup(n, ns); 
    18881888  /* 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  } 
    18911893  f = new_flag(); 
    18921894  f->name = mush_strdup(strupper(name), "flag name"); 
  • 1.8.0/src/fundb.c

    r493 r497  
    12281228{ 
    12291229  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); 
    12351239 
    12361240  it = match_thing(executor, args[0]); 
    1237   ltype = get_locktype(p); 
    12381241 
    12391242  if (nargs == 2) { 
     
    12491252    } 
    12501253  } 
    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); 
    12541258    return; 
    12551259  } 
  • 1.8.0/src/funmath.c

    r493 r497  
    5151static NVAL angle_to_rad(NVAL angle, const char *from); 
    5252static NVAL rad_to_angle(NVAL angle, const char *to); 
    53 static double frac(double v, int *RESTRICT n, int *RESTRICT d, double error); 
     53static double frac(double v, double *RESTRICT n, double *RESTRICT d, 
     54           double error); 
    5455void init_math_hashtab(void); 
    5556 
     
    11461147 */ 
    11471148static double 
    1148 frac(double v, int *RESTRICT n, int *RESTRICT d, double error) 
     1149frac(double v, double *RESTRICT n, double *RESTRICT d, double error) 
    11491150{ 
    11501151 
     
    11651166 
    11661167 
    1167   int D, N, t; 
     1168  double D, N, t; 
    11681169  int first = 1; 
    11691170  double epsilon, r = 0.0, m; 
     
    11721173    return -1.0; 
    11731174  *d = D = 1; 
    1174   *n = (int) v
     1175  *n = floor(v)
    11751176  N = *n + 1; 
    11761177 
     
    11791180      if (r <= 1.0) 
    11801181    r = 1.0 / r; 
    1181       N += *n * (int) r
    1182       D += *d * (int) r
     1182      N += *n * floor(r)
     1183      D += *d * floor(r)
    11831184      *n += N; 
    11841185      *d += D; 
     
    12041205      m *= 10.0; 
    12051206    } 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)); 
    12071208    if (epsilon <= error) 
    12081209      return epsilon; 
     
    12131214FUNCTION(fun_fraction) 
    12141215{ 
    1215   int num = 0, denom = 0; 
     1216  double num = 0, denom = 0; 
    12161217  NVAL n; 
    12171218  int sign = 0; 
     
    12371238    safe_chr('-', buff, bp); 
    12381239 
    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); 
    12411242  else 
    1242     safe_format(buff, bp, "%d/%d", num, denom); 
     1243    safe_format(buff, bp, "%.0lf/%.0lf", num, denom); 
    12431244} 
    12441245 
  • 1.8.0/src/lock.c

    r479 r497  
    735735    if (!IsPlayer(thing)) 
    736736      ModTime(thing) = mudtime; 
    737       } else 
     737      } else { 
    738738    notify(player, T("Permission denied.")); 
    739     } 
     739    free_boolexp(key); 
     740      } 
     741    } else 
     742      free_boolexp(key); 
    740743  } 
    741744} 
  • 1.8.0/src/set.c

    r485 r497  
    11251125 
    11261126  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.")); 
    11281128  else 
    11291129    notify(player, T("Attributes wiped.")); 
  • 1.8.0/src/sql.c

    r469 r497  
    225225    return; 
    226226  if (nargs < 3) 
    227     field_delim = row_delim
     227    field_delim = ' '
    228228  else if (!delim_check(buff, bp, nargs, args, 3, &field_delim)) 
    229229    return; 
  • 1.8.0/src/wiz.c

    r493 r497  
    539539    } else { 
    540540      /* 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)))) { 
    542545    do_move(victim, to, MOVE_NORMAL); 
    543       else { 
     546      } else { 
    544547    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)); 
    548552      } 
    549553    } 
     
    712716  } else { 
    713717    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."), 
    715720          si->total - si->garbage, si->rooms, si->exits, si->things, 
    716721          si->players); 
     
    12951300              NULL, &results, pe_info); 
    12961301  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); 
    12991305 
    13001306  if (nresults < 0) { 
     
    13021308  } else if (nresults == 0) { 
    13031309    notify(executor, T("Nothing found.")); 
    1304     safe_str("#-1", buff, bp); 
    13051310  } else { 
    13061311    int first = 1, n; 
     
    14101415      return -1; 
    14111416    } 
    1412   } else if (string_prefix("things", class) || string_prefix("objects", class)) { 
     1417  } else if (string_prefix("things", class) 
     1418         || string_prefix("objects", class)) { 
    14131419    sclass = S_NAME; 
    14141420    restrict_type = TYPE_THING; 
     
    17221728 */ 
    17231729void 
    1724 do_sitelock(dbref player, const char *site, const char *opts, const char *who, 
    1725         enum sitelock_type type) 
     1730do_sitelock(dbref player, const char *site, const char *opts, 
     1731        const char *who, enum sitelock_type type) 
    17261732{ 
    17271733  if (!Wizard(player)) {