Changeset 473
- Timestamp:
- 08/16/06 01:22:59 (2 years ago)
- Files:
-
- 1.7.7/CHANGES.177 (modified) (1 diff)
- 1.7.7/Patchlevel (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennchat.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/penncmd.hlp (modified) (2 diffs)
- 1.7.7/game/txt/hlp/penntop.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennv177.hlp (modified) (2 diffs)
- 1.7.7/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.7.7/hdrs/version.h (modified) (1 diff)
- 1.7.7/src/bsd.c (modified) (9 diffs)
- 1.7.7/src/extmail.c (modified) (8 diffs)
- 1.7.7/src/filecopy.c (modified) (1 diff)
- 1.7.7/src/funmath.c (modified) (2 diffs)
- 1.7.7/src/look.c (modified) (2 diffs)
- 1.7.7/src/wild.c (modified) (1 diff)
- 1.7.7/src/wiz.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.7.7/CHANGES.177
r471 r473 18 18 19 19 ========================================================================== 20 21 Version 1.7.7 patchlevel 37 August 23, 2004 22 23 Major 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. 28 Minor 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. 37 Fixes: 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. 20 47 21 48 Version 1.7.7 patchlevel 36 August 9, 2004 1.7.7/Patchlevel
r471 r473 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.7.7p3 62 This is PennMUSH 1.7.7p37 1.7.7/game/txt/hlp/pennchat.hlp
r469 r473 153 153 @channel/chown <channel> = <new owner> 154 154 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. 157 156 The "wipe" switch clears a channel of players without deleting it. 158 157 The "buffer" switch sets the maximum number of full-length lines that 1.7.7/game/txt/hlp/penncmd.hlp
r471 r473 189 189 the master room, anywhere). 190 190 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 197 See also: @aconnect, ACTION LISTS, recv(), sent(), cmds() 192 198 & @adrop 193 199 @adrop <object> = <action list> … … 3288 3294 See also: use, @ouse, @ause, @charges, @runout 3289 3295 & @uunlock 3290 @uunlock <object> = <key>3296 @uunlock <object> 3291 3297 3292 3298 Un-use-locks the object. See also: @lock, @ulock 1.7.7/game/txt/hlp/penntop.hlp
r467 r473 745 745 746 746 These attributes show the last times you connected and disconnected from 747 the MUSH. 747 the MUSH. 748 748 & LASTSITE 749 749 & LASTIP 1.7.7/game/txt/hlp/pennv177.hlp
r471 r473 1 & 1.7.7p3 61 & 1.7.7p37 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.7.7 patchlevel 37 August 23, 2004 15 16 Major 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. 21 Minor 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. 30 Fixes: 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 14 42 Version 1.7.7 patchlevel 36 August 9, 2004 15 43 1.7.7/game/txt/hlp/pennvOLD.hlp
r471 r473 4420 4420 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 4421 4421 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 4422 36 4422 36, 37 4423 4423 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 4424 4424 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 1.7.7/hdrs/version.h
r471 r473 1 1 #define VERSION "1.7.7" 2 #define PATCHLEVEL "3 6"3 #define PATCHDATE "[08/ 09/2004]"4 #define NUMVERSION 00100700703 62 #define PATCHLEVEL "37" 3 #define PATCHDATE "[08/23/2004]" 4 #define NUMVERSION 001007007037 1.7.7/src/bsd.c
r469 r473 418 418 static const char *time_format_2(long int dt); 419 419 static void announce_connect(dbref player, int isnew, int num); 420 static void announce_disconnect( dbref player);420 static void announce_disconnect(DESC *saved); 421 421 void inactivity_check(void); 422 422 #ifdef INFO_SLAVE … … 1493 1493 T("[%d/%s/%s] Logout by %s(#%d) <Connection not dropped>"), 1494 1494 d->descriptor, d->addr, d->ip, Name(d->player), d->player); 1495 announce_disconnect(d ->player);1495 announce_disconnect(d); 1496 1496 do_mail_purge(d->player); 1497 1497 login_number--; … … 1555 1555 fcache_dump(d, fcache.quit_fcache, NULL); 1556 1556 /* Player was not allowed to log in from the connect screen */ 1557 announce_disconnect(d ->player);1557 announce_disconnect(d); 1558 1558 do_mail_purge(d->player); 1559 1559 } … … 3721 3721 3722 3722 static void 3723 announce_disconnect( dbref player)3723 announce_disconnect(DESC *saved) 3724 3724 { 3725 3725 dbref loc; … … 3729 3729 dbref zone, obj; 3730 3730 int j; 3731 3731 char *myenv[5]; 3732 dbref player; 3733 3734 player = saved->player; 3732 3735 loc = Location(player); 3733 3736 if (!GoodObject(loc)) … … 3739 3742 if (d->connected && (d->player == player)) 3740 3743 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]; 3761 3790 } 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 3802 3812 /* Redundant, but better for translators */ 3803 3813 if (Dark(player)) { … … 3811 3821 T("%s has partially disconnected."), Name(player)); 3812 3822 } 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 */ 3813 3834 if (Suspect(player)) 3814 3835 flag_broadcast("WIZARD", 0, T("GAME: Suspect %s"), tbuf1); … … 3817 3838 } else 3818 3839 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 } 3819 3845 local_disconnect(player, num); 3820 3846 } … … 4980 5006 while (closed) { 4981 5007 nextclosed = closed->next; 4982 announce_disconnect(closed ->player);5008 announce_disconnect(closed); 4983 5009 mush_free(closed, "descriptor"); 4984 5010 closed = nextclosed; 1.7.7/src/extmail.c
r471 r473 386 386 FA_Init(i, j); 387 387 j = 0; 388 folder = MSFolder(ms);388 folder = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 389 389 for (mp = find_exact_starting_point(player); 390 390 mp && (mp->to == player); mp = mp->next) { … … 472 472 FA_Init(i, j); 473 473 j = 0; 474 origfold = MSFolder(ms);474 origfold = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 475 475 for (mp = find_exact_starting_point(player); 476 476 mp && (mp->to == player); mp = mp->next) { … … 522 522 return; 523 523 } 524 folder = MSFolder(ms);524 folder = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 525 525 FA_Init(i, j); 526 526 j = 0; … … 595 595 FA_Init(i, j); 596 596 j = 0; 597 folder = MSFolder(ms);597 folder = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 598 598 if (SUPPORT_PUEBLO) 599 599 notify_noenter(player, tprintf("%cSAMP%c", TAG_START, TAG_END)); … … 744 744 return; 745 745 } 746 folder = MSFolder(ms);746 folder = AllInFolder(ms) ? player_folder(player) : MSFolder(ms); 747 747 /* Mark the player's last message. This prevents a loop if 748 748 * the forwarding command happens to forward a message back … … 2308 2308 if (ms.player && !was_sender(ms.player, mp)) 2309 2309 return 0; 2310 if (AllInFolder(ms) && (Folder(mp) == player_folder(player)))2311 return 1;2312 2310 mpflag = Read(mp) ? mp->read : (mp->read | M_MSUNREAD); 2313 2311 if (!All(ms) && !(ms.flags & mpflag)) 2314 2312 return 0; 2313 if (AllInFolder(ms) && (Folder(mp) == player_folder(player))) 2314 return 1; 2315 2315 if (ms.days != -1) { 2316 2316 /* Get the time now, subtract mp->time, and compare the results with … … 2344 2344 /* Now, parse the message list */ 2345 2345 if (!msglist || !*msglist) { 2346 /* All messages */ 2346 /* All messages in current folder */ 2347 ms->flags |= M_FOLDER; 2347 2348 return 1; 2348 2349 } … … 2441 2442 ms->flags = M_FOLDER; 2442 2443 } else if (!strcasecmp(p, "urgent")) { 2443 ms->flags = M_URGENT ;2444 ms->flags = M_URGENT | M_FOLDER; 2444 2445 } else if (!strcasecmp(p, "unread")) { 2445 ms->flags = M_MSUNREAD ;2446 ms->flags = M_MSUNREAD | M_FOLDER; 2446 2447 } else if (!strcasecmp(p, "read")) { 2447 ms->flags = M_MSGREAD ;2448 ms->flags = M_MSGREAD | M_FOLDER; 2448 2449 } else if (!strcasecmp(p, "clear") || !strcasecmp(p, "cleared")) { 2449 ms->flags = M_CLEARED ;2450 ms->flags = M_CLEARED | M_FOLDER; 2450 2451 } else if (!strcasecmp(p, "tag") || !strcasecmp(p, "tagged")) { 2451 2452 ms->flags = M_TAG; 1.7.7/src/filecopy.c
r469 r473 292 292 /* Windows can't rename over an existing file */ 293 293 #ifdef WIN32 294 if (unlink(newname) < 0) 295 return -1; 294 unlink(newname); 296 295 #endif 297 296 return rename(origname, newname); 1.7.7/src/funmath.c
r467 r473 260 260 p--; 261 261 } 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 */ 265 270 p++; 266 271 num = parse_integer(p) + 1; … … 302 307 p--; 303 308 } 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 */ 307 316 p++; 308 317 num = parse_integer(p) - 1; 1.7.7/src/look.c
r469 r473 805 805 char tbuf1[BUFFER_LEN]; 806 806 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)); 811 816 notify_format(player, T("Parent: %s"), parent_chain(player, thing)); 812 817 { … … 948 953 do_score(dbref player) 949 954 { 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); 954 961 } 955 962 1.7.7/src/wild.c
r469 r473 247 247 /* Scan for possible matches. */ 248 248 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 } 251 255 if (starcount < 2 && *dstr == '`') 252 256 return 0; 1.7.7/src/wiz.c
r471 r473 1000 1000 notify_format(player, "Next: %d", Next(thing)); 1001 1001 notify_format(player, "Contents: %d", Contents(thing)); 1002 notify_format(player, "Pennies: %d", Pennies(thing)); 1002 1003 1003 1004 switch (Typeof(thing)) {
