Changeset 279
- Timestamp:
- 04/19/06 22:49:43 (3 years ago)
- Files:
-
- 1.7.3/CHANGES (modified) (1 diff)
- 1.7.3/Configure (modified) (6 diffs)
- 1.7.3/MANIFEST (modified) (1 diff)
- 1.7.3/Patchlevel (modified) (1 diff)
- 1.7.3/config_h.SH (modified) (2 diffs)
- 1.7.3/game/txt/hlp/penncmd.hlp (modified) (2 diffs)
- 1.7.3/game/txt/hlp/pennflag.hlp (modified) (3 diffs)
- 1.7.3/game/txt/hlp/pennfunc.hlp (modified) (4 diffs)
- 1.7.3/game/txt/hlp/penntop.hlp (modified) (3 diffs)
- 1.7.3/game/txt/hlp/pennvers.hlp (modified) (3 diffs)
- 1.7.3/game/txt/nws/pennmush.nws (modified) (2 diffs)
- 1.7.3/hdrs/attrib.h (modified) (1 diff)
- 1.7.3/hdrs/command.h (modified) (1 diff)
- 1.7.3/hdrs/externs.h (modified) (1 diff)
- 1.7.3/hdrs/function.h (modified) (1 diff)
- 1.7.3/hdrs/switches.h (modified) (1 diff)
- 1.7.3/hdrs/version.h (modified) (1 diff)
- 1.7.3/options.h.dist (modified) (2 diffs)
- 1.7.3/src/SWITCHES (modified) (1 diff)
- 1.7.3/src/atr_tab.c (modified) (2 diffs)
- 1.7.3/src/boolexp.c (modified) (1 diff)
- 1.7.3/src/bsd.c (modified) (21 diffs)
- 1.7.3/src/cmds.c (modified) (2 diffs)
- 1.7.3/src/command.c (modified) (3 diffs)
- 1.7.3/src/comp_w8.c (added)
- 1.7.3/src/compress.c (modified) (1 diff)
- 1.7.3/src/conf.c (modified) (1 diff)
- 1.7.3/src/db.c (modified) (18 diffs)
- 1.7.3/src/extchat.c (modified) (6 diffs)
- 1.7.3/src/extmail.c (modified) (6 diffs)
- 1.7.3/src/filecopy.c (modified) (1 diff)
- 1.7.3/src/flags.c (modified) (2 diffs)
- 1.7.3/src/function.c (modified) (3 diffs)
- 1.7.3/src/fundb.c (modified) (2 diffs)
- 1.7.3/src/funlist.c (modified) (1 diff)
- 1.7.3/src/funmisc.c (modified) (2 diffs)
- 1.7.3/src/game.c (modified) (9 diffs)
- 1.7.3/src/help.c (modified) (3 diffs)
- 1.7.3/src/local.dst (modified) (3 diffs)
- 1.7.3/src/log.c (modified) (1 diff)
- 1.7.3/src/move.c (modified) (2 diffs)
- 1.7.3/src/parse.c (modified) (1 diff)
- 1.7.3/src/set.c (modified) (1 diff)
- 1.7.3/src/speech.c (modified) (1 diff)
- 1.7.3/src/strutil.c (modified) (4 diffs)
- 1.7.3/src/switchinc.c (modified) (1 diff)
- 1.7.3/win32/cmds.h (modified) (1 diff)
- 1.7.3/win32/funs.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.7.3/CHANGES
r277 r279 17 17 18 18 ========================================================================== 19 20 Version 1.7.3 patchlevel 10 November 20, 2000 21 22 Major Changes: 23 * Improved detection of errors saving the game. If any problems 24 are encountered, the save is aborted, and online admins notified so 25 they can fix the problem before finding out about it too late. [SW] 26 Flags: 27 * The INHERIT flag has been renamed TRUST, which better describes 28 its function. INHERIT remains as an alias. 29 Commands: 30 * @chan now takes /ungag, /unhide, and /unmute as well as the 31 usual @chan/gag <channel>=no. By David@M*U*S*H. 32 Minor Changes: 33 * money() called on a no_pay player returns the value of 34 MAX_PENNIES to ease softcode checks. Suggested by Oriens@Alexandria. 35 * Removed help and &help entries from the distributed pennmush.nws 36 because people will generally want to override them anyway 37 and we shouldn't introduce problems. Suggested by Jeff Heinen. 38 * safe_str and friends optimize trivial 0 and 1 letter strings. [SW] 39 * A version of word-based compression that's almost 8-bit clean 40 is now included. [SW] 41 * We now use stricmp and friends for strcasecmp and friends on 42 Win32, rather than roll our own. [SW] 43 Fixes: 44 * @mail aliases couldn't be used by players who didn't have 45 permissions to see the alias members, which is wrong. 46 Fixed now. Report by Grinna@M*U*S*H. 47 * lnum(1) and lnum(0,0) were broken. Report by Jeff Ferrell 48 * Help updates. [SW] 49 * @set obj/notanattribute=flag now returns a 'No such attribute' error. 50 Reported by David@M*U*S*H. [SW] 51 * Help file indexing tries to detect files that aren't in the right 52 format. [SW] 53 * function restrictions were checking the wrong object. [SW] 54 * objmem and playermem counted eval-locks and atr-locks incorrectly. 55 Reported by Javin@DynamixMUSH. [SW] 56 * Fixes to win32 NT_TCP stuff. [NJG] 57 * Rare memory leak in do_page fixed by David@M*U*S*H. 19 58 20 59 Version 1.7.3 patchlevel 9 November 20, 2000 1.7.3/Configure
r275 r279 316 316 d_sigcld='' 317 317 d_signalproto='' 318 d_sigprocmask='' 318 319 d_oldsock='' 319 320 d_socket='' … … 356 357 i_niin='' 357 358 i_sysin='' 359 i_setjmp='' 358 360 i_stddef='' 359 361 i_stdlib='' … … 4769 4771 $rm -f try* 4770 4772 4773 echo " " 4774 : see if we have sigprocmask 4775 if set sigprocmask val -f d_sigprocmask; eval $csym; $val; then 4776 echo 'sigprocmask() found.' >&4 4777 val="$define" 4778 else 4779 echo 'sigprocmask NOT found.' >&4 4780 val="$undef" 4781 fi 4782 $cat > set.c <<'EOP' 4783 #include <stdio.h> 4784 #include <sys/types.h> 4785 #include <signal.h> 4786 main() 4787 { 4788 sigset_t mask, oldmask; 4789 sigprocmask(SIG_SETMASK, &mask, &oldmask); 4790 } 4791 EOP 4792 if $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1; then 4793 : 4794 else 4795 echo "But you don't seem to have a working sigprocmask." >&4 4796 val="$undef" 4797 fi 4798 set d_sigprocmask; eval $setvar 4799 $rm -f set set$_o set.c 4800 4771 4801 socketlib='' 4772 4802 sockethdr='' … … 5547 5577 eval $setvar 5548 5578 5579 : see if setjmp.h can be included 5580 set setjmp.h i_setjmp 5581 eval $inhdr 5549 5582 : see if stdarg is available 5550 5583 echo " " … … 6477 6510 d_sigcld='$d_sigcld' 6478 6511 d_signalproto='$d_signalproto' 6512 d_sigprocmask='$d_sigprocmask' 6479 6513 d_socket='$d_socket' 6480 6514 d_socklen='$d_socklen' … … 6534 6568 i_memory='$i_memory' 6535 6569 i_niin='$i_niin' 6570 i_setjmp='$i_setjmp' 6536 6571 i_sgtty='$i_sgtty' 6537 6572 i_stdarg='$i_stdarg' 1.7.3/MANIFEST
r277 r279 58 58 src/comp_h.c 59 59 src/comp_w.c 60 src/comp_w8.c 60 61 src/compress.c 61 62 src/conf.c 1.7.3/Patchlevel
r277 r279 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.7.3p 92 This is PennMUSH 1.7.3p10 1.7.3/config_h.SH
r275 r279 637 637 #$d_signalproto CAN_PROTOTYPE_SIGNAL /**/ 638 638 639 /* HAS_SIGPROCMASK: 640 * This symbol, if defined, indicates that POSIX's sigprocmask() routine 641 * is available. 642 */ 643 #$d_sigprocmask HAS_SIGPROCMASK /**/ 644 639 645 /* HAS_SOCKLEN_T: 640 646 * If defined, this system has the socklen_t type. … … 736 742 #$i_memory I_MEMORY /**/ 737 743 744 /* I_SETJMP: 745 * This symbol, if defined, indicates to the C program that it can 746 * include <setjmp.h> and have things work right. 747 */ 748 #$i_setjmp I_SETJMP /**/ 749 738 750 /* USE_TIOCNOTTY: 739 751 * This symbol, if defined indicate to the C program that the ioctl() 1.7.3/game/txt/hlp/penncmd.hlp
r277 r279 488 488 489 489 Whenever an object besides a player is @chzoned to a zone object, 490 the WIZARD, ROYALTY, and INHERIT flags will be reset, as will all490 the WIZARD, ROYALTY, and TRUST flags will be reset, as will all 491 491 @power's (for security purposes). For similar reasons, it is strongly 492 492 recommended that you do not @chzone admin- or wizard-owned objects to … … 3367 3367 The person using the object must pass its uselock; no inheritance check 3368 3368 is necessary. This is may be done remotely, by using a dbref number; 3369 it provides an easy way for non- INHERIT objects to perform commands on3370 INHERIT objects.3369 it provides an easy way for non-TRUST objects to perform commands on 3370 TRUST objects. 3371 3371 3372 3372 If the person fails to pass the object's uselock, the object's 1.7.3/game/txt/hlp/pennflag.hlp
r273 r279 40 40 A - Abode, Ansi C - Chown_Ok, Color D - Dark 41 41 E - Exit (type) F - Floating, Fixed G - Going 42 H - Haven I - InheritJ - Jump_Ok, Judge42 H - Haven I - Trust/Inherit J - Jump_Ok, Judge 43 43 L - Link_Ok M - Monitor N - Nospoof, No_Tel, No_Leave 44 44 O - Opaque P - Player (type) Q - Quiet … … 308 308 See also: @haven, kill 309 309 & INHERIT 310 Flag: INHERIT (all types) 311 312 Inherit is a security flag used to prevent objects without authorization 310 & TRUST 311 Flag: TRUST (all types) 312 313 TRUST is a security flag used to prevent objects without authorization 313 314 from using @force, @set, and @trigger on other objects. 314 Authorization is successful if: 315 316 1. The enactor is WIZARD. 317 2. The enactor's owner is INHERIT. 318 2. The enactor is INHERIT. 319 3. The target is not INHERIT. 320 321 Only INHERIT or WIZARD objects may force their owners. Players can 322 always @force, @set, and @trigger their objects. 323 324 Read "help Inherit2" for more. 325 315 Authorization is successful if any of these are true: 316 317 1. The enactor is WIZARD ("wizards control all"). 318 2. The enactor's owner is TRUST ("the player trusts all their objects"). 319 3. The enactor is TRUST ("this object is trusted"). 320 4. The target is not TRUST ("this object isn't trusted"). 321 322 That is, if a non-wizard player is set TRUST, all of their objects 323 may act on each other (case 2). Otherwise, only TRUST objects may act 324 on TRUST objects (case 3) but any of the player's object may act on 325 non-TRUST objects (case 4). 326 327 Only TRUST or WIZARD objects may force their owners. 328 Players can always @force, @set, and @trigger their objects. 329 330 This flag used to be called INHERIT, and INHERIT is still an alias 331 for it, but TRUST better describes its action. 332 333 Read "help trust2" for more. 334 & TRUST2 326 335 & INHERIT2 327 336 328 337 Authorization is only denied if the enactor is neither a player nor 329 INHERIT, and the target is WIZARD, INHERIT, or is a player. 330 The INHERIT protection against @trigger may be overridden by setting 338 TRUST, and the target is WIZARD, TRUST, or is a player. 339 340 The TRUST protection against @trigger may be overridden by setting 331 341 the target object LINK_OK. 342 332 343 Objects which are WIZARD are not subject to any special criterion, 333 although they are automatically considered to be INHERIT.344 although they are automatically considered to be TRUST. 334 345 The normal criteria for object control still apply. 335 346 336 For zoned objects, the INHERIT flag protects against an object from347 For zoned objects, the TRUST flag protects against an object from 337 348 being controlled by anything not owned by its owner. This prevents 338 349 someone who controls a zone from doing things like @forcing an 339 INHERIT object to @force its owner.350 TRUST object to @force its owner. 340 351 & JUDGE 341 352 & JURY_OK … … 361 372 362 373 If a room or object is LINK_OK, anyone can link exits to it (but 363 still not from it). Also, LINK_OK overrides the INHERIT protection374 still not from it). Also, LINK_OK overrides the TRUST protection 364 375 against @trigger (although not @force or @set). This also allows 365 376 others to @parent their objects to the thing set LINK_OK. 366 377 367 See @link, INHERIT, @parent, PARENTS378 See @link, TRUST, @parent, PARENTS 368 379 & MONITOR 369 380 Flag: MONITOR (players) 1.7.3/game/txt/hlp/pennfunc.hlp
r277 r279 2141 2141 & R() 2142 2142 & R-FUNCTION 2143 r(< number>)2143 r(<register>) 2144 2144 2145 2145 The r() function is used to access "local registers", and returns 2146 the contents of the specified register. There are tensuch registers,2147 numbered 0 through 9 .2146 the contents of the specified register. There are 36 such registers, 2147 numbered 0 through 9, and A through Z. 2148 2148 2149 2149 The '%qN' percent-substitution can also be used to access these local 2150 registers, where N is register < number> needed.2150 registers, where N is register <register> needed. 2151 2151 2152 2152 See "help SETQ()" for details about registers. … … 2410 2410 & SETQ() 2411 2411 & SETR() 2412 setq(< number>,<string>)2413 setr(< number>,<string>)2412 setq(<register>,<string>) 2413 setr(<register>,<string>) 2414 2414 2415 2415 The setq() and setr() functions are used to copy strings into local … … 2417 2417 function. setr() returns the value stored. 2418 2418 2419 There are ten local registers, numbered 0 through 9. They are cleared 2420 at the start of each new queue cycle (i.e. whenever a new command is 2421 evaluated). They are most useful for storing complex function evaluations 2422 which are used repeatedly within a single command. 2419 There are thirtysix local registers, numbered 0 through 9 and A through Z. 2420 They are cleared at the start of each new queue cycle (i.e. whenever 2421 a new command is evaluated). They are most useful for storing 2422 complex function evaluations which are used repeatedly within a 2423 single command. 2423 2424 2424 2425 Registers set via setq() or setr() can be accessed via the r() function, … … 2455 2456 time of the branch, so the code: 2456 2457 2457 say set q(0,foo)%q0; @wait 0=say %q0; say setq(0,bar)%q02458 say setr(a,foo); @wait 0=say %qa; say setr(a,bar) 2458 2459 2459 2460 produces the following when executed by an object: 1.7.3/game/txt/hlp/penntop.hlp
r277 r279 308 308 4. If V is Royalty, O must be Royalty 309 309 5. If V and O are owned by the same player: 310 5a. If V is not inherit, O controls V311 5b. If V is inherit, O must be inherit or the player must be inherit312 6. If V is on a zone, and isn't a player and isn't inherit,310 5a. If V is not TRUST, O controls V 311 5b. If V is TRUST, O must be TRUST or the player must be TRUST 312 6. If V is on a zone, and isn't a player and isn't TRUST, 313 313 O controls V if O passes the zone-lock of the zone. 314 314 7. If V is owned by a ZONE player, and V isn't a player, … … 317 317 There's also one special case: anyone can @link an unlinked exit, 318 318 319 See also: controls(), INHERIT, ZONES, ZONE MASTERS319 See also: controls(), TRUST, ZONES, ZONE MASTERS 320 320 & COSTS 321 321 These are usually: … … 1649 1649 to it. This, however, does not refund the original creator's money or 1650 1650 quota, as does normal @chown. Using a Zone Master instead of a ZMO 1651 enables a higher degree of security within the zone, and allows INHERIT1651 enables a higher degree of security within the zone, and allows TRUST 1652 1652 objects to be placed in the zone, since all objects within the zone have 1653 1653 the same owner. $commands are not, however, inherited off the Zone Master. 1.7.3/game/txt/hlp/pennvers.hlp
r277 r279 1 1 & changes 2 & 1.7.3p 92 & 1.7.3p10 3 3 This is a list of changes in this patchlevel which are probably of 4 4 interest to players. More information about new commands and functions … … 10 10 be read in 'help patchlevels'. 11 11 12 Version 1.7.3 patchlevel 10 November 20, 2000 13 14 Major Changes: 15 * Improved detection of errors saving the game. If any problems 16 are encountered, the save is aborted, and online admins notified so 17 they can fix the problem before finding out about it too late. [SW] 18 Flags: 19 * The INHERIT flag has been renamed TRUST, which better describes 20 its function. INHERIT remains as an alias. 21 Commands: 22 * @chan now takes /ungag, /unhide, and /unmute as well as the 23 usual @chan/gag <channel>=no. By David@M*U*S*H. 24 Minor Changes: 25 * money() called on a no_pay player returns the value of 26 MAX_PENNIES to ease softcode checks. Suggested by Oriens@Alexandria. 27 * Removed help and &help entries from the distributed pennmush.nws 28 because people will generally want to override them anyway 29 and we shouldn't introduce problems. Suggested by Jeff Heinen. 30 * safe_str and friends optimize trivial 0 and 1 letter strings. [SW] 31 * A version of word-based compression that's almost 8-bit clean 32 is now included. [SW] 33 * We now use stricmp and friends for strcasecmp and friends on 34 Win32, rather than roll our own. [SW] 35 Fixes: 36 * @mail aliases couldn't be used by players who didn't have 37 permissions to see the alias members, which is wrong. 38 Fixed now. Report by Grinna@M*U*S*H. 39 * lnum(1) and lnum(0,0) were broken. Report by Jeff Ferrell 40 * Help updates. [SW] 41 * @set obj/notanattribute=flag now returns a 'No such attribute' error. 42 Reported by David@M*U*S*H. [SW] 43 * Help file indexing tries to detect files that aren't in the right 44 format. [SW] 45 * function restrictions were checking the wrong object. [SW] 46 * objmem and playermem counted eval-locks and atr-locks incorrectly. 47 Reported by Javin@DynamixMUSH. [SW] 48 * Fixes to win32 NT_TCP stuff. [NJG] 49 * Rare memory leak in do_page fixed by David@M*U*S*H. 50 51 & 1.7.3p9 12 52 Version 1.7.3 patchlevel 9 November 20, 2000 13 53 … … 4164 4204 4165 4205 & patchlevels 4166 1.7.3: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 4206 1.7.3: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 4167 4207 1.7.2: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 4168 4208 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 1.7.3/game/txt/nws/pennmush.nws
r261 r279 1 & help2 3 --------------------------- MUSH News Topics ------------------------------4 ---------------------------------------------------------------------------5 6 1 & code 7 2 See 'help code' … … 9 4 & changes 10 5 See 'help changes' 11 & &help12 This is the ANEWS index.1.7.3/hdrs/attrib.h
r277 r279 20 20 extern void do_attribute_info _((dbref player, char *name)); 21 21 extern void do_list_attribs _((dbref player, int lc)); 22 extern char *list_attribs _((int lc)); 22 23 23 24 /* From attrib.c */ 1.7.3/hdrs/command.h
r269 r279 213 213 _((dbref player, dbref cause, char *string, int fromport)); 214 214 extern void do_list_commands _((dbref player, int lc)); 215 extern char *list_commands _((int lc)); 215 216 extern int command_check_byname _((dbref player, const char *name)); 216 217 extern int restrict_command _((const char *name, const char *restriction)); 1.7.3/hdrs/externs.h
r277 r279 24 24 #include "confmagic.h" 25 25 #ifndef HAS_STRCASECMP 26 #ifdef WIN32 27 #define strcasemp(s1,s2) _stricmp((s1), (s2)) 28 #define strncasecmp(s1,s2,n) _strnicmp((s1), (s2), (n)) 29 #else 26 30 extern int strcasecmp _((const char *s1, const char *s2)); 27 31 extern int strncasecmp _((const char *s1, const char *s2, Size_t n)); 32 #endif 28 33 #endif 29 34 1.7.3/hdrs/function.h
r277 r279 78 78 extern void do_function_restore _((dbref player, const char *name)); 79 79 extern void do_list_functions _((dbref player, int lc)); 80 extern char *list_functions _((int lc)); 80 81 extern void do_function _((dbref player, char *name, char **argv)); 81 82 extern void do_function_toggle _((dbref player, char *name, int toggle)); 1.7.3/hdrs/switches.h
r277 r279 114 114 #define SWITCH_UNCLEAR 114 115 115 #define SWITCH_UNFOLDER 115 116 #define SWITCH_UNTAG 116 117 #define SWITCH_URGENT 117 118 #define SWITCH_USEFLAG 118 119 #define SWITCH_WHAT 119 120 #define SWITCH_WIPE 120 121 #define SWITCH_WIZ 121 122 #define SWITCH_WIZARD 122 123 #define SWITCH_YES 123 124 #define SWITCH_ZONE 124 116 #define SWITCH_UNGAG 116 117 #define SWITCH_UNHIDE 117 118 #define SWITCH_UNMUTE 118 119 #define SWITCH_UNTAG 119 120 #define SWITCH_URGENT 120 121 #define SWITCH_USEFLAG 121 122 #define SWITCH_WHAT 122 123 #define SWITCH_WIPE 123 124 #define SWITCH_WIZ 124 125 #define SWITCH_WIZARD 125 126 #define SWITCH_YES 126 127 #define SWITCH_ZONE 127 1.7.3/hdrs/version.h
r277 r279 1 #define VERSION "PennMUSH version 1.7.3 patchlevel 9[11/20/2000]"2 #define SHORTVN "PennMUSH 1.7.3p 9"1 #define VERSION "PennMUSH version 1.7.3 patchlevel 10 [11/20/2000]" 2 #define SHORTVN "PennMUSH 1.7.3p10" 1.7.3/options.h.dist
r277 r279 80 80 * 1 - the default Huffman compression which has been in use since 81 81 * pl10. In theory, this should be the best compression, 82 * possibly at the cost of some speed. Sometimes has trouble 83 * on linux systems for some reason. 82 * possibly at the cost of some speed. It is also 8-bit clean, 83 * and thus suitable for locales that use extended character sets. 84 * Sometimes has trouble on some linux systems for some reason. 84 85 * 2 - the bigram compression from pl9 and earlier (but autotuned) 85 86 * This should be intermediate in compression and speed, and … … 92 93 * is worse than Huffman for small dbs (<1.5Mb of text), but 93 94 * better for larger dbs. Win32 systems must use this. 95 * 4 - Raevnos's almost 8-bit clean version of the word-based algorithm. 96 * Prefer 3 unless you need extended characters. This algorithm 97 * can encode all characters except 0x06. 94 98 * 0 - No compression at all. Very fast, but your db in memory 95 99 * will be big - at least as large as your on-disk db. 96 100 * Possibly suitable for the building stages of a small MUSH. 101 * This should be 8-bit clean, too. 97 102 * You can change this at any time, with no worries. It only affects 98 103 * the in-memory compression of attribute/mail text, not the disk 99 * db compression. Recommend to keep it at 1. 104 * db compression. Recommend to keep it at 1. When in doubt, try them 105 * all, and chekc @uptime's memory usage stats for the most efficient 106 * choice among those that are stable for you. 100 107 */ 101 108 #define COMPRESSION_TYPE 1 1.7.3/src/SWITCHES
r277 r279 113 113 TRACE 114 114 UNCLEAR 115 UNHIDE 116 UNGAG 115 117 UNFOLDER 118 UNMUTE 116 119 UNTAG 117 120 URGENT 1.7.3/src/atr_tab.c
r273 r279 321 321 int lc; 322 322 { 323 notify(player, list_attribs(lc)); 324 } 325 326 char * 327 list_attribs(lc) 328 int lc; 329 { 323 330 ATTR *ap; 324 331 char *ptrs[BUFFER_LEN / 2]; 325 char buff[BUFFER_LEN];332 static char buff[BUFFER_LEN]; 326 333 char *bp; 327 334 int nptrs = 0, i; … … 347 354 } 348 355 *bp = '\0'; 349 notify(player, buff);350 356 hashfree(&temp); 351 } 357 return buff; 358 } 1.7.3/src/boolexp.c
r275 r279 203 203 case BOOLEXP_ATR: 204 204 case BOOLEXP_EVAL: 205 return sizeof(struct boolexp) + sizeof(struct boolatr) - BUFFER_LEN+205 return sizeof(struct boolexp) + sizeof(struct boolatr) + 206 206 strlen(b->atr_lock->name) + 1 + 207 207 #ifdef macintosh 1.7.3/src/bsd.c
r277 r279 3 3 /* Windows NT users may uncomment this define to get the native network i/o 4 4 * thread model instead of the bsd socket layer, for vastly better 5 * performance. Doesn't work on Win 95/98. By Nick Gammon 5 * performance. Doesn't work on Win 95/98. By Nick Gammon 6 6 */ 7 7 /* #define NT_TCP */ … … 93 93 #endif 94 94 #endif 95 95 #ifdef I_SETJMP 96 #include <setjmp.h> 97 #endif 96 98 97 99 #include "conf.h" … … 395 397 /* Unlimit file descriptors. */ 396 398 /* Ultrix 4.4 and others may have getrlimit but may not be able to 397 * change number of file descriptors 399 * change number of file descriptors 398 400 */ 399 401 #ifdef RLIMIT_NOFILE … … 421 423 422 424 #ifdef NT_TCP 423 BOOL 424 IsValidAddress(const void *lp, UINT nBytes, BOOL bReadWrite) 425 BOOL IsValidAddress(const void *lp, UINT nBytes, BOOL bReadWrite) 425 426 { 426 427 return (lp != NULL && … … 557 558 558 559 /* If we have setlocale, call it to set locale info 559 * from environment variables 560 * from environment variables 560 561 */ 561 562 #ifdef HAS_SETLOCALE … … 798 799 /*#ifdef macintosh 799 800 int i; 800 801 801 802 for ( i = 0; i < NSIG; i++ ) 802 803 signal( i, SIG_IGN ); … … 2074 2075 *bp = '\0'; 2075 2076 if (Forbidden_Site(tbuf1) || Forbidden_Site(tbuf2)) { 2076 do_log(LT_CONN, 0, 0, T("[%d/%s/%s] Refused connection (remote port %s)"), 2077 newsock, tbuf1, tbuf2, hi->port); 2077 do_log(LT_CONN, 0, 0, "[%d/%s/%s] %s (%s %s)", 2078 newsock, tbuf1, tbuf2, T("Refused connection"), T("remote port"), 2079 hi ? hi->port : T("(unknown)")); 2078 2080 shutdown(newsock, 2); 2079 2081 closesocket(newsock); … … 4028 4030 /* A brand new player created. */ 4029 4031 sprintf(tbuf1, T("%s created."), Name(player)); 4030 flag_broadcast(0, PLAYER_MONITOR, " GAME: %s", tbuf1);4032 flag_broadcast(0, PLAYER_MONITOR, "%s %s", T("GAME:"), tbuf1); 4031 4033 if (Suspect(player)) 4032 4034 flag_broadcast(WIZARD, 0, T("GAME: Suspect %s created."), Name(player)); … … 4051 4053 if (Dark(player)) { 4052 4054 #ifdef ROYALTY_FLAG 4053 flag_broadcast(WIZARD | ROYALTY, PLAYER_MONITOR, "GAME: %s", tbuf1); 4055 flag_broadcast(WIZARD | ROYALTY, PLAYER_MONITOR, "%s %s", T("GAME:"), 4056 tbuf1); 4054 4057 #else 4055 flag_broadcast(WIZARD, PLAYER_MONITOR, " GAME: %s", tbuf1);4058 flag_broadcast(WIZARD, PLAYER_MONITOR, "%s %s", T("GAME:"), tbuf1); 4056 4059 #endif 4057 4060 } else 4058 flag_broadcast(0, PLAYER_MONITOR, " GAME: %s", tbuf1);4061 flag_broadcast(0, PLAYER_MONITOR, "%s %s", T("GAME:"), tbuf1); 4059 4062 4060 4063 /* tell players on a channel when someone connects */ … … 4229 4232 if (Dark(player)) { 4230 4233 #ifdef ROYALTY_FLAG 4231 flag_broadcast(WIZARD | ROYALTY, PLAYER_MONITOR, "GAME: %s", tbuf1); 4234 flag_broadcast(WIZARD | ROYALTY, PLAYER_MONITOR, "%s %s", T("GAME:"), 4235 tbuf1); 4232 4236 #else 4233 flag_broadcast(WIZARD, PLAYER_MONITOR, " GAME: %s", tbuf1);4237 flag_broadcast(WIZARD, PLAYER_MONITOR, "%s %s", T("GAME:"), tbuf1); 4234 4238 #endif 4235 4239 } else 4236 flag_broadcast(0, PLAYER_MONITOR, " GAME: %s", tbuf1);4240 flag_broadcast(0, PLAYER_MONITOR, "%s %s", T("GAME:"), tbuf1); 4237 4241 4238 4242 /* tell players on channel that someone's left */ … … 4451 4455 { 4452 4456 /* Return the status of the pueblo flag on the least idle descriptor we 4453 * find that matches the player's dbref. 4457 * find that matches the player's dbref. 4454 4458 */ 4455 4459 DESC *d; … … 4559 4563 FUNCTION(fun_ports) 4560 4564 { 4561 /* returns a list of the network descriptors that a player is 4565 /* returns a list of the network descriptors that a player is 4562 4566 * connected to (wizard-only) 4563 4567 */ … … 4735 4739 4736 4740 nac.u = ChanUsers(channel); 4737 nac.checkquiet = (flags & 0x1) ? 1 : 0;4741 nac.checkquiet = (flags & CU_QUIET) ? 1 : 0; 4738 4742 notify_anything(player, na_channel, &nac, 4739 (flags & 0x2) ? ns_esnotify : NULL, 0, tbuf1);4743 (flags & CU_HIDE) ? ns_esnotify : NULL, 0, tbuf1); 4740 4744 } 4741 4745 … … 4797 4801 4798 4802 /* Feh. We need to do some sort of privilege checking, so that 4799 * if mortals can't do '@channel/who wizard', they can't do 4803 * if mortals can't do '@channel/who wizard', they can't do 4800 4804 * 'think cwho(wizard)' either. The first approach that comes to 4801 4805 * mind is the following: … … 5032 5036 * * dump_reboot_db: Dumps descriptor_list to REBOOTFILE 5033 5037 */ 5038 #ifdef I_SETJMP 5039 extern jmp_buf db_err; 5040 #endif 5034 5041 void 5035 5042 dump_reboot_db() … … 5038 5045 DESC *d; 5039 5046 5040 f = fopen(REBOOTFILE, "w"); 5041 5042 /* This shouldn't happen */ 5043 if (!f) { 5047 #ifdef I_SETJMP 5048 if (setjmp(db_err)) { 5044 5049 flag_broadcast(0, 0, T("GAME: Error writing reboot database!")); 5045 5050 exit(0); 5046 } 5047 putref(f, sock); 5048 putref(f, maxd); 5049 5050 /* First, iterate through all descriptors to get to the end 5051 * we do this so the descriptor_list isn't reversed on reboot 5052 */ 5053 for (d = descriptor_list; d && d->next; d = d->next) ; 5054 5055 /* Second, we iterate backwards from the end of descriptor_list 5056 * which is now in the d variable. 5057 */ 5058 for (; d != NULL; d = d->prev) { 5059 5060 putref(f, d->descriptor); 5061 putref(f, d->connected_at); 5062 putref(f, d->hide); 5063 putref(f, d->cmds); 5064 if (GoodObject(d->player)) 5065 putref(f, d->player); 5066 else 5067 putref(f, -1); 5068 putref(f, d->last_time); 5069 if (d->output_prefix) 5070 putstring(f, d->output_prefix); 5071 else 5072 putstring(f, "__NONE__"); 5073 if (d->output_suffix) 5074 putstring(f, d->output_suffix); 5075 else 5076 putstring(f, "__NONE__"); 5077 putstring(f, d->addr); 5078 putstring(f, d->ip); 5079 putstring(f, d->doing); 5080 putref(f, d->pueblo); 5081 } /* for loop */ 5082 5083 putref(f, 0); 5084 putstring(f, poll_msg); 5085 putref(f, first_start_time); 5086 putref(f, reboot_count); 5087 fclose(f); 5051 } else { 5052 #endif 5053 5054 5055 f = fopen(REBOOTFILE, "w"); 5056 5057 /* This shouldn't happen */ 5058 if (!f) { 5059 flag_broadcast(0, 0, T("GAME: Error writing reboot database!")); 5060 exit(0); 5061 } 5062 putref(f, sock); 5063 putref(f, maxd); 5064 5065 /* First, iterate through all descriptors to get to the end 5066 * we do this so the descriptor_list isn't reversed on reboot 5067 */ 5068 for (d = descriptor_list; d && d->next; d = d->next) ; 5069 5070 /* Second, we iterate backwards from the end of descriptor_list 5071 * which is now in the d variable. 5072 */ 5073 for (; d != NULL; d = d->prev) { 5074 5075 putref(f, d->descriptor); 5076 putref(f, d->connected_at); 5077 putref(f, d->hide); 5078 putref(f, d->cmds); 5079 if (GoodObject(d->player)) 5080 putref(f, d->player); 5081 else 5082 putref(f, -1); 5083 putref(f, d->last_time); 5084 if (d->output_prefix) 5085 putstring(f, d->output_prefix); 5086 else 5087 putstring(f, "__NONE__"); 5088 if (d->output_suffix) 5089 putstring(f, d->output_suffix); 5090 else 5091 putstring(f, "__NONE__"); 5092 putstring(f, d->addr); 5093 putstring(f, d->ip); 5094 putstring(f, d->doing); 5095 putref(f, d->pueblo); 5096 } /* for loop */ 5097 5098 putref(f, 0); 5099 putstring(f, poll_msg); 5100 putref(f, first_start_time); 5101 putref(f, reboot_count); 5102 fclose(f); 5103 #ifdef I_SETJMP 5104 } 5105 #endif 5088 5106 } 5089 5107 … … 5182 5200 /* Thread to listen on MUD port - for Windows NT */ 5183 5201 /* --------------------------------------------------------------------------- */ 5184 5185 5202 void __cdecl 5186 5203 MUDListenThread(void *pVoid) … … 5189 5206 5190 5207 SOCKET socketClient; 5191 SOCKADDR_IN SockAddr; 5192 int nLen; 5208 union sockaddr_u addr; 5209 int nLen, addr_len; 5210 struct hostname_info *hi; 5193 5211 /* int i; */ 5194 5212 BOOL b; … … 5206 5224 /* Block on accept() */ 5207 5225 nLen = sizeof(SOCKADDR_IN); 5208 socketClient = accept(MUDListenSocket, (LPSOCKADDR) & SockAddr, &nLen);5226 socketClient = accept(MUDListenSocket, (LPSOCKADDR) & addr, &nLen); 5209 5227 5210 5228 if (socketClient == INVALID_SOCKET) { … … 5217 5235 5218 5236 bp = tbuf2; 5219 safe_str((c har *) ip_convert(SockAddr.sin_addr), tbuf2, &bp);5237 safe_str((const char *) ip_convert(&addr.addr, nLen), tbuf2, &bp); 5220 5238 *bp = '\0'; 5221 5239 bp = tbuf1; 5222 safe_str((char *) hostname_convert(SockAddr.sin_addr), tbuf1, &bp); 5240 addr_len = sizeof(addr); 5241 hi = hostname_convert(&addr.addr, addr_len); 5242 safe_str(hi ? hi->hostname : "", tbuf1, &bp); 5223 5243 *bp = '\0'; 5224 5244 if (Forbidden_Site(tbuf1) || Forbidden_Site(tbuf2)) { 5225 do_log(LT_CONN, 0, 0, T("[%d/%s] Refused connection (remote port % d)"),5226 socketClient, tbuf1, ntohs(SockAddr.sin_port));5245 do_log(LT_CONN, 0, 0, T("[%d/%s] Refused connection (remote port %s)"), 5246 socketClient, tbuf1, hi->port); 5227 5247 shutdown(socketClient, 2); 5228 5248 closesocket(socketClient); … … 5248 5268 continue; 5249 5269 } 5250 /* welcome the user - we can't do this until the completion port is created */ 5270 /* welcome the user - we can't do this until the completion port is created 5271 */ 5251 5272 5252 5273 welcome_user(d); 1.7.3/src/cmds.c
r277 r279 122 122 else if (SW_ISSET(sw, SWITCH_QUIET)) 123 123 do_chan_admin(player, arg_left, arg_right, 4); 124 else if (SW_ISSET(sw, SWITCH_NOISY)) 125 do_chan_admin(player, arg_left, "n", 4); 124 126 else if (SW_ISSET(sw, SWITCH_DECOMPILE)) 125 127 do_chan_decompile(player, arg_left, SW_ISSET(sw, SWITCH_BRIEF)); … … 134 136 else if (SW_ISSET(sw, SWITCH_MUTE)) 135 137 do_chan_user_flags(player, arg_left, arg_right, 0, 0); 138 else if (SW_ISSET(sw, SWITCH_UNMUTE)) 139 do_chan_user_flags(player, arg_left, "n", 0, 0); 136 140 else if (SW_ISSET(sw, SWITCH_HIDE)) 137 141 do_chan_user_flags(player, arg_left, arg_right, 1, 0); 142 else if (SW_ISSET(sw, SWITCH_UNHIDE)) 143 do_chan_user_flags(player, arg_left, "n", 1, 0); 138 144 else if (SW_ISSET(sw, SWITCH_GAG)) 139 145 do_chan_user_flags(player, arg_left, arg_right, 2, 0); 146 else if (SW_ISSET(sw, SWITCH_UNGAG)) 147 do_chan_user_flags(player, arg_left, "n", 2, 0); 140 148 else if (SW_ISSET(sw, SWITCH_WHAT)) 141 149 do_chan_what(player, arg_left); 1.7.3/src/command.c
r277 r279 70 70 CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0, 0}, 71 71 {"@CHANNEL", 72 "LIST ADD DELETE RENAME NAME PRIVS QUIET DECOMPILE DESC CHOWN WIPE MUTE GAGHIDE WHAT TITLE BRIEF",72 "LIST ADD DELETE RENAME NAME PRIVS QUIET NOISY DECOMPILE DESC CHOWN WIPE MUTE UNMUTE GAG UNGAG HIDE UNHIDE WHAT TITLE BRIEF", 73 73 cmd_channel, 74 74 CMD_T_ANY | CMD_T_SWITCHES | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0, 0}, … … 1184 1184 int lc; 1185 1185 { 1186 notify(player, list_commands(lc)); 1187 } 1188 1189 char * 1190 list_commands(lc) 1191 int lc;
