PennMUSH Community

Changeset 716

Show
Ignore:
Timestamp:
03/11/07 20:20:21 (2 years ago)
Author:
penndev
Message:

PennMUSH 1.8.2p3 release candidate.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.2/trunk/CHANGES.182

    r651 r716  
    1414 
    1515========================================================================== 
     16 
     17Version 1.8.2 patchlevel 3                      March 11, 2007 
     18 
     19Fixes: 
     20  * Unterminated buffer in sortkey() fixed. Reported by Balerion. 
     21    Patch by Javelin. 
     22  * Memory leaks in setunion() and revwords() fixed by Javelin. 
     23  * Crash bug in speak() fixed. Reported by Trinsec. Patch by Javelin. 
     24  * Crash bug in buy fixed. Reported by Amy. Patch by Javelin. 
     25  * If we should fail to clear a semaphore attribute for some 
     26    reason (e.g., it's the branch of an attribute tree), reset 
     27    the semaphore count on the attribute to 0. Patch by Javelin. 
     28  * iter() dealt badly with freeing buffers when CPU_LIMIT or 
     29    function_invocation_limit was hit. Found by Ashen-Shugar. [GM] 
     30  * @ps/all displayed the wrong  queue entry count for mortals. 
     31    Reported by Cheetah. [SW] 
     32  * @hook/override of say would get an extra leading " if that was 
     33    used instead of the literal say command. Reported by Tuxedo Ian. 
     34    [SW] 
     35  * Fixed a bug where speech seemed to come from the wrong  
     36    object for nospoof information. Reported by Jules. [SW] 
     37  * The help entry for @poll failed to mention @poll/clear. 
     38    Reported by Cooee. [SW] 
    1639 
    1740Version 1.8.2 patchlevel 2                      January 27, 2007 
  • 1.8.2/trunk/Patchlevel

    r651 r716  
    11Do not edit this file. It is maintained by the official PennMUSH patches. 
    2 This is PennMUSH 1.8.2p2 
     2This is PennMUSH 1.8.2p3 
  • 1.8.2/trunk/game/txt/hlp/penncmd.hlp

    r651 r716  
    26932693  See also @emit, @oemit, @remit, NOSPOOF, and SPOOFING. 
    26942694& @poll 
     2695  @poll 
    26952696  @poll <poll question> 
    2696   This wizard-only command sets the "poll" - the Doing question. If 
    2697   "@poll" is used by itself, the question is reset to the default 
    2698   string "Doing". It can also be used by those with the poll @power. 
     2697  @poll/clear 
     2698 
     2699  This command manipulate the message at the top of WHO/DOING. By itself, 
     2700  it displays the current poll. Wizards and those with the poll @power can 
     2701  set or clear the message. 
    26992702 
    27002703See also: @doing, WHO, DOING 
  • 1.8.2/trunk/game/txt/hlp/pennv182.hlp

    r651 r716  
    1 & 1.8.2p2 
     1& 1.8.2p3 
    22& changes 
    33This is a list of changes in this patchlevel which are probably of 
     
    1212be read in 'help patchlevels'. 
    1313 
     14Version 1.8.2 patchlevel 3                      March 11, 2007 
     15 
     16Fixes: 
     17  * Unterminated buffer in sortkey() fixed. Reported by Balerion. 
     18    Patch by Javelin. 
     19  * Memory leaks in setunion() and revwords() fixed by Javelin. 
     20  * Crash bug in speak() fixed. Reported by Trinsec. Patch by Javelin. 
     21  * Crash bug in buy fixed. Reported by Amy. Patch by Javelin. 
     22  * If we should fail to clear a semaphore attribute for some 
     23    reason (e.g., it's the branch of an attribute tree), reset 
     24    the semaphore count on the attribute to 0. Patch by Javelin. 
     25  * iter() dealt badly with freeing buffers when CPU_LIMIT or 
     26    function_invocation_limit was hit. Found by Ashen-Shugar. [GM] 
     27  * @ps/all displayed the wrong  queue entry count for mortals. 
     28    Reported by Cheetah. [SW] 
     29  * @hook/override of say would get an extra leading " if that was 
     30    used instead of the literal say command. Reported by Tuxedo Ian. 
     31    [SW] 
     32  * Fixed a bug where speech seemed to come from the wrong  
     33    object for nospoof information. Reported by Jules. [SW] 
     34  * The help entry for @poll failed to mention @poll/clear. 
     35    Reported by Cooee. [SW] 
     36 
     37& 1.8.2p2 
    1438Version 1.8.2 patchlevel 2                      January 27, 2007 
    1539 
     
    3155  * Fixed the distribution of random numbers with a huge range. Reported 
    3256    by Luke. 
     57 
    3358& 1.8.2p1 
    3459Version 1.8.2 patchlevel 1                      November 26, 2006 
  • 1.8.2/trunk/hdrs/version.h

    r651 r716  
    11#define VERSION "1.8.2" 
    2 #define PATCHLEVEL "2
    3 #define PATCHDATE "[01/27/2007]" 
    4 #define NUMVERSION 1008002002 
     2#define PATCHLEVEL "3
     3#define PATCHDATE "[03/11/2007]" 
     4#define NUMVERSION 1008002003 
  • 1.8.2/trunk/src/attrib.c

    r531 r716  
    462462      num_new++; 
    463463    } 
     464    /* Only GOD can create an AF_NODUMP attribute (used for semaphores) 
     465     * or add a leaf to a tree with such an attribute 
     466     */ 
     467    if ((AL_FLAGS(atr) & AF_NODUMP) && (player != GOD)) { 
     468      missing_name[0] = '\0'; 
     469      return AE_ERROR; 
     470    } 
    464471    if (Cannot_Write_This_Attr(player, atr, 1)) { 
    465472      missing_name[0] = '\0'; 
  • 1.8.2/trunk/src/bsd.c

    r557 r716  
    37873787  int start, count; 
    37883788  int powered = (*(called_as + 1) != 'M'); 
    3789   int objid = (index(called_as, 'D') != NULL); 
     3789  int objid = (strchr(called_as, 'D') != NULL); 
    37903790 
    37913791  if (!is_strict_integer(args[0]) || !is_strict_integer(args[1])) { 
     
    38453845  dbref victim; 
    38463846  int powered = ((*called_as == 'L') && Priv_Who(executor)); 
    3847   int objid = (index(called_as, 'D') != NULL); 
     3847  int objid = (strchr(called_as, 'D') != NULL); 
    38483848 
    38493849  first = 1; 
  • 1.8.2/trunk/src/command.c

    r566 r716  
    913913  case SAY_TOKEN: 
    914914    replacer = "SAY"; 
     915#if 0 
     916    /* Messes up hooks when chat_strip_quote is yes. See bug #6677 */ 
    915917    if (CHAT_STRIP_QUOTE) 
    916918      p--;          /* Since 'say' strips out the '"' */ 
     919#endif 
    917920    break; 
    918921  case POSE_TOKEN: 
  • 1.8.2/trunk/src/cque.c

    r566 r716  
    124124    num = parse_integer(atr_value(a)); 
    125125  num += am; 
    126   if (num) { 
    127     sprintf(buff, "%d", num); 
    128     (void) atr_add(player, name, buff, GOD, flags); 
    129   } else { 
     126  /* We set the attribute's value to 0 even if we're going to clear 
     127   * it later, because clearing it may fail (perhaps someone's also 
     128   * foolishly using it as a branch in an attribute tree) 
     129   */ 
     130  sprintf(buff, "%d", num); 
     131  (void) atr_add(player, name, buff, GOD, flags); 
     132  if (!num) { 
    130133    (void) atr_clr(player, name, GOD); 
    131134  } 
     
    904907      (*del)++; 
    905908    else if (q_all || (Owner(tmp->player) == victim)) { 
    906       (*self)++; 
    907       if (!q_quiet && (LookQueue(player) 
    908                || Owns(tmp->player, player))) { 
     909      if ((LookQueue(player) 
     910       || Owns(tmp->player, player))) { 
     911    (*self)++; 
     912    if (q_quiet) 
     913      continue; 
    909914    switch (q_type) { 
    910915    case 1:     /* wait queue */ 
    911       notify_format(player, "[%ld]%s:%s", tmp->left - mudtime, 
     916      notify_format(player, "[%ld]%s: %s", tmp->left - mudtime, 
    912917            unparse_object(player, tmp->player), tmp->comm); 
    913918      break; 
    914919    case 2:     /* semaphore queue */ 
    915920      if (tmp->left != 0) { 
    916         notify_format(player, "[#%d/%s/%ld]%s:%s", tmp->sem, 
     921        notify_format(player, "[#%d/%s/%ld]%s: %s", tmp->sem, 
    917922              tmp->semattr, tmp->left - mudtime, 
    918923              unparse_object(player, tmp->player), tmp->comm); 
    919924      } else { 
    920         notify_format(player, "[#%d/%s]%s:%s", tmp->sem, 
     925        notify_format(player, "[#%d/%s]%s: %s", tmp->sem, 
    921926              tmp->semattr, unparse_object(player, tmp->player), 
    922927              tmp->comm); 
     
    924929      break; 
    925930    default:        /* player or object queue */ 
    926       notify_format(player, "%s:%s", unparse_object(player, 
    927                             tmp->player), 
     931      notify_format(player, "%s: %s", unparse_object(player, 
     932                            tmp->player), 
    928933            tmp->comm); 
    929934    } 
  • 1.8.2/trunk/src/filecopy.c

    r515 r716  
    207207  char FileName[256]; 
    208208  if (GetModuleFileName(NULL, FileName, 256) != 0) { 
    209     if (!strcasecmp(rindex(FileName, '\\') + 1, "pennmush.exe")) { 
     209    if (!strcasecmp(strrchr(FileName, '\\') + 1, "pennmush.exe")) { 
    210210      if (CopyFile("pennmush.exe", "pennmush_run.exe", FALSE)) { 
    211211    do_rawlog(LT_ERR, "Successfully copied executable, starting copy."); 
  • 1.8.2/trunk/src/funlist.c

    r651 r716  
    12121212  char outsep[BUFFER_LEN]; 
    12131213  int i; 
    1214   char tbuff[BUFFER_LEN]; 
    1215   char *tp; 
    1216   char const *cp; 
    12171214  char result[BUFFER_LEN]; 
    1218   char *rp; 
    1219   ATTR *attrib; 
    1220   dbref thing; 
     1215  ufun_attrib ufun; 
     1216  char *wenv[1]; 
    12211217 
    12221218  /* sortkey(attr,list,sort_type,delim,osep) */ 
     
    12341230    strcpy(outsep, args[4]); 
    12351231 
    1236   /* Find object and attribute to get sortby function from. */ 
    1237   parse_anon_attrib(executor, args[0], &thing, &attrib); 
    1238   if (!GoodObject(thing) || !attrib || !Can_Read_Attr(executor, thing, attrib)) { 
    1239     free_anon_attrib(attrib); 
    1240     return; 
    1241   } 
    1242   if (!CanEvalAttr(executor, thing, attrib)) { 
    1243     free_anon_attrib(attrib); 
    1244     return; 
    1245   } 
    1246   tp = tbuff; 
    1247   safe_str(atr_value(attrib), tbuff, &tp); 
    1248   *tp = '\0'; 
    1249  
     1232  /* find our object and attribute */ 
     1233  if (!fetch_ufun_attrib(args[0], executor, &ufun, 1)) 
     1234    return; 
    12501235 
    12511236  nptrs = list2arr_ansi(ptrs, MAX_SORTSIZE, args[1], sep); 
     
    12531238  /* Now we make a list of keys */ 
    12541239  for (i = 0; i < nptrs; i++) { 
    1255     global_eval_context.wenv[0] = (char *) ptrs[i]; 
    1256     rp = result; 
    1257     cp = tbuff; 
    1258     process_expression(result, &rp, &cp, 
    1259                thing, executor, enactor, 
    1260                PE_DEFAULT, PT_DEFAULT, pe_info); 
    1261     *rp = '\0'; 
     1240    /* Build our %0 args */ 
     1241    wenv[0] = (char *)ptrs[i]; 
     1242    call_ufun(&ufun, wenv, 2, result, executor, enactor, pe_info); 
    12621243    keys[i] = mush_strdup(result, "sortkey"); 
    12631244  } 
     
    14621443  char sep; 
    14631444  char **a1, **a2; 
    1464   int n1, n2, x1, x2, val
     1445  int n1, n2, x1, x2, val, orign1, orign2
    14651446  int lastx1, lastx2, found; 
    14661447  char *sort_type = ALPHANUM_LIST; 
     
    14811462 
    14821463  /* make arrays out of the lists */ 
    1483   n1 = list2arr_ansi(a1, MAX_SORTSIZE, args[0], sep); 
    1484   n2 = list2arr_ansi(a2, MAX_SORTSIZE, args[1], sep); 
     1464  orign1 = n1 = list2arr_ansi(a1, MAX_SORTSIZE, args[0], sep); 
     1465  orign2 = n2 = list2arr_ansi(a2, MAX_SORTSIZE, args[1], sep); 
    14851466 
    14861467  if (nargs < 4) { 
     
    15901571    } 
    15911572  } 
    1592   freearr(a1, n1); 
    1593   freearr(a2, n2); 
     1573  freearr(a1, orign1); 
     1574  freearr(a2, orign2); 
    15941575  mush_free((Malloc_t) a1, "ptrarray"); 
    15951576  mush_free((Malloc_t) a2, "ptrarray"); 
     
    25862567{ 
    25872568  char **words; 
    2588   int count
     2569  int count, origcount
    25892570  char sep; 
    25902571  char *osep, osepd[2] = { '\0', '\0' }; 
     
    26022583  words = (char **) mush_malloc(sizeof(char *) * BUFFER_LEN, "wordlist"); 
    26032584 
    2604   count = list2arr_ansi(words, BUFFER_LEN, args[0], sep); 
     2585  origcount = count = list2arr_ansi(words, BUFFER_LEN, args[0], sep); 
    26052586  if (count == 0) { 
    26062587    mush_free((Malloc_t) words, "wordlist"); 
     
    26132594    safe_str(words[--count], buff, bp); 
    26142595  } 
    2615   freearr(words, count); 
     2596  freearr(words, origcount); 
    26162597  mush_free((Malloc_t) words, "wordlist"); 
    26172598} 
     
    27472728    sp = tbuf2; 
    27482729    if (process_expression(buff, bp, &sp, executor, caller, enactor, 
    2749                PE_DEFAULT, PT_DEFAULT, pe_info)) 
     2730               PE_DEFAULT, PT_DEFAULT, pe_info)) { 
     2731      mush_free((Malloc_t) tbuf2, "replace_string.buff"); 
    27502732      break; 
    2751     if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount) 
     2733    } 
     2734    if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount) { 
     2735      mush_free((Malloc_t) tbuf2, "replace_string.buff"); 
    27522736      break; 
     2737    } 
    27532738    funccount = pe_info->fun_invocations; 
    27542739    oldbp = *bp; 
  • 1.8.2/trunk/src/funmisc.c

    r521 r716  
    6969  int ns = string_prefix(called_as, "NS"); 
    7070  int flags = PEMIT_LIST; 
     71  dbref saved_orator = orator; 
    7172  if (!command_check_byname(executor, ns ? "@nspemit" : "@pemit") || 
    7273      fun->flags & FN_NOSIDEFX) { 
     
    7879    flags |= PEMIT_SPOOF; 
    7980  do_pemit_list(executor, args[0], args[1], flags); 
     81  orator = saved_orator; 
    8082} 
    8183 
  • 1.8.2/trunk/src/funstr.c

    r651 r716  
    22482248      safe_format(buff, bp, "%s %s %s", Name(speaker), say_string, rbuff); 
    22492249      return; 
    2250     } else
     2250    } else if (null == 1)
    22512251      wenv[0] = speaker_str; 
    22522252      wenv[1] = unparse_integer(fragment); 
     
    22982298    break; 
    22992299      funccount = pe_info->fun_invocations; 
    2300       if (strlen(rbuff) == 0) { 
     2300      if ((null == 1) && (strlen(rbuff) == 0)) { 
    23012301    wenv[0] = speaker_str; 
    23022302    wenv[1] = unparse_integer(fragment); 
  • 1.8.2/trunk/src/rob.c

    r477 r716  
    159159{ 
    160160  dbref vendor; 
    161   char *prices
     161  char prices[BUFFER_LEN]
    162162  char *plus; 
    163163  char *cost; 
     
    227227    if (!a) 
    228228      continue; 
    229     /* atr_value uses a static buffer, so we'll take advantage of that */ 
    230     prices = atr_value(a)
     229    strncpy(prices,atr_value(a),BUFFER_LEN); 
     230    prices[BUFFER_LEN-1] = '\0'
    231231    upcasestr(prices); 
    232     count = list2arr(r, BUFFER_LEN / 2, atr_value(a), ' '); 
     232    count = list2arr(r, BUFFER_LEN / 2, prices, ' '); 
    233233    if (!count) 
    234234      continue; 
  • 1.8.2/trunk/src/utils.c

    r651 r716  
    147147      AL_NEXT(*attrib) = NULL; 
    148148      *thing = player; 
    149       return; 
    150149    } 
     150    return; 
    151151  } 
    152152  parse_attrib(player, str, thing, attrib);