PennMUSH Community

Changeset 473

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

PennMUSH 1.7.7p37 Archival

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.7.7/CHANGES.177

    r471 r473  
    1818 
    1919========================================================================== 
     20 
     21Version 1.7.7 patchlevel 37                     August 23, 2004 
     22 
     23Major changes: 
     24  * @adisconnect is triggered on every disconnection, partial or full. 
     25    This mirrors the behavior of @aconnect. Use %1 (the number of 
     26    remaining connections) to distinguish between partial and full 
     27    disconnects in @adisconnect code. 
     28Minor changes (user-visible): 
     29  * When a player disconnects, their recv(), sent(), and cmds() 
     30    values are passed to triggered @adisconnects as %2, %3, and %4. 
     31    The number of remaining connections is passed as %1. 
     32    Suggested by Jessica Hawthorne and Wayne@PDX. 
     33  * No_Pay players now have their money reported as unlimited by 
     34    examine and score (but money() still returns a useful integer value). 
     35    ex/debug can be used to see the object's Pennies field. 
     36    Suggested by Wayne@PDX. 
     37Fixes: 
     38  * ex obj/*1 and similar was matching like ex obj/*1*. Reported by 
     39    Math@HavenMUSH. 
     40  * inc() and dec() with out-of-range integers now return a more 
     41    useful error instead of odd behavior. Suggested by Jessica Hawthorne. 
     42  * Win32 bug with renamed temporary database files resolved. 
     43    Reported by AndromedaMU. 
     44  * Help fixes by Mike Griffiths. 
     45  * @mail commands with no message list were not using current folder. 
     46    Report by Jessica Hawthorne. 
    2047 
    2148Version 1.7.7 patchlevel 36                     August 9, 2004 
  • 1.7.7/Patchlevel

    r471 r473  
    11Do not edit this file. It is maintained by the official PennMUSH patches. 
    2 This is PennMUSH 1.7.7p36 
     2This is PennMUSH 1.7.7p37 
  • 1.7.7/game/txt/hlp/pennchat.hlp

    r469 r473  
    153153  @channel/chown <channel> = <new owner> 
    154154 
    155   The "priv" switch changes the channel's access privileges. Use !<priv> 
    156     to reset a privilege. 
     155  The "priv" switch sets the channel's access privileges to those specified. 
    157156  The "wipe" switch clears a channel of players without deleting it. 
    158157  The "buffer" switch sets the maximum number of full-length lines that 
  • 1.7.7/game/txt/hlp/penncmd.hlp

    r471 r473  
    189189  the master room, anywhere). 
    190190 
    191 See also: @aconnect, ACTION LISTS 
     191  Several descriptor variables are passed to @adisconnect: 
     192  %1 = number of remaining connections (0 if a full disconnect) 
     193  %2 = bytes received by the disconnecting descriptor 
     194  %3 = bytes sent by the disconnecting descriptor 
     195  %4 = commands issued by the disconnecting descriptor 
     196 
     197See also: @aconnect, ACTION LISTS, recv(), sent(), cmds() 
    192198& @adrop 
    193199  @adrop <object> = <action list> 
     
    32883294See also: use, @ouse, @ause, @charges, @runout 
    32893295& @uunlock 
    3290   @uunlock <object> = <key> 
     3296  @uunlock <object> 
    32913297 
    32923298  Un-use-locks the object. See also: @lock, @ulock 
  • 1.7.7/game/txt/hlp/penntop.hlp

    r467 r473  
    745745 
    746746  These attributes show the last times you connected and disconnected from 
    747   the MUSH. 
     747  the MUSH.  
    748748& LASTSITE 
    749749& LASTIP  
  • 1.7.7/game/txt/hlp/pennv177.hlp

    r471 r473  
    1 & 1.7.7p36 
     1& 1.7.7p37 
    22& changes 
    33This is a list of changes in this patchlevel which are probably of 
     
    1212be read in 'help patchlevels'. 
    1313 
     14Version 1.7.7 patchlevel 37                     August 23, 2004 
     15 
     16Major changes: 
     17  * @adisconnect is triggered on every disconnection, partial or full. 
     18    This mirrors the behavior of @aconnect. Use %1 (the number of 
     19    remaining connections) to distinguish between partial and full 
     20    disconnects in @adisconnect code. 
     21Minor changes (user-visible): 
     22  * When a player disconnects, their recv(), sent(), and cmds() 
     23    values are passed to triggered @adisconnects as %2, %3, and %4. 
     24    The number of remaining connections is passed as %1. 
     25    Suggested by Jessica Hawthorne and Wayne@PDX. 
     26  * No_Pay players now have their money reported as unlimited by 
     27    examine and score (but money() still returns a useful integer value). 
     28    ex/debug can be used to see the object's Pennies field. 
     29    Suggested by Wayne@PDX. 
     30Fixes: 
     31  * ex obj/*1 and similar was matching like ex obj/*1*. Reported by 
     32    Math@HavenMUSH. 
     33  * inc() and dec() with out-of-range integers now return a more 
     34    useful error instead of odd behavior. Suggested by Jessica Hawthorne. 
     35  * Win32 bug with renamed temporary database files resolved. 
     36    Reported by AndromedaMU. 
     37  * Help fixes by Mike Griffiths. 
     38  * @mail commands with no message list were not using current folder. 
     39    Report by Jessica Hawthorne. 
     40 
     41& 1.7.7p36 
    1442Version 1.7.7 patchlevel 36                     August 9, 2004 
    1543 
  • 1.7.7/game/txt/hlp/pennvOLD.hlp

    r471 r473  
    442044201.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
    44214421       19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 
    4422        36 
     4422       36, 37 
    442344231.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 
    442444241.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 
  • 1.7.7/hdrs/version.h

    r471 r473  
    11#define VERSION "1.7.7" 
    2 #define PATCHLEVEL "36
    3 #define PATCHDATE "[08/09/2004]" 
    4 #define NUMVERSION 001007007036 
     2#define PATCHLEVEL "37
     3#define PATCHDATE "[08/23/2004]" 
     4#define NUMVERSION 001007007037 
  • 1.7.7/src/bsd.c

    r469 r473  
    418418static const char *time_format_2(long int dt); 
    419419static void announce_connect(dbref player, int isnew, int num); 
    420 static void announce_disconnect(dbref player); 
     420static void announce_disconnect(DESC *saved); 
    421421void inactivity_check(void); 
    422422#ifdef INFO_SLAVE 
     
    14931493       T("[%d/%s/%s] Logout by %s(#%d) <Connection not dropped>"), 
    14941494       d->descriptor, d->addr, d->ip, Name(d->player), d->player); 
    1495     announce_disconnect(d->player); 
     1495    announce_disconnect(d); 
    14961496    do_mail_purge(d->player); 
    14971497    login_number--; 
     
    15551555      fcache_dump(d, fcache.quit_fcache, NULL); 
    15561556      /* Player was not allowed to log in from the connect screen */ 
    1557       announce_disconnect(d->player); 
     1557      announce_disconnect(d); 
    15581558      do_mail_purge(d->player); 
    15591559    } 
     
    37213721 
    37223722static void 
    3723 announce_disconnect(dbref player
     3723announce_disconnect(DESC *saved
    37243724{ 
    37253725  dbref loc; 
     
    37293729  dbref zone, obj; 
    37303730  int j; 
    3731  
     3731  char *myenv[5]; 
     3732  dbref player; 
     3733 
     3734  player = saved->player; 
    37323735  loc = Location(player); 
    37333736  if (!GoodObject(loc)) 
     
    37393742    if (d->connected && (d->player == player)) 
    37403743      num++; 
    3741   if (num < 2) { 
    3742     sprintf(tbuf1, T("%s has disconnected."), Name(player)); 
    3743  
    3744     if (ANNOUNCE_CONNECTS) { 
    3745       if (!Dark(player)) 
    3746     notify_except(Contents(loc), player, tbuf1, NA_INTER_PRESENCE); 
    3747       /* notify contents */ 
    3748       notify_except(Contents(player), player, tbuf1, 0); 
    3749     } 
    3750  
    3751     /* clear the environment for possible actions */ 
    3752     for (j = 0; j < 10; j++) 
    3753       global_eval_context.wnxt[j] = NULL; 
    3754     for (j = 0; j < NUMQ; j++) 
    3755       global_eval_context.rnxt[j] = NULL; 
    3756  
    3757     (void) queue_attribute(player, "ADISCONNECT", player); 
    3758     if (ROOM_CONNECTS) 
    3759       if (IsRoom(loc) || IsThing(loc)) { 
    3760     (void) queue_attribute(loc, "ADISCONNECT", player); 
     3744 
     3745 
     3746  /* clear the environment for possible actions */ 
     3747  for (j = 0; j < 10; j++) 
     3748    global_eval_context.wnxt[j] = NULL; 
     3749  for (j = 0; j < NUMQ; j++) 
     3750    global_eval_context.rnxt[j] = NULL; 
     3751  /* And then load it up, as follows: 
     3752   * %0 (unused, reserved for "reason for disconnect") 
     3753   * %1 (number of connections remaining after disconnect) 
     3754   * %2 (bytes received) 
     3755   * %3 (bytes sent) 
     3756   * %4 (commands queued) 
     3757   */ 
     3758  myenv[0] = NULL; 
     3759  myenv[1] = mush_strdup(unparse_integer(num - 1), "myenv"); 
     3760  myenv[2] = mush_strdup(unparse_integer(saved->input_chars), "myenv"); 
     3761  myenv[3] = mush_strdup(unparse_integer(saved->output_chars), "myenv"); 
     3762  myenv[4] = mush_strdup(unparse_integer(saved->cmds), "myenv"); 
     3763  for (j = 0; j < 5; j++) 
     3764    global_eval_context.wnxt[j] = myenv[j]; 
     3765 
     3766  (void) queue_attribute(player, "ADISCONNECT", player); 
     3767  if (ROOM_CONNECTS) 
     3768    if (IsRoom(loc) || IsThing(loc)) { 
     3769      if (!Priv_Who(loc) && !Can_Examine(loc, player)) 
     3770    global_eval_context.wnxt[1] = NULL; 
     3771      (void) queue_attribute(loc, "ADISCONNECT", player); 
     3772      global_eval_context.wnxt[1] = myenv[1]; 
     3773    } 
     3774  /* do the zone of the player's location's possible adisconnect */ 
     3775  if ((zone = Zone(loc)) != NOTHING) { 
     3776    switch (Typeof(zone)) { 
     3777    case TYPE_THING: 
     3778      if (!Priv_Who(zone) && !Can_Examine(zone, player)) 
     3779    global_eval_context.wnxt[1] = NULL; 
     3780      (void) queue_attribute(zone, "ADISCONNECT", player); 
     3781      global_eval_context.wnxt[1] = myenv[1]; 
     3782      break; 
     3783    case TYPE_ROOM: 
     3784      /* check every object in the room for a connect action */ 
     3785      DOLIST(obj, Contents(zone)) { 
     3786    if (!Priv_Who(obj) && !Can_Examine(obj, player)) 
     3787      global_eval_context.wnxt[1] = NULL; 
     3788    (void) queue_attribute(obj, "ADISCONNECT", player); 
     3789    global_eval_context.wnxt[1] = myenv[1]; 
    37613790      } 
    3762     /* do the zone of the player's location's possible adisconnect */ 
    3763     if ((zone = Zone(loc)) != NOTHING) { 
    3764       switch (Typeof(zone)) { 
    3765       case TYPE_THING: 
    3766     (void) queue_attribute(zone, "ADISCONNECT", player); 
    3767     break; 
    3768       case TYPE_ROOM: 
    3769     /* check every object in the room for a connect action */ 
    3770     DOLIST(obj, Contents(zone)) { 
    3771       (void) queue_attribute(obj, "ADISCONNECT", player); 
    3772     } 
    3773     break; 
    3774       default: 
    3775     do_log(LT_ERR, 0, 0, 
    3776            T("Invalid zone #%d for %s(#%d) has bad type %d"), zone, 
    3777            Name(player), player, Typeof(zone)); 
    3778       } 
    3779     } 
    3780     /* now try the master room */ 
    3781     DOLIST(obj, Contents(MASTER_ROOM)) { 
    3782       (void) queue_attribute(obj, "ADISCONNECT", player); 
    3783     } 
    3784     clear_flag_internal(player, "CONNECTED"); 
    3785     (void) atr_add(player, "LASTLOGOUT", show_time(mudtime, 0), GOD, NOTHING); 
    3786   } else { 
    3787     /* note: when you partially disconnect, ADISCONNECTS are not executed */ 
    3788     sprintf(tbuf1, T("%s has partially disconnected."), Name(player)); 
    3789  
    3790     if (ANNOUNCE_CONNECTS) { 
    3791       if (!Dark(player)) 
    3792     notify_except(Contents(loc), player, tbuf1, NA_INTER_PRESENCE); 
    3793       /* notify contents */ 
    3794       notify_except(Contents(player), player, tbuf1, 0); 
    3795     } 
    3796   } 
    3797  
    3798   if (ANNOUNCE_CONNECTS) 
    3799     chat_player_announce(player, tbuf1, 0); 
    3800  
    3801   /* Monitor broadcasts */ 
     3791      break; 
     3792    default: 
     3793      do_log(LT_ERR, 0, 0, 
     3794         T("Invalid zone #%d for %s(#%d) has bad type %d"), zone, 
     3795         Name(player), player, Typeof(zone)); 
     3796    } 
     3797  } 
     3798  /* now try the master room */ 
     3799  DOLIST(obj, Contents(MASTER_ROOM)) { 
     3800    if (!Priv_Who(obj) && !Can_Examine(obj, player)) 
     3801      global_eval_context.wnxt[1] = NULL; 
     3802    (void) queue_attribute(obj, "ADISCONNECT", player); 
     3803    global_eval_context.wnxt[1] = myenv[1]; 
     3804  } 
     3805 
     3806  for (j = 0; j < 5; j++) 
     3807    if (myenv[j]) 
     3808      mush_free(myenv[j], "myenv"); 
     3809  for (j = 0; j < 10; j++) 
     3810    global_eval_context.wnxt[j] = NULL; 
     3811 
    38023812  /* Redundant, but better for translators */ 
    38033813  if (Dark(player)) { 
     
    38113821        T("%s has partially disconnected."), Name(player)); 
    38123822  } 
     3823 
     3824  if (ANNOUNCE_CONNECTS) { 
     3825    if (!Dark(player)) 
     3826      notify_except(Contents(loc), player, tbuf1, NA_INTER_PRESENCE); 
     3827    /* notify contents */ 
     3828    notify_except(Contents(player), player, tbuf1, 0); 
     3829    /* notify channels */ 
     3830    chat_player_announce(player, tbuf1, 0); 
     3831  } 
     3832 
     3833  /* Monitor broadcasts */ 
    38133834  if (Suspect(player)) 
    38143835    flag_broadcast("WIZARD", 0, T("GAME: Suspect %s"), tbuf1); 
     
    38173838  } else 
    38183839    flag_broadcast(0, "MONITOR", "%s %s", T("GAME:"), tbuf1); 
     3840 
     3841  if (num < 2) { 
     3842    clear_flag_internal(player, "CONNECTED"); 
     3843    (void) atr_add(player, "LASTLOGOUT", show_time(mudtime, 0), GOD, NOTHING); 
     3844  } 
    38193845  local_disconnect(player, num); 
    38203846} 
     
    49805006  while (closed) { 
    49815007    nextclosed = closed->next; 
    4982     announce_disconnect(closed->player); 
     5008    announce_disconnect(closed); 
    49835009    mush_free(closed, "descriptor"); 
    49845010    closed = nextclosed; 
  • 1.7.7/src/extmail.c

    r471 r473  
    386386  FA_Init(i, j); 
    387387  j = 0; 
    388   folder = MSFolder(ms); 
     388  folder = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 
    389389  for (mp = find_exact_starting_point(player); 
    390390       mp && (mp->to == player); mp = mp->next) { 
     
    472472  FA_Init(i, j); 
    473473  j = 0; 
    474   origfold = MSFolder(ms); 
     474  origfold = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 
    475475  for (mp = find_exact_starting_point(player); 
    476476       mp && (mp->to == player); mp = mp->next) { 
     
    522522    return; 
    523523  } 
    524   folder = MSFolder(ms); 
     524  folder = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 
    525525  FA_Init(i, j); 
    526526  j = 0; 
     
    595595  FA_Init(i, j); 
    596596  j = 0; 
    597   folder = MSFolder(ms); 
     597  folder = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 
    598598  if (SUPPORT_PUEBLO) 
    599599    notify_noenter(player, tprintf("%cSAMP%c", TAG_START, TAG_END)); 
     
    744744    return; 
    745745  } 
    746   folder = MSFolder(ms); 
     746  folder = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 
    747747  /* Mark the player's last message. This prevents a loop if 
    748748   * the forwarding command happens to forward a message back 
     
    23082308  if (ms.player && !was_sender(ms.player, mp)) 
    23092309    return 0; 
    2310   if (AllInFolder(ms) && (Folder(mp) == player_folder(player))) 
    2311     return 1; 
    23122310  mpflag = Read(mp) ? mp->read : (mp->read | M_MSUNREAD); 
    23132311  if (!All(ms) && !(ms.flags & mpflag)) 
    23142312    return 0; 
     2313  if (AllInFolder(ms) && (Folder(mp) == player_folder(player))) 
     2314    return 1; 
    23152315  if (ms.days != -1) { 
    23162316    /* Get the time now, subtract mp->time, and compare the results with 
     
    23442344  /* Now, parse the message list */ 
    23452345  if (!msglist || !*msglist) { 
    2346     /* All messages */ 
     2346    /* All messages in current folder */ 
     2347    ms->flags |= M_FOLDER; 
    23472348    return 1; 
    23482349  } 
     
    24412442    ms->flags = M_FOLDER; 
    24422443  } else if (!strcasecmp(p, "urgent")) { 
    2443     ms->flags = M_URGENT
     2444    ms->flags = M_URGENT | M_FOLDER
    24442445  } else if (!strcasecmp(p, "unread")) { 
    2445     ms->flags = M_MSUNREAD
     2446    ms->flags = M_MSUNREAD | M_FOLDER
    24462447  } else if (!strcasecmp(p, "read")) { 
    2447     ms->flags = M_MSGREAD
     2448    ms->flags = M_MSGREAD | M_FOLDER
    24482449  } else if (!strcasecmp(p, "clear") || !strcasecmp(p, "cleared")) { 
    2449     ms->flags = M_CLEARED
     2450    ms->flags = M_CLEARED | M_FOLDER
    24502451  } else if (!strcasecmp(p, "tag") || !strcasecmp(p, "tagged")) { 
    24512452    ms->flags = M_TAG; 
  • 1.7.7/src/filecopy.c

    r469 r473  
    292292  /* Windows can't rename over an existing file */ 
    293293#ifdef WIN32 
    294   if (unlink(newname) < 0) 
    295     return -1; 
     294  unlink(newname); 
    296295#endif 
    297296  return rename(origname, newname); 
  • 1.7.7/src/funmath.c

    r467 r473  
    260260    p--; 
    261261  } 
    262   /* p now points to the last non-numeric character in the string 
    263    * Move it to the first numeric character 
    264    */ 
     262  /* p now points to the last non-numeric character in the string */ 
     263  if (p == args[0] && (isdigit((unsigned char) *p) || (*p == '-'))) { 
     264    /* Special case - it's all digits, but out of range. */ 
     265    safe_str(T(e_range), buff, bp); 
     266    return; 
     267  } 
     268 
     269  /* Move it to the first numeric character */ 
    265270  p++; 
    266271  num = parse_integer(p) + 1; 
     
    302307    p--; 
    303308  } 
    304   /* p now points to the last non-numeric character in the string 
    305    * Move it to the first numeric character 
    306    */ 
     309  /* p now points to the last non-numeric character in the string */ 
     310  if (p == args[0] && (isdigit((unsigned char) *p) || (*p == '-'))) { 
     311    /* Special case - it's all digits, but out of range. */ 
     312    safe_str(T(e_range), buff, bp); 
     313    return; 
     314  } 
     315  /* Move it to the first numeric character */ 
    307316  p++; 
    308317  num = parse_integer(p) - 1; 
  • 1.7.7/src/look.c

    r469 r473  
    805805    char tbuf1[BUFFER_LEN]; 
    806806    strcpy(tbuf1, object_header(player, Zone(thing))); 
    807     notify_format(player, 
    808           T("Owner: %s  Zone: %s  %s: %d"), 
    809           object_header(player, Owner(thing)), 
    810           tbuf1, MONIES, Pennies(thing)); 
     807    if (Moneybags(player)) 
     808      notify_format(player, 
     809            T("Owner: %s  Zone: %s  %s: Unlimited"), 
     810            object_header(player, Owner(thing)), tbuf1, MONIES); 
     811    else 
     812      notify_format(player, 
     813            T("Owner: %s  Zone: %s  %s: %d"), 
     814            object_header(player, Owner(thing)), 
     815            tbuf1, MONIES, Pennies(thing)); 
    811816    notify_format(player, T("Parent: %s"), parent_chain(player, thing)); 
    812817    { 
     
    948953do_score(dbref player) 
    949954{ 
    950  
    951   notify_format(player, 
    952         T("You have %d %s."), 
    953         Pennies(player), Pennies(player) == 1 ? MONEY : MONIES); 
     955  if (Moneybags(player)) 
     956    notify_format(player, T("You have unlimited %s."), MONIES); 
     957  else 
     958    notify_format(player, 
     959          T("You have %d %s."), 
     960          Pennies(player), Pennies(player) == 1 ? MONEY : MONIES); 
    954961} 
    955962 
  • 1.7.7/src/wild.c

    r469 r473  
    247247    /* Scan for possible matches. */ 
    248248    while (*dstr) { 
    249       if (EQUAL(0, *dstr, *tstr) && atr_wild(tstr + 1, dstr + 1)) 
    250     return 1; 
     249      if (EQUAL(0, *dstr, *tstr)) { 
     250    if (!*(tstr + 1) && *(dstr + 1)) 
     251      return 0;     /* No more in pattern string, but more in target */ 
     252    if (atr_wild(tstr + 1, dstr + 1)) 
     253      return 1; 
     254      } 
    251255      if (starcount < 2 && *dstr == '`') 
    252256    return 0; 
  • 1.7.7/src/wiz.c

    r471 r473  
    10001000  notify_format(player, "Next: %d", Next(thing)); 
    10011001  notify_format(player, "Contents: %d", Contents(thing)); 
     1002  notify_format(player, "Pennies: %d", Pennies(thing)); 
    10021003 
    10031004  switch (Typeof(thing)) {