Changeset 469
- Timestamp:
- 08/16/06 01:19:38 (2 years ago)
- Files:
-
- 1.7.7/CHANGES.177 (modified) (1 diff)
- 1.7.7/COPYRITE (modified) (1 diff)
- 1.7.7/Patchlevel (modified) (1 diff)
- 1.7.7/README.SQL (modified) (1 diff)
- 1.7.7/game/README (modified) (2 diffs)
- 1.7.7/game/aliascnf.dst (modified) (1 diff)
- 1.7.7/game/mushcnf.dst (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennattr.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennchat.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/penncmd.hlp (modified) (9 diffs)
- 1.7.7/game/txt/hlp/penncode.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennfunc.hlp (modified) (14 diffs)
- 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/attrib.h (modified) (2 diffs)
- 1.7.7/hdrs/conf.h (modified) (2 diffs)
- 1.7.7/hdrs/dbdefs.h (modified) (1 diff)
- 1.7.7/hdrs/externs.h (modified) (7 diffs)
- 1.7.7/hdrs/extmail.h (modified) (1 diff)
- 1.7.7/hdrs/flags.h (modified) (1 diff)
- 1.7.7/hdrs/game.h (modified) (2 diffs)
- 1.7.7/hdrs/lock.h (modified) (1 diff)
- 1.7.7/hdrs/mysocket.h (modified) (1 diff)
- 1.7.7/hdrs/switches.h (modified) (1 diff)
- 1.7.7/hdrs/version.h (modified) (1 diff)
- 1.7.7/po/Makefile (modified) (1 diff)
- 1.7.7/src/Makefile.SH (modified) (80 diffs)
- 1.7.7/src/SWITCHES (modified) (1 diff)
- 1.7.7/src/access.c (modified) (2 diffs)
- 1.7.7/src/atr_tab.c (modified) (1 diff)
- 1.7.7/src/attrib.c (modified) (5 diffs)
- 1.7.7/src/boolexp.c (modified) (10 diffs)
- 1.7.7/src/bsd.c (modified) (15 diffs)
- 1.7.7/src/cmdlocal.dst (modified) (2 diffs)
- 1.7.7/src/cmds.c (modified) (5 diffs)
- 1.7.7/src/command.c (modified) (9 diffs)
- 1.7.7/src/conf.c (modified) (3 diffs)
- 1.7.7/src/cque.c (modified) (10 diffs)
- 1.7.7/src/create.c (modified) (2 diffs)
- 1.7.7/src/db.c (modified) (12 diffs)
- 1.7.7/src/destroy.c (modified) (2 diffs)
- 1.7.7/src/extchat.c (modified) (3 diffs)
- 1.7.7/src/extmail.c (modified) (5 diffs)
- 1.7.7/src/filecopy.c (modified) (2 diffs)
- 1.7.7/src/flags.c (modified) (5 diffs)
- 1.7.7/src/function.c (modified) (13 diffs)
- 1.7.7/src/fundb.c (modified) (13 diffs)
- 1.7.7/src/funlist.c (modified) (43 diffs)
- 1.7.7/src/funlocal.dst (modified) (1 diff)
- 1.7.7/src/funmisc.c (modified) (8 diffs)
- 1.7.7/src/funstr.c (modified) (9 diffs)
- 1.7.7/src/funtime.c (modified) (1 diff)
- 1.7.7/src/funufun.c (modified) (3 diffs)
- 1.7.7/src/game.c (modified) (32 diffs)
- 1.7.7/src/local.dst (modified) (1 diff)
- 1.7.7/src/lock.c (modified) (3 diffs)
- 1.7.7/src/look.c (modified) (26 diffs)
- 1.7.7/src/malias.c (modified) (1 diff)
- 1.7.7/src/move.c (modified) (3 diffs)
- 1.7.7/src/myssl.c (modified) (2 diffs)
- 1.7.7/src/notify.c (modified) (2 diffs)
- 1.7.7/src/parse.c (modified) (4 diffs)
- 1.7.7/src/predicat.c (modified) (8 diffs)
- 1.7.7/src/rob.c (modified) (1 diff)
- 1.7.7/src/set.c (modified) (15 diffs)
- 1.7.7/src/speech.c (modified) (4 diffs)
- 1.7.7/src/sql.c (modified) (2 diffs)
- 1.7.7/src/strutil.c (modified) (4 diffs)
- 1.7.7/src/switchinc.c (modified) (1 diff)
- 1.7.7/src/timer.c (modified) (7 diffs)
- 1.7.7/src/unparse.c (modified) (2 diffs)
- 1.7.7/src/utils.c (modified) (1 diff)
- 1.7.7/src/version.c (modified) (2 diffs)
- 1.7.7/src/wild.c (modified) (8 diffs)
- 1.7.7/src/wiz.c (modified) (13 diffs)
- 1.7.7/win32/cmds.h (modified) (3 diffs)
- 1.7.7/win32/funs.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.7.7/CHANGES.177
r467 r469 18 18 19 19 ========================================================================== 20 21 Version 1.7.7 patchlevel 35 July 21, 2004 22 23 Attributes: 24 * NO_NAME and NO_SPACE attribute flags, when applied to @o-message 25 attributes, omit either the enactor's name or the space after it 26 when sending the message to others. Patch by Walker@M*U*S*H. [3] 27 Commands: 28 * @break <expression>=<new command> now runs <new command> 29 instead of simply stopping execution when <expression> is true. 30 New command @assert breaks and runs new command when <expression> 31 is false. Suggested by Philip Mak and Zebranky@M*U*S*H. Patch by 32 Walker@M*U*S*H. 33 * The new command 'huh_command' is responsible for handling unmatched 34 command input. By default, it produces the usual Huh? message, but 35 it can be overridden with @hook. Logging of huhs is now controlled 36 in restrict.cnf and the log_huhs mush.cnf directive is removed. 37 Suggested by T'orA and Walker@M*U*S*H. 38 * New @decompile/prefix switch generalizes @decompile/tf. 39 Prefixes are now applied even when decompiling multiple attributes, 40 and a bug in doing so is corrected. Patch by Walker@M*U*S*H. 41 * New @edit/first switch only replaces first occurrence of string. 42 Suggested by Kevin@M*U*S*H. 43 Functions: 44 * malias() function for examining mail aliases. Inspired by 45 Kevin@M*U*S*H. 46 * llocks()/locks() lists locks on an object. Patch by Walker@M*U*S*H. 47 * lset() function works like @lset. Patch by Walker@M*U*S*H. 48 * lockflags() and llockflags() show short and long flags set on a lock. 49 Patch by Walker@M*U*S*H. 50 * lattrp() is lattr() including parent attribs. Patch by Walker@M*U*S*H. 51 * nattr(obj/wildcardpattern) is now supported. Patch by Walker@M*U*S*H. 52 * nattrp() is nattr() including parent attribs. Patch by Walker@M*U*S*H. 53 * xattr(obj/wildcardpattern,start,count) extracts the corresponding 54 elements from lattr(). xattrp() is xattr() including parent attribs. 55 Patch by Walker@M*U*S*H. 56 Minor changes (user-visible): 57 * @lset and lock() recognize locks beginning with user:. Patch by 58 Walker@M*U*S*H. 59 * When a player causes an ambiguous channel match, the error message 60 mentions CHAN_USEFIRSTMATCH, which now has a help entry. 61 Suggested by Luke@M*U*S*H. 62 * New sort options: sorting by dbref name, idle time, connection seconds, 63 creation time, owner dbref, and attribute values. sort() and any 64 functions that use list2arr() are now ansi-aware. Patch by Walker@M*U*S*H. 65 * You can @name yourself to your @alias; this swaps name and alias. 66 Suggested by Oriens@Alexandria. Patch by Walker@M*U*S*H. 67 Minor changes (internals): 68 * Several global variables are now encapsulated in a single structure 69 to reduce potential namespace clashes. 70 * Reorganization of some filecopy.c code. [SW] 71 Fixes: 72 * @mail manipulation specifying folder 0 explicitly when the 73 current folder is non-zero didn't work right. Report by 74 Jess Hawthorne. 75 * Buffer overflow in string handling fixed. Report by Ashen-Shugar. 76 * @sitelock/name of an already locked name no longer creates extra 77 entries. Report by Nymeria@M*U*S*H. 78 * make depend no longer produces an unterminated Makefile.SH. 79 Reported by Bytor and Cheetah@M*U*S*H. 80 * Help fixes by [SW]. 81 * Fix to replace_string2 to prevent overflow situations. Report by 82 Atuarre. [SW]. 83 * Removed non-static shutdownsock prototype in hdrs/mysocket.h. 84 Report by Kholnuu@M*U*S*H. 85 * SQL code should be much more memory-efficient. [SW] 86 * Code cleanup and fixes to some memory leaks with strcoll. [SW] 87 20 88 21 89 Version 1.7.7 patchlevel 34 June 22, 2004 1.7.7/COPYRITE
r443 r469 14 14 * Copyright (c) 1994-2002, Jean Marie Diaz, Lydia Leong, and Devin Hooker. 15 15 * 16 * Some code used in this server may have been d irectivefrom TinyMUSH 2.0.16 * Some code used in this server may have been derived from TinyMUSH 2.0. 17 17 * Copyright (c) 1995, Joseph Traub, Glenn Crocker. 18 18 * 19 * Some code used in this server may have been d irectivefrom TinyMUD.19 * Some code used in this server may have been derived from TinyMUD. 20 20 * Copyright (c) 1995, David Applegate, James Aspnes, Timothy Freeman 21 21 * and Bennet Yee. 1.7.7/Patchlevel
r467 r469 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.7.7p3 42 This is PennMUSH 1.7.7p35 1.7.7/README.SQL
r463 r469 17 17 III. SQL setup tips 18 18 19 I. Compiling with OpenSSL19 I. Compiling withi MySQL 20 20 21 21 The Configure script distributed with PennMUSH automatically detects 1.7.7/game/README
r463 r469 11 11 all need to be there. 12 12 13 WIN32 :13 WIN32 WITH MSVC++: 14 14 Under win32 using the Microsoft compiler, ignore the restart script. 15 15 In the configuration file, turn off disk database compression; it is … … 17 17 Poof, you're done. 18 18 19 UNIX :19 UNIX or WIN32 VIA CYGWIN/MINGW: 20 20 Edit the restart script. Change GAMEDIR to the path to the directory 21 21 containing mush.cnf. Read about the optional settings in that file. 1.7.7/game/aliascnf.dst
r459 r469 48 48 function_alias trunc val 49 49 function_alias nattr attrcnt 50 function_alias nattrp attrpcnt 50 51 function_alias iter parse 51 52 function_alias modulo mod 1.7.7/game/mushcnf.dst
r463 r469 497 497 log_commands no 498 498 499 # log commands which produce "Huh?"500 log_huhs no501 502 499 # log forces done by wizards 503 500 log_forces yes 1.7.7/game/txt/hlp/pennattr.hlp
r463 r469 93 93 object may impose stricter restrictions, however, and these may prevent 94 94 access to inherited parent data. 95 & NONAME 96 & NOSPACE 97 @o-* Attributes set NONAME will not prepend the enactor's name to their 98 message. Similarily, attributes set NOSPACE will not append a space 99 to the enactor's name in their message. 95 100 101 > @create anvil 102 > @lock anvil=#false 103 > @ofailure anvil=s strength is not enough to pick up the anvil. 104 > @set anvil/ofailure=nospace 105 > get anvil 106 (spectators see:) 107 Walkers strength is not enough to pick up the anvil. 108 109 > @ofailure anvil=The anvil is too heavy for %N to pick up. 110 > @set anvil/ofailure=noname 111 > get anvil 112 (spectators see:) 113 The anvil is too heavy for Walker to pick up. 1.7.7/game/txt/hlp/pennchat.hlp
r451 r469 34 34 being clobbered by the chat system. 35 35 36 See also: chat 36 See also: chat, CHAN_USEFIRSTMATCH 37 & CHAN_USEFIRSTMATCH 38 CHAN_USEFIRSTMATCH (any type) 39 40 When this flag is set on an object that uses the chat system, 41 channel name matching will default to the first matching channel 42 in cases of ambiguity. Without this flag, attempting to use an 43 ambiguous partial channel name will produce an error. 44 37 45 & @cemit 38 46 @cemit[/noisy][/noeval] <channel>=<message> 1.7.7/game/txt/hlp/penncmd.hlp
r467 r469 419 419 420 420 & @BREAK 421 @break <boolean> 421 & @ASSERT 422 @break <boolean>[=<command list>] 423 @assert <boolean>[=<command list>] 422 424 423 425 @break stops the execution of further commands in the current action 424 list if its argument is a true value. It doesn't affect new queue 425 entries made by previous commands in the action list. Very useful to 426 people who don't like @switch. 426 list if <boolean> is a true value. It doesn't affect new queue entries 427 made by previous commands in the action list. Very useful to people who 428 don't like @switch. If <command> is given, it is executed instead of 429 the rest of the commands in the current queue. 430 431 @assert does the inverse: stopping execution if <boolean> evaluse to false. 427 432 428 433 Examples: … … 805 810 & @decompile 806 811 @decompile[</switch>] <object>[/<attribute-pattern>] 807 @decompile/ tf <object>/<attrib>812 @decompile/prefix <object>[/<attribute-pattern>]=<prefix> 808 813 809 814 This command produces a list of the commands that you would have to … … 811 816 from one MUSH to another, or for making logs of important objects to 812 817 protect against an accidental @nuke or a crash. 818 819 When the /prefix switch is specified, and a prefix given, all output 820 lines will be prefixed with <prefix>. Good for creating client-side 821 scripts to edit code with. 813 822 814 823 You can either @decompile an entire object, or just certain parts of it. … … 839 848 & @decompile3 840 849 841 @decompile/tf <object>/<attribute> 842 843 The /tf switch is useful only for users of the popular "TinyFugue" 844 client program (available from ftp.tcp.com in the directory 845 /pub/muds/Clients/tinyfugue). If you do have this program, this 846 switch is invaluable for editing code online, because it will grab the 847 code to set that attribute and put it into your buffer. 848 849 To use @dec/tf, first type this command into TinyFugue: 850 851 /def -ag -mglob -p100 -t"FugueEdit > *" fe = /grab %-2 852 853 (you can also put this into your .tfrc so it will automatically 854 be entered every time you start TinyFugue (tf).) This command works 855 just like the 'FugueEdit' object originally created by van@TinyTIM. 850 @decompile/tf <object>[/<attribute>] 851 852 Supplying the /tf switch makes @decompile act exactly as if you typed: 853 @decompile/prefix <object>[/<attribute>]=FugueEdit >%b 856 854 857 855 You can use a string other than "FugueEdit > " by setting your 858 856 TFPREFIX attribute. This is probably a good idea. 857 858 The /tf switch is handy for grabbing code and placing it right 859 into your input window. To do this: 860 861 In TinyFugue: 862 /def -ag -mglob -p100 -t"FugueEdit > *" fe = /grab %-2 863 864 In SimpleMU: 865 Set your Options -> Grab Password 866 @set me=tfprefix:<grabpassword>FugueEdit >%b 867 859 868 See also: CLIENTS, ATTRIBUTES, WILDCARDS, MUSHCODE 860 869 & @describe … … 2162 2171 @name me = "James Bond" 2163 2172 2173 When changing a player's name to their alias, their current name and 2174 their alias are swapped. 2175 2164 2176 Changing the name of <object> will cause object to execute its 2165 2177 ONAME and ANAME. The old name will be passed at %0 to these; … … 2254 2266 If the =<message> part is omitted, the message will be reset. 2255 2267 2256 See also: drop, @drop, @adrop 2268 See also: drop, @drop, @adrop, NONAME, NOSPACE 2257 2269 & @oefail 2258 2270 @oefail <object> [= <message>] … … 2309 2321 If the =<message> part is omitted, the message will be reset. 2310 2322 2311 See also: FAILURE, @lock, @failure, @afailure 2323 See also: FAILURE, @lock, @failure, @afailure, NONAME, NOSPACE 2312 2324 & @ofollow 2313 2325 @ofollow <object> [= <message>] … … 2436 2448 If the =<message> part is omitted, the message will be reset. 2437 2449 2438 See also: take, @success, @asuccess, @lock, FAILURE 2450 See also: take, @success, @asuccess, @lock, FAILURE, NONAME, NOSPACE 2439 2451 & @otport 2440 2452 @otport <object> [=<message>] … … 2918 2930 mortal_dark (m) Attribute cannot be seen by mortals. This flag can only 2919 2931 be set by royalty and wizards. "hidden" is a synonym. 2932 2933 Continued in 'help attribute flags2' 2934 & attribute flags2 2935 noname (N) Attribute won't show name in @o-* messages. 2936 nospace (s) Attribute won't append a space in @o-* messages. 2920 2937 wizard (w) Attribute can only be set by wizards. 2921 2938 This flag can only be set by royalty and wizards. 1.7.7/game/txt/hlp/penncode.hlp
r459 r469 62 62 Copyright (c) 1994-2002, Jean Marie Diaz, Lydia Leong, and Devin Hooker. 63 63 64 Some code used in this server may have been d irectivefrom TinyMUSH 2.0.64 Some code used in this server may have been derived from TinyMUSH 2.0. 65 65 Copyright (c) 1995, Joseph Traub, Glenn Crocker. 66 66 67 Some code used in this server may have been d irectivefrom TinyMUD.67 Some code used in this server may have been derived from TinyMUD. 68 68 Copyright (c) 1995, David Applegate, James Aspnes, Timothy Freeman 69 69 and Bennet Yee. 1.7.7/game/txt/hlp/pennfunc.hlp
r467 r469 145 145 folderstats() mail() maildstats() mailfrom() mailfstats() 146 146 mailsend() mailstats() mailstatus() mailsubject() mailtime() 147 malias() 147 148 148 149 & List functions … … 1166 1167 returns <string> after adding the escape character ('\') at the 1167 1168 beginning of the string, and before the following characters: 1168 % ; [ ] { } \ ( ) , 1169 % ; [ ] { } \ ( ) , ^ $ 1169 1170 1170 1171 This function prevents strings entered by players from causing side … … 1314 1315 1315 1316 Given no arguments, this function returns a space-separated list 1316 of all flag names know to the server.1317 of all flag names known to the server. 1317 1318 1318 1319 See also: flags() … … 1880 1881 See also: first(), rest() 1881 1882 & LATTR() 1883 & LATTRP() 1882 1884 lattr(<object>[/<attribute pattern>]) 1885 lattrp(<object>[/<attribute pattern>]) 1883 1886 1884 1887 Returns a space-separated list of the attribute names on the object. … … 1891 1894 wildcards as examine (?, *, **). 1892 1895 1896 lattrp() also includes attributes inherited from parents. 1897 1893 1898 See also: nattr(), examine 1894 1899 & NATTR() 1900 & NATTRP() 1895 1901 & ATTRCNT() 1896 nattr(<object>) 1897 attrcnt(<object>) 1902 & ATTRPCNT() 1903 nattr(<object>[/<attribute-pattern>]) 1904 nattrp(<object>[/<attribute-pattern>]) 1905 attrcnt(<object>[/<attribute-pattern>]) 1906 attrpcnt(<object>[/<attribute-pattern>]) 1898 1907 1899 1908 This function (known by two names) returns the number of attributes … … 1903 1912 than words(lattr()) and doesn't suffer from buffer length constraints. 1904 1913 It's designed primarily for statistical purposes. 1914 1915 nattrp() and attrpcnt() also count matching attributes on the parent. 1905 1916 1906 1917 See also: lattr() … … 2125 2136 This is a side-effect function and may not be enabled on some MUSHes. 2126 2137 2127 See also: @lock, locktypes 2138 See also: @lock, locktypes, lockflags(), llockflags(), lset(), llocks() 2139 & LLOCKS() 2140 & LOCKS() 2141 llocks(<object>) 2142 locks(<object>) 2143 2144 llocks(), aliased locks(), list locks set on <object>, including 2145 user-defined locks (prefixed with USER:) 2146 2147 > @lock me==me 2148 > @lock/use me==me 2149 > @lock/user:itsme me==me 2150 > th llocks(me) 2151 Basic USER:ITSME Use 2152 2153 See also: lock(), lset(), lockflags(), llockflags() 2154 & LOCKFLAGS() 2155 lockflags(<object>[/<locktype>]) 2156 lockflags() 2157 2158 lockflags() returns a string consisting of the flags attached to 2159 the specified lock on the object. The string is a single word 2160 made up of all the appropriate flag letters. 2161 2162 Given no arguments, this function returns a string consisting of 2163 all the flag letters the server knows. 2164 2165 See also: llockflags(), lset(), lock(), llocks() 2166 & LLOCKFLAGS() 2167 llockflags(<object>[/<locktype>]) 2168 llockflags() 2169 2170 llockflags returns a space-separated list consisting of the names 2171 of flags attached to the specified lock on the object. 2172 2173 Given no arguments, this function returns a space-separated list 2174 of all flag names known to the server. 2175 2176 See also: llockflags(), lset(), lock(), llocks() 2177 & LSET() 2178 lset(<object>/<lock type>,[!]<flag>) 2179 2180 This functions sets or clears flags on locks. 2181 2182 See 'help @lset' for more information on what flags are available. 2128 2183 & LOG() 2129 2184 log(<number>[, <base>]) … … 2319 2374 This function sends a message to a player, just like @mail/send. 2320 2375 It returns nothing if successful, or an error message. 2376 & MALIAS() 2377 malias([<delimiter>]) 2378 malias(<malias name>) 2379 malias(<malias name>[,<delimiter>]) 2380 2381 With no arguments, malias() returns the list of all malias names 2382 which are visible to the player. With two arguments, returns the list 2383 of dbrefs that are members of the given malias, delimited by 2384 <delimiter>. 2385 2386 With one argument, the behavior is ambiguous. If the argument 2387 matches a malias, returns the list of dbrefs that are memebrs of 2388 the malias, space-delimited. If not, it's treated as a no-argument 2389 case with a delimiter. 2390 2321 2391 & MAP() 2322 2392 map([<object>/]<attribute>,<list>[,<delim>][, <osep>]) … … 3189 3259 elements in <list1> that aren't in <list2>. The list that is 3190 3260 returned is sorted. Normally, alphabetic sorting is done. You can 3191 change this with the fourth argument, which takes the same form as3192 sort()'s second. If used with exactly four arguments where the fourth3261 change this with the fourth argument, which is a sort type as defined 3262 in help sorting. If used with exactly four arguments where the fourth 3193 3263 is not a sort type, it's treated instead as the output separator. 3194 3264 … … 3203 3273 elements that are in both <list1> and <list2>. The list that is 3204 3274 returned is sorted. Normally, alphabetic sorting is done. You can 3205 change this with the fourth argument, which takes the same form as3206 sort()'s second. If used with exactly four arguments where the fourth3275 change this with the fourth argument, which is a sort type as defined 3276 in help sorting. If used with exactly four arguments where the fourth 3207 3277 is not a sort type, it's treated instead as the output separator. 3208 3278 … … 3274 3344 elements. Think of it as CAT() without words duplicated. The list 3275 3345 returned is sorted. Normally, alphabetic sorting is done. You can 3276 change this with the fourth argument, which takes the same form as3277 sort()'s second. If used with exactly four arguments where the fourth3346 change this with the fourth argument, which is a sort type as defined 3347 in help sorting. If used with exactly four arguments where the fourth 3278 3348 is not a sort type, it's treated instead as the output separator. 3279 3349 … … 3328 3398 the words are dbrefs, it will sort them in order of smallest to 3329 3399 largest. Otherwise, it will perform a lexicographic sort. 3330 3331 The following letters as a second argument specify a certain sort: 3332 3333 a: Sort lexicographically (Maybe case-sensitive). 3334 i: Sort lexicographically (Always case-insensitive). 3335 d: Sort dbrefs. 3336 n: Sort integer numbers. 3337 f: Sort decimal numbers. 3338 3339 Whether or not the a sort type is case-sensitive or not depends 3340 on the particular mush and its environment. 3341 3400 3401 The second argument is a sort type. See help sorting. 3402 3342 3403 The optional third argument gives the list's delimiter character. 3343 3404 If not present, <delimiter> defaults to a space. … … 3368 3429 3369 3430 See also: anonymous attributes 3431 & SORTING 3432 In functions where you can specify a sorting method, you can provide 3433 one of these sort types: 3434 3435 Type Sorts: 3436 a Sorts lexicographically (Maybe case-sensitive). 3437 i Sorts lexicographically (Always case-insensitive). 3438 d Sorts dbrefs. 3439 n Sorts integer numbers. 3440 f Sorts decimal numbers. 3441 name Sorts dbrefs by their names. (Maybe case-sensitive) 3442 namei Sorts dbrefs by their names. (Always case-insensitive) 3443 conn Sorts dbrefs by their connection time. 3444 idle Sorts dbrefs by their idle time. 3445 owner Sorts dbrefs by their owner dbrefs. 3446 loc Sorts dbrefs by their location dbref. 3447 ctime Sorts dbrefs by their creation time. 3448 3449 The special sort key attr:<aname> or attri:<aname> will sort dbrefs 3450 according to their <aname> attributes. For example: Separating by 3451 &factions or &species attrs. attr is probably case-sensitive, and 3452 attri is case-insensitive. 3453 3454 Whether or not the 'a' sort type is case-sensitive or not depends 3455 on the particular mush and its environment. 3456 3457 See also: sort(), sortby(), setunion(), setinter(), setdiff() 3370 3458 & SOUNDEX() 3371 3459 soundex(<word>) … … 4288 4376 @desc here=[iter(wrap(Hanging indent,72,76,|), 4289 4377 [switch(#@,>1,space(4))]##,|,%r)] 4290 4378 & XATTR() 4379 & XATTRP() 4380 xattr(<object>[/<attribute pattern>],start,count) 4381 xattrp(<object>[/<attribute pattern>],start,count) 4382 4383 xattr() fetches <count> or fewer attribute names from <object> 4384 starting at position <start>. It is useful when the number of attributes 4385 on an object causes lattr() to exceed the buffer limit. 4386 4387 It is equivalent to extract(lattr(<object>[/<pattern>]),<start>,<count>) 4388 4389 xattrp() will include attributes from parents. Do note that parent 4390 attributes are listed _after_ child attributes, not sorted 4391 alphabetically. 4392 4393 See also: nattr(), lattr() 4291 4394 & XGET() 4292 4395 xget(<object>, <attribute>) 1.7.7/game/txt/hlp/pennv177.hlp
r467 r469 1 & 1.7.7p3 41 & 1.7.7p35 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 35 July 21, 2004 15 16 Attributes: 17 * NO_NAME and NO_SPACE attribute flags, when applied to @o-message 18 attributes, omit either the enactor's name or the space after it 19 when sending the message to others. Patch by Walker@M*U*S*H. [3] 20 Commands: 21 * @break <expression>=<new command> now runs <new command> 22 instead of simply stopping execution when <expression> is true. 23 New command @assert breaks and runs new command when <expression> 24 is false. Suggested by Philip Mak and Zebranky@M*U*S*H. Patch by 25 Walker@M*U*S*H. 26 * The new command 'huh_command' is responsible for handling unmatched 27 command input. By default, it produces the usual Huh? message, but 28 it can be overridden with @hook. Logging of huhs is now controlled 29 in restrict.cnf and the log_huhs mush.cnf directive is removed. 30 Suggested by T'orA and Walker@M*U*S*H. 31 * New @decompile/prefix switch generalizes @decompile/tf. 32 Prefixes are now applied even when decompiling multiple attributes, 33 and a bug in doing so is corrected. Patch by Walker@M*U*S*H. 34 * New @edit/first switch only replaces first occurrence of string. 35 Suggested by Kevin@M*U*S*H. 36 Functions: 37 * malias() function for examining mail aliases. Inspired by 38 Kevin@M*U*S*H. 39 * llocks()/locks() lists locks on an object. Patch by Walker@M*U*S*H. 40 * lset() function works like @lset. Patch by Walker@M*U*S*H. 41 * lockflags() and llockflags() show short and long flags set on a lock. 42 Patch by Walker@M*U*S*H. 43 * lattrp() is lattr() including parent attribs. Patch by Walker@M*U*S*H. 44 * nattr(obj/wildcardpattern) is now supported. Patch by Walker@M*U*S*H. 45 * nattrp() is nattr() including parent attribs. Patch by Walker@M*U*S*H. 46 * xattr(obj/wildcardpattern,start,count) extracts the corresponding 47 elements from lattr(). xattrp() is xattr() including parent attribs. 48 Patch by Walker@M*U*S*H. 49 Minor changes (user-visible): 50 * @lset and lock() recognize locks beginning with user:. Patch by 51 Walker@M*U*S*H. 52 * When a player causes an ambiguous channel match, the error message 53 mentions CHAN_USEFIRSTMATCH, which now has a help entry. 54 Suggested by Luke@M*U*S*H. 55 * New sort options: sorting by dbref name, idle time, connection seconds, 56 creation time, owner dbref, and attribute values. sort() and any 57 functions that use list2arr() are now ansi-aware. Patch by Walker@M*U*S*H. 58 * You can @name yourself to your @alias; this swaps name and alias. 59 Suggested by Oriens@Alexandria. Patch by Walker@M*U*S*H. 60 Minor changes (internals): 61 * Several global variables are now encapsulated in a single structure 62 to reduce potential namespace clashes. 63 * Reorganization of some filecopy.c code. [SW] 64 Fixes: 65 * @mail manipulation specifying folder 0 explicitly when the 66 current folder is non-zero didn't work right. Report by 67 Jess Hawthorne. 68 * Buffer overflow in string handling fixed. Report by Ashen-Shugar. 69 * @sitelock/name of an already locked name no longer creates extra 70 entries. Report by Nymeria@M*U*S*H. 71 * make depend no longer produces an unterminated Makefile.SH. 72 Reported by Bytor and Cheetah@M*U*S*H. 73 * Help fixes by [SW]. 74 * Fix to replace_string2 to prevent overflow situations. Report by 75 Atuarre. [SW]. 76 * Removed non-static shutdownsock prototype in hdrs/mysocket.h. 77 Report by Kholnuu@M*U*S*H. 78 * SQL code should be much more memory-efficient. [SW] 79 * Code cleanup and fixes to some memory leaks with strcoll. [SW] 80 81 82 & 1.7.7p34 14 83 Version 1.7.7 patchlevel 34 June 22, 2004 15 84 1.7.7/game/txt/hlp/pennvOLD.hlp
r467 r469 4419 4419 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 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 4421 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 4422 4422 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 4423 4423 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 1.7.7/hdrs/attrib.h
r467 r469 42 42 extern ATTR *atr_get(dbref thing, char const *atr); 43 43 extern ATTR *atr_get_noparent(dbref thing, char const *atr); 44 typedef int (*aig_func) (dbref, dbref, const char *, ATTR *, void *);44 typedef int (*aig_func) (dbref, dbref, dbref, const char *, ATTR *, void *); 45 45 extern int atr_iter_get(dbref player, dbref thing, char const *name, 46 46 int mortal, aig_func func, void *args); 47 47 extern int atr_iter_get_parent(dbref player, dbref thing, char const *name, 48 int mortal, aig_func func); 48 int mortal, aig_func func, void *args); 49 extern int atr_pattern_count(dbref player, dbref thing, const char *name, 50 int doparent, int mortal); 49 51 extern ATTR *atr_complete_match(dbref player, char const *atr, dbref privs); 50 52 extern void atr_free(dbref thing); … … 99 101 #define AF_ANON 0x4000000 /* INTERNAL: Attribute doesn't really 100 102 exist in the database */ 103 #define AF_NONAME 0x8000000 /* No name in did_it */ 104 #define AF_NOSPACE 0x10000000 /* No space in did_it */ 101 105 102 106 /* external predefined attributes. */ 1.7.7/hdrs/conf.h
r463 r469 154 154 char guest_file[2][256]; /**< Names of text and html guest files */ 155 155 int log_commands; /**< Should we log all commands? */ 156 int log_huhs; /**< Should we log commands that produce a Huh? */157 156 int log_forces; /**< Should we log force commands? */ 158 157 int support_pueblo; /**< Should the MUSH send Pueblo tags? */ … … 440 439 #define READ_REMOTE_DESC (options.read_remote_desc) 441 440 441 typedef struct globals_table GLOBALTAB; 442 443 struct globals_table { 444 int database_loaded; /**< True after the database has been read. */ 445 char dumpfile[200]; /**< File name to dump database to */ 446 time_t start_time; /**< MUSH start time (since process exec'd) */ 447 time_t first_start_time; /**< MUSH start time (since last shutdown) */ 448 time_t last_dump_time; /**< Time of last successful db save */ 449 int reboot_count; /**< Number of reboots so far */ 450 int paranoid_dump; /**< if paranoid, scan before dumping */ 451 int paranoid_checkpt; /**< write out an okay message every x objs */ 452 long indb_flags; /**< flags set in the input database */ 453 int on_second; /**< is it time for per-second processes? */ 454 }; 455 456 extern GLOBALTAB globals; 457 442 458 #endif /* __CONF_H */ 1.7.7/hdrs/dbdefs.h
r467 r469 13 13 #include "htab.h" 14 14 #include "chunk.h" 15 16 extern int depth;17 15 18 16 extern dbref first_free; /* pointer to free list */ 1.7.7/hdrs/externs.h
r467 r469 97 97 void dump_reboot_db(void); 98 98 void close_ssl_connections(void); 99 int least_idle_time(dbref player); 100 int least_idle_time_priv(dbref player); 101 int most_conn_time(dbref player); 102 int most_conn_time_priv(dbref player); 99 103 char *least_idle_ip(dbref player); 100 104 char *least_idle_hostname(dbref player); … … 165 169 __attribute__ ((__format__(__printf__, 2, 3))); 166 170 171 /* From command.c */ 172 void generic_command_failure(dbref player, dbref cause, char *string); 173 167 174 /* From compress.c */ 168 175 /* Define this to get some statistics on the attribute compression … … 185 192 186 193 /* From cque.c */ 187 extern char *wenv[10], renv[NUMQ][BUFFER_LEN]; 188 extern char *wnxt[10], *rnxt[NUMQ]; 189 extern int process_command_port; 194 struct eval_context { 195 char *wenv[10]; /**< working environment (%0-%9) */ 196 char renv[NUMQ][BUFFER_LEN]; /**< working registers q0-q9,qa-qz */ 197 char *wnxt[10]; /**< environment to shove into the queue */ 198 char *rnxt[NUMQ]; /**< registers to shove into the queue */ 199 int process_command_port; /**< port number that a command came from */ 200 dbref cplr; /**< initiating player */ 201 char ccom[BUFFER_LEN]; /**< raw command */ 202 int break_called; /**< Has the break command been called? */ 203 char break_replace[BUFFER_LEN]; /**< What to replace the break with */ 204 }; 205 206 typedef struct eval_context EVAL_CONTEXT; 207 extern EVAL_CONTEXT global_eval_context; 208 190 209 extern void do_second(void); 191 210 extern int do_top(int ncom); … … 526 545 #define local_wild_match(s,d) local_wild_match_case(s, d, 0) 527 546 528 /** Types of lists, based on what their elements are */ 529 typedef enum list_type { 530 ALPHANUM_LIST, NUMERIC_LIST, DBREF_LIST, FLOAT_LIST, INSENS_ALPHANUM_LIST, 531 UNKNOWN_LIST 532 } list_type; 547 /** Types of lists */ 548 549 extern char ALPHANUM_LIST[]; 550 extern char INSENS_ALPHANUM_LIST[]; 551 extern char DBREF_LIST[]; 552 extern char NUMERIC_LIST[]; 553 extern char FLOAT_LIST[]; 554 extern char DBREF_NAME_LIST[]; 555 extern char DBREF_NAMEI_LIST[]; 556 extern char DBREF_IDLE_LIST[]; 557 extern char DBREF_CONN_LIST[]; 558 extern char DBREF_CTIME_LIST[]; 559 extern char DBREF_OWNER_LIST[]; 560 extern char DBREF_LOCATION_LIST[]; 561 extern char DBREF_ATTR_LIST[]; 562 extern char DBREF_ATTRI_LIST[]; 563 extern char *UNKNOWN_LIST; 564 533 565 /* From function.c and other fun*.c */ 534 566 extern char *strip_braces(char const *line); … … 541 573 (char *buff, char **bp, int nfargs, char **fargs, int sep_arg, char *sep); 542 574 extern int get_gender(dbref player); 543 extern int gencomp(char *a, char *b, list_type sort_type); 575 extern int gencomp(dbref player, char *a, char *b, char *sort_type); 576 extern const char *do_get_attrib(dbref executor, dbref thing, 577 const char *aname); 544 578 545 579 /* From destroy.c */ … … 563 597 extern dbref db_write(FILE * f, int flag); 564 598 extern dbref db_read(FILE * f); 599 600 /* From filecopy.c */ 601 extern int rename_file(const char *origname, const char *newname); 565 602 566 603 /* local.c */ … … 583 620 584 621 /* funlist.c */ 585 void do_gensort( char *s[], int n, list_typesort_type);622 void do_gensort(dbref player, char *s[], int n, char *sort_type); 586 623 587 624 /* sig.c */ 1.7.7/hdrs/extmail.h
r465 r469 19 19 #define M_REPLY 0x4000 20 20 #define M_FOLDER 0x8000 /* In mail selector, all msgs in cur folder */ 21 /* 0x4000 - 0x8000 available */22 21 23 22 #define MAX_FOLDERS 15 1.7.7/hdrs/flags.h
r467 r469 120 120 extern const char *power_to_string(int pwr); 121 121 extern void decompile_flags_generic(dbref player, dbref thing, const char *name, 122 const char *ns, const char *command); 123 #define decompile_flags(p,t,n) decompile_flags_generic(p,t,n,"FLAG","@set") 124 #define decompile_powers(p,t,n) decompile_flags_generic(p,t,n,"POWER","@power") 122 const char *ns, const char *command, 123 const char *prefix); 124 #define decompile_flags(p,t,n,r) decompile_flags_generic(p,t,n,"FLAG","@set",r) 125 #define decompile_powers(p,t,n,r) decompile_flags_generic(p,t,n,"POWER","@power",r) 125 126 126 127 #define twiddle_flag_bitmask(bm,b,neg) (neg ? clear_flag_bitmask(bm,b) : \ 1.7.7/hdrs/game.h
r467 r469 75 75 extern void do_entrances(dbref player, const char *where, char **argv, 76 76 enum ent_type val); 77 enum dec_type { DEC_NORMAL, DEC_DB, DEC_ TF, DEC_FLAG, DEC_ATTR };
