Changeset 515
- Timestamp:
- 08/16/06 02:55:20 (2 years ago)
- Files:
-
- 1.8.1/CHANGES.180 (modified) (1 diff)
- 1.8.1/CHANGES.181 (modified) (1 diff)
- 1.8.1/Configure (modified) (20 diffs)
- 1.8.1/Patchlevel (modified) (1 diff)
- 1.8.1/README.SQL (modified) (1 diff)
- 1.8.1/config_h.SH (modified) (6 diffs)
- 1.8.1/game/README (modified) (1 diff)
- 1.8.1/game/restart (modified) (7 diffs)
- 1.8.1/game/txt/hlp/penncmd.hlp (modified) (8 diffs)
- 1.8.1/game/txt/hlp/pennfunc.hlp (modified) (11 diffs)
- 1.8.1/game/txt/hlp/penntop.hlp (modified) (5 diffs)
- 1.8.1/game/txt/hlp/pennv180.hlp (modified) (1 diff)
- 1.8.1/game/txt/hlp/pennv181.hlp (modified) (2 diffs)
- 1.8.1/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.8.1/hdrs/externs.h (modified) (3 diffs)
- 1.8.1/hdrs/function.h (modified) (1 diff)
- 1.8.1/hdrs/game.h (modified) (2 diffs)
- 1.8.1/hdrs/shs.h (modified) (2 diffs)
- 1.8.1/hdrs/version.h (modified) (1 diff)
- 1.8.1/src/attrib.c (modified) (1 diff)
- 1.8.1/src/cmds.c (modified) (5 diffs)
- 1.8.1/src/command.c (modified) (5 diffs)
- 1.8.1/src/conf.c (modified) (6 diffs)
- 1.8.1/src/cque.c (modified) (2 diffs)
- 1.8.1/src/create.c (modified) (3 diffs)
- 1.8.1/src/filecopy.c (modified) (2 diffs)
- 1.8.1/src/flags.c (modified) (2 diffs)
- 1.8.1/src/function.c (modified) (7 diffs)
- 1.8.1/src/fundb.c (modified) (5 diffs)
- 1.8.1/src/funlist.c (modified) (10 diffs)
- 1.8.1/src/funmath.c (modified) (18 diffs)
- 1.8.1/src/funmisc.c (modified) (1 diff)
- 1.8.1/src/funstr.c (modified) (3 diffs)
- 1.8.1/src/funufun.c (modified) (1 diff)
- 1.8.1/src/htab.c (modified) (1 diff)
- 1.8.1/src/lock.c (modified) (1 diff)
- 1.8.1/src/move.c (modified) (1 diff)
- 1.8.1/src/parse.c (modified) (3 diffs)
- 1.8.1/src/set.c (modified) (6 diffs)
- 1.8.1/src/speech.c (modified) (2 diffs)
- 1.8.1/src/sql.c (modified) (1 diff)
- 1.8.1/src/unparse.c (modified) (7 diffs)
- 1.8.1/src/wiz.c (modified) (4 diffs)
- 1.8.1/win32/funs.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.1/CHANGES.180
r511 r515 12 12 13 13 ========================================================================== 14 15 Version 1.8.0 patchlevel 8 August 29, 2005 16 17 Fixes: 18 * /noflagcopy switch to @cpattr/@mvattr works now. Report by 19 Kimiko Muffin. 20 * SHS encryption now works on 64-bit architectures that define 21 uint32_t. Report by Licenser@M*U*S*H. 22 23 24 Version 1.8.0 patchlevel 7 August 29, 2005 25 26 Fixes: 27 * lsearch() with no results no longer returns #-1. It still does so when 28 there's an error. Suggested by Nathan Baum. [SW] 29 * Improved messages for @link of exits. Report by Nathan Baum. [SW] 30 * Restart script more portable to older bourne-like shells. 31 Patch by Walker@M*U*S*H. 32 * Fix to MinGW reboot. Patch by Nathan Baum. 33 * Help fixes by Tyr@M*U*S*H, Talvo@M*U*S*H, Dizzy@Forgotten Time, 34 and Trinsec@M*U*S*H. 35 * @flag/add of a flag with a name that is a unique prefix of an existing 36 flag wouldn't add the new flag. Reported by Mike Griffiths. [SW] 37 * @config/set of an invalid option would still return a success message. 38 Report by Sholevi@M*U*S*H. [SW] 39 * sql() without a field delimiter defaulted to using the row delimiter, 40 instead of a space. Report by Kali@M*U*S*H. 41 * lock() didn't set user-defined locks properly. Report by 42 Dahan@M*U*S*H. [SW] 43 * Infinite loop in fraction() fixed. 44 * FIXED players may no longer teleport through exits. Report by 45 Anyasha@bDv2 46 * Better messages when attempting to wipe SAFE attributes. 47 Suggested by Nathan Baum. 48 14 49 15 50 Version 1.8.0 patchlevel 6 June 24, 2005 1.8.1/CHANGES.181
r513 r515 9 9 [EEH] is Ervin Hearn III, a PennMUSH developer (aka Noltar) 10 10 [3] refers to code by (or inspired by) TinyMUSH 3.0 11 [MUX] refers to code by (or inspired by) TinyMUX 2.x 11 12 [Rhost] refers to code by (or inspired by) RhostMUSH 12 13 13 14 ========================================================================== 15 16 Version 1.8.1 patchlevel 2 September 5, 2005 17 18 Commands: 19 * @edit/check shows the results of an @edit without actually doing 20 it, to avoid inadvertent overediting. Patch by Walker@M*U*S*H. 21 Functions: 22 * sortkey() sorts a list by mapping each list element through a 23 function and applying a standard sort type. Patch by Walker@M*U*S*H. 24 Minor changes: 25 * "% " (percent-space) is now parsed to a literal percent-space, 26 making it easier to type things like "I'm 50% happy". And 27 % at end of line is parsed to a literal %. Patch by Sketch@M*U*S*H. 28 * @nameformat now receives the default-formatted name as %1 29 so you can edit from that if you prefer. Suggested by Talvo@M*U*S*H. 30 * Added netbsd hints. Suggested by Tyr@M*U*S*H. 31 * hastype() can take a list of types to check for, not just one. [SW] 32 * Add @function/preserve, which does the same thing as the localize 33 restriction. [MUX] [SW] 34 * Leaving out the <filler> argument to align() defaults it to a 35 space. Suggested by Tyr@M*U*S*H, patch by Walker@M*U*S*H. 36 * Improved error message for setq() with odd arguments. 37 Report by Malix@8bit. 38 * When variable exits fail due to invalid/not permitted destination, 39 the enactor is told what the attempted destination was. 40 Suggested by Nathan Baum. 41 * Rooms may now @search/search() their owners. Suggested by Kali@M*U*S*H. 42 Fixes: 43 * @function/restrict mentioned in help. [SW] 44 * Clearer help on parallel setq. Suggested by Trinsec@M*U*S*H. [TAP] 45 * lsearch() didn't refund pennies when it failed because of lack of 46 permissions or invalid search criteria. Reported by Nathan Baum. [SW] 47 * lsearch() could return garbage objects. Report by Nathan Baum. [SW] 48 * %+ now only records argument count from last ufun, not from other 49 (builtin) functions. Report by Cheetah@M*U*S*H. 50 * Some linting of float comparisons. Report by Cheetah@M*U*S*H. 51 * page <player>= now pages the player with a blank line instead of 52 repaging the last paged player with "<player>". Report by Cheetah@M*U*S*H. 53 14 54 15 55 Version 1.8.1 patchlevel 1 June 27, 2005 1.8.1/Configure
r479 r515 264 264 cdecl='' 265 265 cf_email='' 266 cf_name=''267 266 cf_by='' 268 267 cf_time='' … … 356 355 d_timelocal='' 357 356 d_toupper='' 357 d_uint32_t='' 358 358 d_uptime='' 359 359 d_urandom='' … … 380 380 i_niin='' 381 381 i_sysin='' 382 i_nitcp=''383 382 i_setjmp='' 384 383 i_stddef='' 384 i_stdint='' 385 385 i_stdlib='' 386 386 i_string='' … … 417 417 installdir='' 418 418 libc='' 419 d_mysql=''420 libmysqlclient=''421 419 glibpth='' 422 420 libpth='' … … 456 454 so='' 457 455 d_keepalive='' 458 d_keepidle=''459 456 sharpbang='' 460 457 shsharp='' … … 4621 4618 eval $inlibc 4622 4619 4623 : see if this is a netinet/tcp.h system4624 set netinet/tcp.h i_nitcp4625 eval $inhdr4626 4627 4620 : see if setsockopt with SO_KEEPALIVE works as advertised 4628 4621 echo " " 4629 4622 case "$d_oldsock" in 4630 4623 "$undef") 4624 if $contains SO_KEEPALIVE `./findhdr sys/socket.h` \ 4625 /dev/null >/dev/null 2>&1 4626 then 4631 4627 echo "OK, let's see if SO_KEEPALIVE works as advertised..." >&4 4632 4628 $cat > socket.c <<EOP … … 4634 4630 #include <sys/socket.h> 4635 4631 #include <netinet/in.h> 4636 #$i_nitcp I_NETINET_TCP4637 #ifdef I_NETINET_TCP4638 #include <netinet/tcp.h>4639 #endif4640 4632 #include <netdb.h> 4641 4633 … … 4643 4635 { 4644 4636 int s = socket(AF_INET, SOCK_STREAM, 0); 4645 int val = 1;4646 4637 if (s == -1) 4647 4638 exit(1); 4648 if (-1 == setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)))4639 if (-1 == setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, 0, 0)) 4649 4640 exit(2); 4650 #ifdef I_NETINET_TCP4651 #ifdef TCP_KEEPIDLE4652 val = 1;4653 if (-1 == setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)))4654 exit(3);4655 #else4656 exit(3);4657 #endif4658 #endif4659 4641 exit(0); 4660 4642 } … … 4665 4647 case $? in 4666 4648 0) echo "Yes, it does!" 4667 val="$define" 4668 val2="$i_nitcp" 4669 ;; 4649 val="$define";; 4670 4650 1) $cat <<EOM 4671 4651 (Something went wrong -- Assuming SO_KEEPALIVE is broken) 4672 4652 EOM 4673 val="$undef" 4674 val2="$undef" 4675 ;; 4653 val="$undef";; 4676 4654 2) echo "No, it doesn't. Don't trust your manuals!!" 4677 val="$undef" 4678 val2="$undef" 4679 ;; 4680 3) echo "It does, but TCP_KEEPIDLE doesn't." 4681 val="$define" 4682 val2="$undef" 4683 ;; 4655 val="$undef";; 4684 4656 esac 4685 4657 else … … 4688 4660 EOM 4689 4661 val="$undef" 4690 val2="$undef"4691 4662 fi 4692 ;; 4663 else 4664 echo "Strange!! You have BSD 4.2 sockets but no SO_KEEPALIVE option." 4665 val="$undef" 4666 fi;; 4693 4667 *) cat <<EOM 4694 4668 As you have an old socket interface, you can't have heard of SO_KEEPALIVE. 4695 4669 EOM 4696 val="$undef" 4697 val2="$undef";; 4670 val="$undef";; 4698 4671 esac 4699 4672 set d_keepalive 4700 eval $setvar4701 val="$val2"4702 set d_keepidle4703 4673 eval $setvar 4704 4674 $rm -f socket socket.c … … 4789 4759 set memset d_memset 4790 4760 eval $inlibc 4791 4792 : see if we should include -lmysqlclient4793 echo " "4794 4795 d_mysql="$undef"4796 4797 if $test "x$no_mysql" = "x"; then4798 4799 libmysqlclient="-lmysqlclient"4800 4801 $cat > test_mysql.c <<EOM4802 #include <stdio.h>4803 #include <stdlib.h>4804 #include <mysql/mysql.h>4805 #include <mysql/errmsg.h>4806 4807 int main(int argc, char **argv) {4808 printf("Your mysql is version %s\n",mysql_get_client_info());4809 exit(0);4810 }4811 EOM4812 4813 if $cc $ccflags $ldflags -o test_mysql test_mysql.c $libs $libmysqlclient >/dev/null 2>&1 ;4814 then4815 echo 'You have mysql...' >&44816 version=`./test_mysql`4817 if $test $? -eq 0; then4818 echo "$version" >&44819 d_mysql="$define"4820 else4821 echo "...but my test program didn't run correctly." >&44822 libmysqlclient=''4823 fi4824 else4825 echo "You don't seem to have mysql." >&44826 libmysqlclient=''4827 fi4828 $rm -f test_mysql* core4829 4830 else4831 4832 echo "Skipping mysql tests." >&44833 libmysqlclient=''4834 4835 fi4836 4761 4837 4762 : check for a new-style definitions … … 5314 5239 $rm -f test_toupper* core 5315 5240 5316 : uptime5317 echo " "5318 if $test -x $uptime ; then5319 val="$define"5320 else5321 val="$undef"5322 fi5323 set d_uptime; eval $setvar5324 5325 : see if /dev/urandom is present5326 echo " "5327 if $test -c /dev/urandom ; then5328 val="$define"5329 else5330 val="$undef"5331 fi5332 set d_urandom; eval $setvar5333 5334 : see if union wait is available5335 echo " "5336 set X $cppflags5337 shift5338 flags=''5339 also=''5340 for f in $*; do5341 case "$f" in5342 *NO_PROTO*) ;;5343 *) flags="$flags $f";;5344 esac5345 done5346 xxx="`./findhdr sys/wait.h`"5347 case "x$xxx" in5348 x) xxx=/dev/null5349 esac5350 $cat "$xxx" | $cppstdin $flags $cppminus >wait.out 2>/dev/null5351 if $contains 'union.*wait.*{' wait.out >/dev/null 2>&1 ; then5352 echo "Looks like your <sys/wait.h> knows about 'union wait'..." >&45353 val="$define"5354 also='also '5355 if $contains 'extern.*wait[ ]*([ ]*int' wait.out >/dev/null 2>&15356 then5357 echo "But wait() seems to expect an 'int' pointer (POSIX way)." >&45358 val="$undef"5359 also=''5360 elif $contains 'extern.*wait[ ]*([ ]*union' wait.out >/dev/null 2>&15361 then5362 echo "And indeed wait() expects an 'union wait' pointer (BSD way)." >&45363 else5364 echo "So we'll use that for wait()." >&45365 fi5366 else5367 echo "No trace of 'union wait' in <sys/wait.h>..." >&45368 val="$undef"5369 echo "Your wait() should be happy with a plain 'int' pointer." >&45370 fi5371 set d_uwait5372 eval $setvar5373 $rm -f wait.out5374 5375 5241 : get C preprocessor symbols handy 5376 5242 echo " " … … 5479 5345 fi 5480 5346 $rm -f ccsym* 5347 5348 : see if this is a stdint system 5349 val="$undef" 5350 if $test "`./findhdr stdint.h`"; then 5351 val="$define" 5352 echo "<stdint.h> found." >&4 5353 fi 5354 echo " " 5355 set i_stdint; eval $setvar 5356 : see if we have uint32_t 5357 echo "Let's try to figure out a really big double." >&4 5358 echo " " 5359 $cat >d_uint32.c <<EOCP 5360 #include <stdio.h> 5361 #$i_stdint I_STDINT 5362 #ifdef I_STDINT 5363 #include <stdint.h> 5364 #endif 5365 5366 int main() 5367 { 5368 uint32_t a; 5369 a = 2*2*2*2; 5370 a *= a; /* 2^8 */ 5371 a *= a; /* 2^16 */ 5372 a *= a; /* 2^32 */ 5373 a += 1; /* 2^32 + 1 */ 5374 if (a == 1) 5375 printf("ok\n"); 5376 else 5377 printf("not ok\n"); 5378 } 5379 EOCP 5380 5381 if $cc $ccflags $ldflags d_uint32.c -o d_uint32 $libs >/dev/null 2>&1; then 5382 val=`./d_uint32` 5383 if test $val = "ok" ; then 5384 val="$define" 5385 set d_uint32_t; eval $setvar 5386 echo "You have uint32_t." >&4 5387 else 5388 val="$undef" 5389 set d_uint32_t; eval $setvar 5390 echo "You don't have uint32_t, hope you're a 32 bit machine." >&4 5391 fi 5392 else 5393 val="$undef" 5394 set d_uint32_t; eval $setvar 5395 echo "I can't tell if you have uint32_t, hope you're a 32 bit machine." >&4 5396 fi 5397 5398 $rm -f d_uint32* 5399 5400 : uptime 5401 echo " " 5402 if $test -x $uptime ; then 5403 val="$define" 5404 else 5405 val="$undef" 5406 fi 5407 set d_uptime; eval $setvar 5408 5409 : see if /dev/urandom is present 5410 echo " " 5411 if $test -c /dev/urandom ; then 5412 val="$define" 5413 else 5414 val="$undef" 5415 fi 5416 set d_urandom; eval $setvar 5417 5418 : see if union wait is available 5419 echo " " 5420 set X $cppflags 5421 shift 5422 flags='' 5423 also='' 5424 for f in $*; do 5425 case "$f" in 5426 *NO_PROTO*) ;; 5427 *) flags="$flags $f";; 5428 esac 5429 done 5430 xxx="`./findhdr sys/wait.h`" 5431 case "x$xxx" in 5432 x) xxx=/dev/null 5433 esac 5434 $cat "$xxx" | $cppstdin $flags $cppminus >wait.out 2>/dev/null 5435 if $contains 'union.*wait.*{' wait.out >/dev/null 2>&1 ; then 5436 echo "Looks like your <sys/wait.h> knows about 'union wait'..." >&4 5437 val="$define" 5438 also='also ' 5439 if $contains 'extern.*wait[ ]*([ ]*int' wait.out >/dev/null 2>&1 5440 then 5441 echo "But wait() seems to expect an 'int' pointer (POSIX way)." >&4 5442 val="$undef" 5443 also='' 5444 elif $contains 'extern.*wait[ ]*([ ]*union' wait.out >/dev/null 2>&1 5445 then 5446 echo "And indeed wait() expects an 'union wait' pointer (BSD way)." >&4 5447 else 5448 echo "So we'll use that for wait()." >&4 5449 fi 5450 else 5451 echo "No trace of 'union wait' in <sys/wait.h>..." >&4 5452 val="$undef" 5453 echo "Your wait() should be happy with a plain 'int' pointer." >&4 5454 fi 5455 set d_uwait 5456 eval $setvar 5457 $rm -f wait.out 5481 5458 5482 5459 : see if this is a termio system … … 6629 6606 elif ./xenix; then 6630 6607 dflt=y 6631 elif $test "x$osname" = "xlinux"; then6632 dflt=y6633 6608 else 6634 6609 dflt=n … … 6887 6862 cf_by='$cf_by' 6888 6863 cf_email='$cf_email' 6889 cf_name='$cf_name'6890 6864 cf_time='$cf_time' 6891 6865 chgrp='$chgrp' … … 6941 6915 d_itimer='$d_itimer' 6942 6916 d_keepalive='$d_keepalive' 6943 d_keepidle='$d_keepidle'6944 6917 d_keepsig='$d_keepsig' 6945 6918 d_lrand48='$d_lrand48' … … 6950 6923 d_memset='$d_memset' 6951 6924 d_mymalloc='$d_mymalloc' 6952 d_mysql='$d_mysql'6953 6925 d_newstyle='$d_newstyle' 6954 6926 d_oldsock='$d_oldsock' … … 6989 6961 d_timelocal='$d_timelocal' 6990 6962 d_toupper='$d_toupper' 6963 d_uint32_t='$d_uint32_t' 6991 6964 d_uptime='$d_uptime' 6992 6965 d_urandom='$d_urandom' … … 7035 7008 i_netdb='$i_netdb' 7036 7009 i_niin='$i_niin' 7037 i_nitcp='$i_nitcp'7038 7010 i_setjmp='$i_setjmp' 7039 7011 i_sgtty='$i_sgtty' 7040 7012 i_stdarg='$i_stdarg' 7041 7013 i_stddef='$i_stddef' 7014 i_stdint='$i_stdint' 7042 7015 i_stdlib='$i_stdlib' 7043 7016 i_string='$i_string' … … 7076 7049 less='$less' 7077 7050 libc='$libc' 7078 libmysqlclient='$libmysqlclient'7079 7051 libpth='$libpth' 7080 7052 libs='$libs' 1.8.1/Patchlevel
r513 r515 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.8.1p 12 This is PennMUSH 1.8.1p2 1.8.1/README.SQL
r469 r515 17 17 III. SQL setup tips 18 18 19 I. Compiling with iMySQL19 I. Compiling with MySQL 20 20 21 21 The Configure script distributed with PennMUSH automatically detects 1.8.1/config_h.SH
r479 r515 399 399 #define Size_t $sizetype /* length paramater for string functions */ 400 400 401 /* CAN_KEEPALIVE: 402 * This symbol if defined indicates to the C program that the SO_KEEPALIVE 403 * option of setsockopt() will work as advertised in the manual. 404 */ 405 #$d_keepalive CAN_KEEPALIVE /**/ 406 401 407 /* VOIDFLAGS: 402 408 * This symbol indicates how much support of the void type is given by this … … 730 736 #$d_toupper HAS_SAFE_TOUPPER /**/ 731 737 738 /* HAS_UINT32_T: 739 * If defined, this system has the uint32_t type. 740 */ 741 #$d_uint32_t HAS_UINT32_T /**/ 742 732 743 /* UPTIME_PATH: 733 744 * This symbol gives the full path to the uptime(1) program if … … 796 807 #$i_netdb I_NETDB /**/ 797 808 798 /* I_NETINET_TCP:799 * This symbol, if defined, indicates to the C program that it should800 * include <netinet/tcp.h>.801 */802 #$i_nitcp I_NETINET_TCP /**/803 804 809 /* I_SETJMP: 805 810 * This symbol, if defined, indicates to the C program that it can … … 807 812 */ 808 813 #$i_setjmp I_SETJMP /**/ 814 815 /* I_STDINT: 816 * This symbol, if defined, indicates that the program should include 817 * <stdint.h>. 818 */ 819 #$i_stdint I_STDINT /**/ 809 820 810 821 /* USE_TIOCNOTTY: … … 834 845 #$i_stdarg I_STDARG /**/ 835 846 836 /* HAS_MYSQL:837 * Defined if mysql client libraries are available.838 */839 #$d_mysql HAS_MYSQL /**/840 841 847 /* HAS_OPENSSL: 842 848 * Defined if openssl 0.9.6+ is available. … … 844 850 #$d_openssl HAS_OPENSSL /**/ 845 851 846 /* CAN_KEEPALIVE:847 * This symbol if defined indicates to the C program that the SO_KEEPALIVE848 * option of setsockopt() will work as advertised in the manual.849 */850 /* CAN_KEEPIDLE:851 * This symbol if defined indicates to the C program that the TCP_KEEPIDLE852 * option of setsockopt() will work as advertised in the manual.853 */854 #$d_keepalive CAN_KEEPALIVE /**/855 856 #$d_keepidle CAN_KEEPIDLE /**/857 858 852 #endif 859 853 !GROK!THIS! 1.8.1/game/README
r469 r515 42 42 in mush.cnf) every time, since errors and other important messages get 43 43 printed to that logfile. 44 45 After your first startup, it's a good idea to make some small 46 change to the database (e.g., @create an object) and then 47 do an @shutdown. Restart the game again and ensure that your 48 object is still present - this verifies that the server is 49 successfully dumping. 44 50 45 51 ============================================================================ 1.8.1/game/restart
r511 r515 37 37 ####################################################################### 38 38 39 if [ -z $GAMEDIR]; then39 if [ -z "$GAMEDIR" ]; then 40 40 echo "You must set GAMEDIR in the restart script." 41 41 exit 1 42 42 fi 43 43 44 if [ ! -d $GAMEDIR]; then44 if [ ! -d "$GAMEDIR" ]; then 45 45 echo "GAMEDIR doesn't appear to be a directory. It's: $GAMEDIR" 46 46 exit 1 … … 50 50 echo Running from `pwd` 51 51 52 if [ ! -f $CONF_FILE]; then52 if [ ! -f "$CONF_FILE" ]; then 53 53 echo "CONF_FILE doesn't exist. It's: $CONF_FILE" 54 54 echo "Create $CONF_FILE from $GAMEDIR/mushcnf.dst" … … 76 76 egrep -s "^compress_program[ ]*[A-Za-z0-9]" $CONF_FILE 77 77 nocompress=$? 78 if [ $nocompress-eq 0 ]; then78 if [ "$nocompress" -eq 0 ]; then 79 79 COMPRESSOR=`egrep "^compress_program" $CONF_FILE | sed "s/[^ ]*[ ]*\(.*\)/\1/" | sed 's/\r$//'` 80 80 SUFFIX=`egrep "^compress_suffix" $CONF_FILE | sed "s/[^ ]*[ ]*\(.*\)/\1/" | sed 's/\r$//'` … … 89 89 90 90 91 if [ $mush-gt 0 ]; then91 if [ "$mush" -gt 0 ]; then 92 92 echo Mush already active or some other process is using $GAMEDIR/$CONF_FILE. 93 93 exit 0 … … 99 99 echo Restarting Mush. 100 100 101 if [ -r $PANICDIR/$PANICDB]; then101 if [ -r "$PANICDIR/$PANICDB" ]; then 102 102 end="`tail -1 $PANICDIR/$PANICDB`" 103 103 if [ "$end" = "***END OF DUMP***" ]; then … … 114 114 rm -f log/*.log 115 115 116 if [ -r data/$OUTDB$SUFFIX]; then116 if [ -r "data/$OUTDB$SUFFIX" ]; then 117 117 rm -f save/$INDB$SUFFIX.old 118 118 mv -f data/$INDB$SUFFIX save/$INDB$SUFFIX.old … … 120 120 else 121 121 echo "No $OUTDB$SUFFIX found." 122 if [ -r data/$INDB$SUFFIX]; then122 if [ -r "data/$INDB$SUFFIX" ]; then 123 123 echo "Using $INDB$SUFFIX." 124 124 else 125 125 echo "No $INDB$SUFFIX found." 126 if [ -r save/$INDB$SUFFIX.old]; then126 if [ -r "save/$INDB$SUFFIX.old" ]; then 127 127 echo "Using save/$INDB$SUFFIX.old." 128 128 cp save/$INDB$SUFFIX.old data/$INDB$SUFFIX 1.8.1/game/txt/hlp/penncmd.hlp
r511 r515 623 623 needs to make allowances for the /noeval switch in it's matching. 624 624 625 Commands added with @command/add, like other standard commands, 626 are never case-sensitive (regardless of CASE flag on the attribute). 627 625 628 (examples in help @command3) 626 629 & @command3 … … 740 743 Customizes the usual display of the object's name to people who 741 744 are inside it and 'look'. It is evaluated as if it were a description 742 or similar message on the room. The room's dbref is passed as %0. 745 or similar message on the room. The room's dbref is passed as %0, 746 and the default-formatted name as %1. 743 747 744 748 @nameformat is not used when people outside the object look at it. 745 749 746 750 Example: Show the room's zone after its name. 747 @nameformat here = [name(%0)][if(isdbref(zone(%0)),<[name(zone(%0))]>)]751 @nameformat here = %1 [if(isdbref(zone(%0)),<[name(zone(%0))]>)] 748 752 749 753 See also: @exitformat, @conformat, @descformat … … 1080 1084 & @edit 1081 1085 & @gedit 1082 @edit[/first] <object>/<pattern> = <search>,<replace>1083 @edit <object>/<pattern> = $,<string to append>1084 @edit <object>/<pattern> = ^,<string to prepend>1086 @edit[/first][/check] <object>/<pattern> = <search>,<replace> 1087 @edit[/check] <object>/<pattern> = $,<string to append> 1088 @edit[/check] <object>/<pattern> = ^,<string to prepend> 1085 1089 1086 1090 This is useful when you don't want to have to retype those obnoxiously … … 1098 1102 If the /first switch is used, only the first occurrence of <search> 1099 1103 is replaced. 1104 1105 If the /check switch is used, the editing is not actually done, but the 1106 results are shown to you (with changes hilighted) as if a normal @edit 1107 was performed. 1100 1108 1101 1109 See also ATTRIBUTES, edit() … … 1473 1481 & @function 1474 1482 @function [<function name>] 1475 @function <name>=<obj>,<attrib>[,<min args>, <max args>[,<restrictions>]] 1483 @function[/preserve] <name>=<obj>,<attrib>[,<min args>, 1484 <max args>[,<restrictions>]] 1476 1485 or @function <function name>=<object>/<attribute> 1477 1486 @function/<switch> <function name> 1487 @function/restrict <function name>=<restrictions> 1478 1488 1479 1489 When used without any arguments, this command lists all global … … 1490 1500 /enable, to re-enable it. 1491 1501 /delete, to remove a user-defined function. 1502 /restrict, to change the restriction flags on an existing function. 1492 1503 1493 1504 Otherwise, this command defines a global function with the name 1494 1505 <function name>, which evaluates to <attribute> on <object>. 1495 <object> can be anything that the player using the @function command1496 controls. <function name> must be 30 characters or less.1497 1498 1506 (continued in help @function2) 1499 1507 & @function2 1508 <object> can be anything that the player using the @function command 1509 controls. <function name> must be 30 characters or less. 1510 1500 1511 A function defined using @function works just like any of the normal 1501 1512 MUSH functions, from the user's perspective. The functions are … … 1504 1515 Functions defined via @function should follow the format used by 1505 1516 UFUN() - %0 is the first argument passed, %1 is the second argument 1506 passed, and so forth. Option third and fourth arguments to @function1517 passed, and so forth. Optional third and fourth arguments to @function 1507 1518 can be used to set a parser-enforced number of arguments for the function. 1519 An optional fifth argument will set restriction flags. 1520 1521 The /preserve switch, for MUX compability, does the same thing as the 1522 'localize' restriction - treats the attribute that's evaluated as if it 1523 were called with ulocal() instead of u(). 1508 1524 1509 1525 Example: … … 1540 1556 @function/restore will delete the @function and turn the built in 1541 1557 version back on. 1558 1559 Using @function on an already-added @function will delete the old one and 1560 install a new function with none of the settings of the old one kept. 1542 1561 1543 1562 For example: 1.8.1/game/txt/hlp/pennfunc.hlp
r511 r515 147 147 matchall() member() mix() munge() remove() 148 148 replace() rest() revwords() setdiff() setinter() 149 setunion() shuffle() sort() sortby() s plice()150 s tep() table() wordpos() words()149 setunion() shuffle() sort() sortby() sortkey() 150 splice() step() table() wordpos() words() 151 151 152 152 See also: LISTS … … 1550 1550 You may or may not have to be able to examine the object to use this. 1551 1551 & HASTYPE() 1552 hastype(<object>, <type >)1552 hastype(<object>, <type list>) 1553 1553 1554 1554 Returns 1 if the object is of the named type, otherwise 0. 1555 Valid types are: ROOM, EXIT, PLAYER, THING, GARBAGE. 1555 Valid types are: ROOM, EXIT, PLAYER, THING, GARBAGE. You can 1556 test to see if the object is one of a number of types by using a space- 1557 separated list of types. 1556 1558 If an invalid type is given, #-1 NO SUCH TYPE is returned. 1557 1559 & HIDDEN() … … 2280 2282 lvthings(<object>) 2281 2283 2282 This function returns the dbrefs of all connected and non-dark things 2283 inside an object. You must be in the object or control it to use this 2284 function. 2284 This function returns the dbrefs of all non-dark things inside an 2285 object. You must be in the object or control it to use this function. 2285 2286 & LWHO() 2286 2287 lwho() … … 2843 2844 pmatch(<string>) 2844 2845 2845 Given the partial name of a player, itreturns that player's dbref2846 Given the partial name of a connected player, returns that player's dbref 2846 2847 number. This partial name completion works similarly to the partial 2847 2848 name completion of the "page" command - i.e. it first attempts to match 2848 the normal names of all players (connected or not), and if that fails,2849 the full names of all players (connected or not), and if that fails, 2849 2850 it tries to match the partial names of connected players visible to 2850 2851 the enactor. If no player is matched, it returns "#-1". If more than … … 3241 3242 assigned with a single setq() or setr(), with additional pairs of 3242 3243 registers and values in the function's arguments. In this case, 3243 setr() returns the value stored in the first register listed. 3244 setr() returns the value stored in the first register listed. All 3245 arguments are evaluated before any registers are set; if you want 3246 to use the result of setting one register in setting another, use 3247 multiple setq()s. 3244 3248 3245 3249 There are thirty-six local registers, numbered 0 through 9 and A … … 3259 3263 being manipulated, such as in the following example: 3260 3264 3261 &TEST object=[strlen(%0)] &CMD object=$test 3262 *:"[setq(0,u(TEST,%0))]Test. %0 has length [r(0)]. test Foo > 3263 Object says, "Test. Foo has length 3." 3265 &TEST object=[strlen(%0)] 3266 &CMD object=$test *:"[setq(0,u(TEST,%0))]Test. %0 has length %q0. 3267 test Foo 3268 > Object says, "Test. Foo has length 3." 3264 3269 3265 3270 In this case, it is a waste to use setq(), since we only use the … … 3267 3272 multiple times within the same command, it would be much more efficient 3268 3273 to use the local register, since TEST would then only be evaluated once. 3269 3270 3274 setq() can thus be used to improve the readability of MUSH code, as 3271 3275 well as to cut down the amount of time needed to do complex evaluations. 3276 3277 Swapping the contents of registers can be done without writing to 3278 temporary registers by setting both registers at once, so the code: 3279 3280 think setq(0,foo,1,bar)%q0%q1 - [setq(0,%q1,1,%q0)]%q0%q1 3281 3282 yields "foobar - barfoo". 3272 3283 3273 3284 See "help SETQ3" for scoping rules of setq(). … … 3285 3296 produces the following when executed by an object: 3286 3297 3287 Object says "foo" Object says "bar" Object says "foo" 3298 Object says "foo" 3299 Object says "bar" 3300 Object says "foo" 3288 3301 3289 3302 & SETUNION() … … 3378 3391 function sizes should be kept reasonable. 3379 3392 3380 See also: anonymous attributes 3393 See also: anonymous attributes, sorting 3394 & SORTKEY() 3395 sortkey([<obj>/]<attrib>,<list>[,<sort type>[,<delimiter>[,<osep>]]]) 3396 3397 This function creates a list of keys by passing every element of <list> 3398 into the u-function given in <attrib>. The list is then sorted according 3399 to the sorting method in <sort type>, or is automatically guessed. 3400 (As per 'help sorting') 3401 3402 This is equivalent to: 3403 > &munge_sort me=sort(%0,<sort type>) 3404 > munge(munge_sort,map(<attrib>,<list>),<list>) 3405 3406 Only there is no risk with delimiters ocurring within the list. 3407 3408 A simple example, which sorts players by their names: 3409 > @@ #1 is "God", #2 is "Amby", "#3" is "Bob" 3410 > &KEY_NAME me=name(%0) 3411 > say sortkey(key_name,#1 #2 #3) 3412 You say, "#2 #3 #1" 3413 3414 See also: anonymous attributes, sorting 3381 3415 & SORTING 3382 3416 In functions where you can specify a sorting method, you can provide … … 3405 3439 on the particular mush and its environment. 3406 3440 3407 See also: sort(), sortby(), s etunion(), setinter(), setdiff()3441 See also: sort(), sortby(), sortkey(), setunion(), setinter(), setdiff() 3408 3442 & SOUNDEX() 3409 3443 soundex(<word>) … … 3496 3530 3497 3531 &SEL_GETID obj = SELECT id FROM mytable WHERE name = '[sqlescape(%0)]' 3498 &DOIT obj = $do *: ... [setq(0, u(SEL_GETID,%0))] ...3532 &DOIT obj = $do *: ... [setq(0,sql(u(SEL_GETID,%0),~,|))] ... 3499 3533 3500 3534 See also: sqlescape(), @sql 1.8.1/game/txt/hlp/penntop.hlp
r511 r515 1186 1186 pattern, and match the corresponding characters in the subject. 1187 1187 1188 There are two different sets of meta-characters: those that are1188 There are two different sets of meta-characters: those that are 1189 1189 recognized anywhere in the pattern except within square brackets, 1190 1190 and those that are recognized in square brackets. Outside square … … 1231 1231 (Cont'd in help regexp syntax4) 1232 1232 & regexp syntax4 1233 A backlash can also two useful assertions -- conditions that1233 A backlash can also be used for two useful assertions -- conditions that 1234 1234 must be met at a particular point in a match: 1235 1235 … … 1517 1517 Nonstandard attributes are set using &<attrib> <obj>=<value> 1518 1518 Attributes may also be set using @set <obj>=<attrib>:<value> 1519 or the attrib_set() or set() functions. 1519 1520 1520 1521 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: 1525 1527 @va me <--- wipes out my VA attribute 1526 1528 @va me= <--- sets my VA attribute to be empty … … 1529 1531 are gone forever. 1530 1532 1531 See also ATTRIBUTES, NON-STANDARD ATTRIBUTES, @set, @wipe 1533 See also ATTRIBUTES, NON-STANDARD ATTRIBUTES, @set, @wipe, attrib_set(), 1534 set(), wipe() 1532 1535 & SPOOFING 1533 1536 Spoofing is the act of making other characters think that a person … … 1601 1604 %c = text of the last command, _before_ evaluation. 1602 1605 %? = The current function invocation and depth counts. 1603 %+ = The number of arguments passed to the current function.1606 %+ = The number of arguments passed to the current ufun. 1604 1607 %qN = the equivalent of r(N), a register set by a setq() function. 1605 1608 1.8.1/game/txt/hlp/pennv180.hlp
r511 r515 1 & 1.8.0p8 2 Version 1.8.0 patchlevel 8 August 29, 2005 3 4 Fixes: 5 * /noflagcopy switch to @cpattr/@mvattr works now. Report by 6 Kimiko Muffin. 7 * SHS encryption now works on 64-bit architectures that define 8 uint32_t. Report by Licenser@M*U*S*H. 9 10 <
