Changeset 441
- Timestamp:
- 08/13/06 00:10:18 (2 years ago)
- Files:
-
- 1.7.7/CHANGES.176 (modified) (1 diff)
- 1.7.7/CHANGES.177 (modified) (1 diff)
- 1.7.7/MANIFEST (modified) (4 diffs)
- 1.7.7/Makefile.SH (modified) (2 diffs)
- 1.7.7/Patchlevel (modified) (1 diff)
- 1.7.7/game/alias.cnf (modified) (1 diff)
- 1.7.7/game/data/README (added)
- 1.7.7/game/mushcnf.dst (modified) (1 diff)
- 1.7.7/game/restart (modified) (1 diff)
- 1.7.7/game/txt/compose.sh.SH (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennattr.hlp (added)
- 1.7.7/game/txt/hlp/pennchat.hlp (modified) (2 diffs)
- 1.7.7/game/txt/hlp/penncmd.hlp (modified) (5 diffs)
- 1.7.7/game/txt/hlp/pennfunc.hlp (modified) (3 diffs)
- 1.7.7/game/txt/hlp/penntop.hlp (modified) (4 diffs)
- 1.7.7/game/txt/hlp/pennv176.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennv177.hlp (modified) (2 diffs)
- 1.7.7/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.7.7/game/txt/index-files.pl (modified) (1 diff)
- 1.7.7/hdrs/attrib.h (modified) (4 diffs)
- 1.7.7/hdrs/conf.h (modified) (1 diff)
- 1.7.7/hdrs/extchat.h (modified) (4 diffs)
- 1.7.7/hdrs/externs.h (modified) (1 diff)
- 1.7.7/hdrs/flags.h (modified) (1 diff)
- 1.7.7/hdrs/lock.h (modified) (2 diffs)
- 1.7.7/hdrs/mushdb.h (modified) (2 diffs)
- 1.7.7/hdrs/mushtype.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/src/SWITCHES (modified) (1 diff)
- 1.7.7/src/attrib.c (modified) (20 diffs)
- 1.7.7/src/bsd.c (modified) (2 diffs)
- 1.7.7/src/cmds.c (modified) (2 diffs)
- 1.7.7/src/command.c (modified) (2 diffs)
- 1.7.7/src/cque.c (modified) (1 diff)
- 1.7.7/src/destroy.c (modified) (2 diffs)
- 1.7.7/src/extchat.c (modified) (29 diffs)
- 1.7.7/src/filecopy.c (modified) (1 diff)
- 1.7.7/src/flags.c (modified) (3 diffs)
- 1.7.7/src/function.c (modified) (1 diff)
- 1.7.7/src/fundb.c (modified) (4 diffs)
- 1.7.7/src/funlist.c (modified) (2 diffs)
- 1.7.7/src/funmisc.c (modified) (1 diff)
- 1.7.7/src/help.c (modified) (8 diffs)
- 1.7.7/src/ident.c (modified) (1 diff)
- 1.7.7/src/lock.c (modified) (5 diffs)
- 1.7.7/src/look.c (modified) (9 diffs)
- 1.7.7/src/move.c (modified) (6 diffs)
- 1.7.7/src/notify.c (modified) (2 diffs)
- 1.7.7/src/predicat.c (modified) (2 diffs)
- 1.7.7/src/set.c (modified) (4 diffs)
- 1.7.7/src/switchinc.c (modified) (1 diff)
- 1.7.7/src/utils.c (modified) (2 diffs)
- 1.7.7/src/wild.c (modified) (1 diff)
- 1.7.7/src/wiz.c (modified) (1 diff)
- 1.7.7/test/testatree.pl (modified) (3 diffs)
- 1.7.7/test/testrand.pl (added)
- 1.7.7/utils/mkcmds.sh.SH (modified) (2 diffs)
- 1.7.7/utils/penn-install (added)
- 1.7.7/win32/funs.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.7.7/CHANGES.176
r433 r441 13 13 14 14 ========================================================================== 15 16 Version 1.7.6 patchlevel 14 September 23, 2003 17 18 Fixes: 19 * Fix to help @search2 by LeeLaLimaLLama@M*U*S*H. 20 * The max file descriptor could get stomped in some cases. [SW] 21 * Powers and toggles on destroyed objects are reset, as they 22 caused anomalous lsearch/haspower behavior. Report by Mordie@M*U*S*H. 23 * Changing channel privs and loading channels with objects no longer 24 permitted could cause crashes. Report by Septimus@SW RP Forum. 25 15 26 16 27 Version 1.7.6 patchlevel 13 August 11, 2003 1.7.7/CHANGES.177
r439 r441 18 18 19 19 ========================================================================== 20 21 Version 1.7.7 patchlevel 21 September 23, 2003 22 23 Major Changes: 24 * Attribute trees. Attributes may now be organized hierarchically 25 like files and directories in a filesystem, using the backtick (`) 26 character as the branch separator. Attribute access restrictions 27 propagate down trees. New wildcard ** is introduced to match 28 all attributes at all tree levels. Suggested by Tabbifli. [TAP] 29 Locks: 30 * New framework for performing lock failure activities in hardcode. 31 As a proof-of-concept, the attributes FOLLOW_LOCK`FAILURE, 32 FOLLOW_LOCK`OFAILURE, FOLLOW_LOCK`AFAILURE do what you'd expect 33 when set on a potential leader. Suggested by Sholevi@M*U*S*H. 34 Channels: 35 * New per-channel flags NoTitles, NoNames, and NoCemit do what you'd 36 expect. Set them with @chan/privs. Based on suggestion by 37 Saturn@M3. 38 * @chan/recall/quiet omits timestamps. Suggested by Vadiv@M*U*S*H. 39 Commands: 40 * 'help <wildcard-pattern>' now lists all help topics that match that 41 pattern. By popular request. [MUX,SW] 42 * @flag/letter can be used to change or clear the one-letter alias for a 43 flag. Suggested by Nymeria@M*U*S*H. [SW] 44 * @flag/list by God notes disabled flags. Suggested by Nymeria@M*U*S*H. [SW] 45 Functions: 46 * rand() now comes in a two-argument (low,high) flavor, and randword() 47 selects a random word from a list. The latter is aliased to 48 pickrand() to match Mux's name. Patch by Luke@M*U*S*H. 49 Minor Changes: 50 * Although we're Pueblo 2.50 compliant, go back to sending Pueblo 1.10 51 as the server version until everyone upgrades their clients so 52 they can handle the 2.50 string. Suggested by Shirow. 53 * The locate() function is no longer noisy (no longer notifies 54 the executor in addition to returning a value). Suggested by 55 Mystery8@ST:AW. 56 * @lock/interact now has a higher priority than other interaction 57 checks, so it will work for Wizards. Suggested by Viila@M*U*S*H. 58 * Tweaks to facilitate a Debian package of PennMUSH. [EEH] 59 Fixes: 60 * max descriptor could get stomped in some cases. [SW] 61 * Removed extra struct def in hdrs/mushtype.h. Suggested by Kyle. 62 * Help tweak by Kevin@M*U*S*H. 63 * Fix to locks on players messing up their connection failure counts. 64 Reported by Luke@M*U*S*H. 65 * Fix to @entrances by Luke@M*U*S*H. 66 * Fix to Win32 not handling a missing minimal.db by Luke@M*U*S*H. 67 * The confirmation message for setting/clearing attribute flags would use 68 the flag name given as an argument, not neccessarily the the full name of 69 the flag. Reported by Vadiv@M*U*S*H. [SW] 70 * Fix a potential memory leak in ident.c [SW] 20 71 21 72 Version 1.7.7 patchlevel 20 September 4, 2003 1.7.7/MANIFEST
r439 r441 159 159 utils/mkcmds.sh.SH 160 160 utils/mkvershlp.pl 161 utils/penn-install 161 162 utils/update-cnf.pl 162 163 utils/update.pl … … 170 171 game/names.cnf 171 172 game/restart 173 game/data/README 172 174 game/log/README 173 175 game/save/README … … 188 190 game/txt/evt/pennmush.evt 189 191 game/txt/hlp/index.hlp 192 game/txt/hlp/pennattr.hlp 190 193 game/txt/hlp/pennchat.hlp 191 194 game/txt/hlp/pennconf.hlp … … 236 239 test/testatree.pl 237 240 test/testhastype.pl 241 test/testrand.pl 1.7.7/Makefile.SH
r439 r441 60 60 GLOBAL_INSTALL=/usr/libexec/pennmush 61 61 62 # Where to install with 'make debianinstall' 63 DEB_INSTALL=$(DESTDIR)/usr/share/games/pennmush/game 64 DEB_BIN=$(DESTDIR)/usr/games 65 62 66 all: config.h options.h autogen game/mush.cnf 63 67 @echo "Making all in src." … … 258 262 @echo "** or symlink that to somewhere easier to run. You may wish to strip them." 259 263 264 debianinstall: install 265 (cd game/txt; make clean compose.sh) 266 $(INSTALLDIR) $(DEB_INSTALL) 267 $(CP) -R game/* $(DEB_INSTALL) 268 -rm -f $(DEB_INSTALL)/netmush $(DEB_INSTALL)/info_slave 269 $(INSTALL) config.sh $(DEB_INSTALL)/config.sh 270 $(INSTALL) src/netmud $(DEB_INSTALL)/netmush 271 $(INSTALL) src/info_slave $(DEB_INSTALL)/info_slave 272 $(INSTALL) utils/penn-install $(DEB_BIN)/penn-install 273 $(CHMOD) a+rX -R $(DEB_INSTALL) 274 $(CHMOD) a+rX $(DEB_BIN)/penn-install 275 @echo "** Files installed in $(DEB_INSTALL)." 276 @echo "** You can run penn-install to create a user directory." 277 260 278 !NO!SUBS! 261 279 chmod 755 Makefile 1.7.7/Patchlevel
r439 r441 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.7.7p2 02 This is PennMUSH 1.7.7p21 1.7.7/game/alias.cnf
r417 r441 47 47 function_alias modulo mod 48 48 function_alias modulo modulus 49 function_alias randword pickrand 49 50 50 51 # For rhost compatibility 1.7.7/game/mushcnf.dst
r433 r441 77 77 #compress_suffix .bz2 78 78 # 79 compress_program compress80 uncompress_program uncompress81 compress_suffix . Z79 compress_program gzip 80 uncompress_program gunzip 81 compress_suffix .gz 82 82 83 83 # Room where new players are created. 1.7.7/game/restart
r439 r441 27 27 if [ ! -f $CONF_FILE ]; then 28 28 echo "CONF_FILE doesn't exist. It's: $CONF_FILE" 29 echo "Create $CONF_FILE from $GAMEDIR/mushcnf.dst" 29 30 exit 1 30 31 fi 1.7.7/game/txt/compose.sh.SH
r433 r441 1 #!/bin/sh 1 2 case $CONFIG in 2 3 '') 1.7.7/game/txt/hlp/pennchat.hlp
r423 r441 127 127 * "open" - you may speak even if you aren't listening to the channel 128 128 * "hide_ok" - you may hide from the channel who list. 129 * "notitles" - chantitles are not displayed in channel messages. 130 * "nonames" - player names are not displayed in channel messages. 131 * "nocemit" - @cemit is prohibited on the channel. 129 132 Specifications may be combined, space-separated. Default is "player" 130 133 … … 143 146 @channel/chown <channel> = <new owner> 144 147 145 The "priv" switch changes the channel's access privileges. 148 The "priv" switch changes the channel's access privileges. Use !<priv> 149 to reset a privilege. 146 150 The "quiet" switch turns the quiet status of a channel on and off. 147 151 The "wipe" switch clears a channel of players without deleting it. 1.7.7/game/txt/hlp/penncmd.hlp
r439 r441 1292 1292 @flag/delete <flag name> 1293 1293 @flag/alias <flag name>=<alias> 1294 @flag/letter <flag name>[=<letter>] 1294 1295 @flag/restrict <flag name>=[<setperms>], [<unsetperms>] 1295 1296 @flag/enable <flag name> … … 1306 1307 /enable re-enables a disabled flag 1307 1308 /alias adds a new alias for an existing flag 1309 /letter changes or removes a single-letter alias for an existing flag. 1308 1310 /restrict changes flag permissions (see help @flag2) 1309 1311 /delete deletes a flag completely, removing it from all objects … … 2765 2767 this attribute will be matched down to its unique 2766 2768 prefixes. This flag is primarily used internally. 2769 ` This attribute is a branch. See: help ATTRIBUTE TREES 2767 2770 & @sex 2768 2771 @sex <player> = <gender> … … 3457 3460 name of the object's owner. May be abbreviated 'ex <object>'. If the 3458 3461 attribute parameter is given, you will only see that attribute (good 3459 for looking at code). You can also wild-card match on attributes. For 3460 example. to see all the attributes that began with a 'v' you could do 3461 ex <object>/v* 3462 for looking at code). You can also wild-card match on attributes. 3463 The * wildcard matches any number of characters except a backtick (`). 3464 The ? wildcard matches a single character except a backtick (`). 3465 The ** wildcard matches any number of characters, including backticks. 3466 For example. to see all the attributes that began with a 'v' you could do 3467 ex <object>/v** 3462 3468 3463 3469 The /brief switch is equivalent to the 'brief' command. … … 3468 3474 ignores the object's VISUAL flag (but not its attribute flags) 3469 3475 The /all switch shows the values of VEILED attributes. 3476 3477 See also: ATTRIBUTE TREES 3470 3478 & follow 3471 3479 follow <object> 1.7.7/game/txt/hlp/pennfunc.hlp
r439 r441 1360 1360 These functions return a list of attributes on <object> containing 1361 1361 <pattern> (or matching <regexp>). <attrs> is a wildcard pattern for 1362 attribute names to search ; if you want to search all attributes, use "*".1362 attribute names to search. 1363 1363 1364 1364 The list returned is similar to that returned by @grep/list … … 1691 1691 1692 1692 If a wildcarded attribute pattern is provided, only attribute names 1693 matching that pattern will be returned. 1694 1695 See also: nattr() 1693 matching that pattern will be returned. lattr() uses the same 1694 wildcards as examine (?, *, **). 1695 1696 See also: nattr(), examine 1696 1697 & NATTR() 1697 1698 & ATTRCNT() … … 2633 2634 & RAND() 2634 2635 rand(<num>) 2635 2636 Rand returns an integer between 0 and num-1, inclusive. 2636 rand(<min>, <max>) 2637 2638 Return a random number. 2639 2640 The first form returns an integer between 0 and <num>-1, inclusive. 2641 The second returns an integer between <min> and <max>, inclusive. 2642 2637 2643 If called with an invalid argument, rand() returns an error message 2638 2644 beginning with #-1. 2645 & RANDWORD() 2646 & PICKRAND() 2647 randword(<list>[, <delim>]) 2648 2649 Returns a randomly selected element from <list>. <delim> is the list 2650 delimiter: if not specified, whitespace delimits the list. 2651 2652 pickrand() may be an alias for randword() on some servers. 2639 2653 & REGEDIT() 2640 2654 & REGEDITALL() 1.7.7/game/txt/hlp/penntop.hlp
r429 r441 7 7 For the list of MUSH topics, type: help topics 8 8 For an alphabetical list of all help entries: help entries 9 For a list of entries that match a pattern: help <wildcard> 9 10 For information about PennMUSH: help code 10 11 … … 228 229 229 230 To see the attributes that are set on you or on any of the objects you own, 230 you should use the "examine" command. This will list all of the attributes 231 and their contents. As this can get very spammy for any large object, you 232 can also examine specific attributes by using this format: 233 examine <object>/<attribute> 231 you should use the "examine" command. See 'help examine'. 234 232 235 233 (continued in help attributes4) … … 251 249 252 250 See also: ATTRIB-OWNERSHIP, @set, examine, @atrchown, @atrlock, hasattr() 253 get(), v(), NON-STANDARD ATTRIBUTES, SETTING-ATTRIBUTES 251 get(), v(), NON-STANDARD ATTRIBUTES, SETTING-ATTRIBUTES, ATTRIBUTE TREES 252 254 253 & BEING KILLED 255 254 … … 867 866 independent of object ownership. 868 867 869 See also: ATTRIBUTES, ATTRIB-OWNERSHIP, Attribute Functions 868 See also: ATTRIBUTES, ATTRIB-OWNERSHIP, Attribute Functions, 869 ATTRIBUTE TREES 870 870 & PARENT 871 871 & PARENTS 1.7.7/game/txt/hlp/pennv176.hlp
r433 r441 1 & 1.7.6p14 2 Version 1.7.6 patchlevel 14 September 23, 2003 3 4 Fixes: 5 * Fix to help @search2 by LeeLaLimaLLama@M*U*S*H. 6 * The max file descriptor could get stomped in some cases. [SW] 7 * Powers and toggles on destroyed objects are reset, as they 8 caused anomalous lsearch/haspower behavior. Report by Mordie@M*U*S*H. 9 * Changing channel privs and loading channels with objects no longer 10 permitted could cause crashes. Report by Septimus@SW RP Forum. 11 12 1 13 & 1.7.6p13 2 14 Version 1.7.6 patchlevel 13 August 11, 2003 1.7.7/game/txt/hlp/pennv177.hlp
r439 r441 1 & 1.7.7p2 01 & 1.7.7p21 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 21 September 23, 2003 15 16 Major Changes: 17 * Attribute trees. Attributes may now be organized hierarchically 18 like files and directories in a filesystem, using the backtick (`) 19 character as the branch separator. Attribute access restrictions 20 propagate down trees. New wildcard ** is introduced to match 21 all attributes at all tree levels. Suggested by Tabbifli. [TAP] 22 Locks: 23 * New framework for performing lock failure activities in hardcode. 24 As a proof-of-concept, the attributes FOLLOW_LOCK`FAILURE, 25 FOLLOW_LOCK`OFAILURE, FOLLOW_LOCK`AFAILURE do what you'd expect 26 when set on a potential leader. Suggested by Sholevi@M*U*S*H. 27 Channels: 28 * New per-channel flags NoTitles, NoNames, and NoCemit do what you'd 29 expect. Set them with @chan/privs. Based on suggestion by 30 Saturn@M3. 31 * @chan/recall/quiet omits timestamps. Suggested by Vadiv@M*U*S*H. 32 Commands: 33 * 'help <wildcard-pattern>' now lists all help topics that match that 34 pattern. By popular request. [MUX,SW] 35 * @flag/letter can be used to change or clear the one-letter alias for a 36 flag. Suggested by Nymeria@M*U*S*H. [SW] 37 * @flag/list by God notes disabled flags. Suggested by Nymeria@M*U*S*H. [SW] 38 Functions: 39 * rand() now comes in a two-argument (low,high) flavor, and randword() 40 selects a random word from a list. The latter is aliased to 41 pickrand() to match Mux's name. Patch by Luke@M*U*S*H. 42 Minor Changes: 43 * Although we're Pueblo 2.50 compliant, go back to sending Pueblo 1.10 44 as the server version until everyone upgrades their clients so 45 they can handle the 2.50 string. Suggested by Shirow. 46 * The locate() function is no longer noisy (no longer notifies 47 the executor in addition to returning a value). Suggested by 48 Mystery8@ST:AW. 49 * @lock/interact now has a higher priority than other interaction 50 checks, so it will work for Wizards. Suggested by Viila@M*U*S*H. 51 * Tweaks to facilitate a Debian package of PennMUSH. [EEH] 52 Fixes: 53 * max descriptor could get stomped in some cases. [SW] 54 * Removed extra struct def in hdrs/mushtype.h. Suggested by Kyle. 55 * Help tweak by Kevin@M*U*S*H. 56 * Fix to locks on players messing up their connection failure counts. 57 Reported by Luke@M*U*S*H. 58 * Fix to @entrances by Luke@M*U*S*H. 59 * Fix to Win32 not handling a missing minimal.db by Luke@M*U*S*H. 60 * The confirmation message for setting/clearing attribute flags would use 61 the flag name given as an argument, not neccessarily the the full name of 62 the flag. Reported by Vadiv@M*U*S*H. [SW] 63 * Fix a potential memory leak in ident.c [SW] 64 65 & 1.7.7p20 14 66 Version 1.7.7 patchlevel 20 September 4, 2003 15 67 1.7.7/game/txt/hlp/pennvOLD.hlp
r439 r441 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 4422 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 4421 19, 20, 21 4422 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 4423 4423 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 4424 4424 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1.7.7/game/txt/index-files.pl
r429 r441 1 #!/usr/ local/bin/perl1 #!/usr/bin/perl 2 2 # 3 3 # index-files.pl - make an & index topic for events/news/help 1.7.7/hdrs/attrib.h
r439 r441 31 31 extern int good_atr_name(char const *s); 32 32 extern ATTR *atr_match(char const *string); 33 extern ATTR *atr_sub_branch(ATTR *branch); 33 34 extern void atr_new_add(dbref thing, char const *RESTRICT atr, 34 35 char const *RESTRICT s, dbref player, int flags, … … 41 42 typedef int (*aig_func) (dbref, dbref, const char *, ATTR *, void *); 42 43 extern int atr_iter_get(dbref player, dbref thing, char const *name, 43 aig_func func, void *args); 44 extern int atr_iter_get_visible(dbref player, dbref thing, char const *name, 45 aig_func func, void *args); 44 int mortal, aig_func func, void *args); 46 45 extern ATTR *atr_complete_match(dbref player, char const *atr, dbref privs); 47 46 extern void atr_free(dbref thing); … … 58 57 extern void do_atrchown(dbref player, char const *arg1, char const *arg2); 59 58 extern int string_to_atrflag(dbref player, const char *p); 59 extern const char *atrflag_to_string(int mask); 60 60 extern void init_atr_name_tree(void); 61 62 extern int can_read_attr_internal(dbref player, dbref obj, ATTR *attr); 63 extern int can_write_attr_internal(dbref player, dbref obj, ATTR *attr, 64 int safe); 61 65 extern unsigned const char *atr_get_compressed_data(ATTR *atr); 62 66 extern char *atr_value(ATTR *atr); … … 90 94 extern ATTR attr[]; 91 95 96 /* external @wipe indicator (changes atr_clr() behaviour) */ 97 extern int we_are_wiping; 98 92 99 #define AL_ATTR(alist) (alist) 93 100 #define AL_NAME(alist) ((alist)->name) 1.7.7/hdrs/conf.h
r439 r441 54 54 /* These CAN be modified, but it's heavily NOT suggested */ 55 55 #define PUEBLO_SEND "</xch_mudtext><img xch_mode=purehtml><xch_page clear=text>\n" 56 #define PUEBLO_HELLO "This world is Pueblo 2.50 Enhanced.\r\n"56 #define PUEBLO_HELLO "This world is Pueblo 1.10 Enhanced.\r\n" 57 57 58 58 1.7.7/hdrs/extchat.h
r439 r441 135 135 #define CHANNEL_CANHIDE 0x40 /* Can non-DARK Wizards hide here? */ 136 136 #define CHANNEL_OPEN 0x80 /* Can you speak if you're not joined? */ 137 #define CHANNEL_NOTITLES 0x100 /* Don't show titles of speakers */ 138 #define CHANNEL_NONAMES 0x200 /* Don't show names of speakers */ 139 #define CHANNEL_NOCEMIT 0x400 /* Disallow @cemit */ 137 140 #define CHANNEL_DEFAULT_FLAGS (CHANNEL_PLAYER) 138 141 #define CL_JOIN 0x1 … … 172 175 #define Channel_Admin(c) (ChanType(c) & CHANNEL_ADMIN) 173 176 #define Channel_CanHide(c) (ChanType(c) & CHANNEL_CANHIDE) 177 #define Channel_NoTitles(c) (ChanType(c) & CHANNEL_NOTITLES) 178 #define Channel_NoNames(c) (ChanType(c) & CHANNEL_NONAMES) 179 #define Channel_NoCemit(c) (ChanType(c) & CHANNEL_NOCEMIT) 174 180 #define Chan_Ok_Type(c,o) \ 175 181 ((IsPlayer(o) && Channel_Player(c)) || \ … … 187 193 (Chan_Can_Access(c,p) && \ 188 194 (eval_boolexp(p,ChanSpeakLock(c),p))) 195 #define Chan_Can_Cemit(c,p) \ 196 (!Channel_NoCemit(c) && Chan_Can_Speak(c,p)) 189 197 #define Chan_Can_Modify(c,p) \ 190 198 (Wizard(p) || (ChanCreator(c) == (p)) || \ … … 228 236 extern void do_chan_desc(dbref player, const char *name, const char *title); 229 237 extern void do_chan_title(dbref player, const char *name, const char *title); 230 extern void do_chan_recall(dbref player, const char *name, const char *lines); 238 extern void do_chan_recall(dbref player, const char *name, const char *lines, 239 int quiet); 231 240 extern void do_chan_buffer(dbref player, const char *name, const char *lines); 232 241 extern void init_chat(void); 1.7.7/hdrs/externs.h
r439 r441 465 465 int cs); 466 466 extern int quick_wild(const char *RESTRICT tsr, const char *RESTRICT dstr); 467 extern int atr_wild(const char *RESTRICT tstr, const char *RESTRICT dstr); 467 468 #define regexp_match(s,d) regexp_match_case(s,d,1) 468 469 #define wild_match(s,d) wild_match_case(s,d,0) 1.7.7/hdrs/flags.h
r435 r441 123 123 char *args_right[]); 124 124 extern void do_flag_add(dbref player, const char *name, char *args_right[]); 125 125 extern void do_flag_letter(dbref player, const char *name, const char *letter); 126 126 127 127 #define twiddle_flag_bitmask(bm,b,neg) (neg ? clear_flag_bitmask(bm,b) : \ 1.7.7/hdrs/lock.h
r439 r441 31 31 32 32 /* Our table of lock types, attributes, and default flags */ 33 typedef struct lock_ info LOCKINFO;33 typedef struct lock_msg_info LOCKMSGINFO; 34 34 /** A lock. 35 35 * This structure represents a lock in the table of lock types 36 36 */ 37 struct lock_ info {37 struct lock_msg_info { 38 38 lock_type type; /**< Type of lock */ 39 39 const char *succbase; /**< Base name of success attribute */ 40 40 const char *failbase; /**< Base name of failure attribute */ 41 int flags; /**< Default flags */42 41 }; 43 42 … … 62 61 void free_locks(lock_list *ll); 63 62 int eval_lock(dbref player, dbref thing, lock_type ltype); 63 void fail_lock(dbref player, dbref thing, lock_type ltype, const char *def, 64 dbref loc); 64 65 void do_unlock(dbref player, const char *name, lock_type type); 65 66 void do_lock(dbref player, const char *name, const char *keyname, 1.7.7/hdrs/mushdb.h
r439 r441 86 86 #define Can_Read_Attr(p,x,a) \ 87 87 (!((a)->flags & AF_INTERNAL) && \ 88 (See_All(p) || \ 89 (!((a)->flags & AF_MDARK) && \ 90 (controls(p,x) || ((a)->flags & AF_VISUAL) || \ 91 (Visual(x) && eval_lock(p,x,Examine_Lock)) || \ 92 (!Mistrust(p) && (Owner((a)->creator) == Owner(p))))))) 88 (See_All(p) || can_read_attr_internal((p),(x),(a)))) 93 89 94 90 /* can anyone access attribute a on object x? */ 95 91 #define Is_Visible_Attr(x,a) \ 96 92 (!((a)->flags & AF_INTERNAL) && \ 97 !((a)->flags & AF_MDARK) && \ 98 ((a)->flags & AF_VISUAL)) 93 can_read_attr_internal(NOTHING,(x),(a))) 99 94 100 95 /* can p write attribute a on object x, assuming p may modify x? … … 104 99 */ 105 100 #define Can_Write_Attr(p,x,a) \ 106 (God(p) || \ 107 (!((a)->flags & AF_INTERNAL) && \ 108 !((a)->flags & AF_SAFE) && \ 109 (Wizard(p) || \ 110 (!((a)->flags & AF_WIZARD) && \ 111 (((a)->creator == Owner(p)) || !((a)->flags & AF_LOCKED)) \ 112 )))) 101 (can_write_attr_internal((p),(x),(a),1)) 113 102 #define Can_Write_Attr_Ignore_Safe(p,x,a) \ 114 (God(p) || \ 115 (!((a)->flags & AF_INTERNAL) && \ 116 (Wizard(p) || \ 117 (!((a)->flags & AF_WIZARD) && \ 118 (((a)->creator == Owner(p)) || !((a)->flags & AF_LOCKED)) \ 119 )))) 103 (can_write_attr_internal((p),(x),(a),0)) 120 104 121 105 1.7.7/hdrs/mushtype.h
r439 r441 32 32 33 33 /* Boolexps and locks */ 34 struct boolexp;35 34 typedef const char *lock_type; 36 35 typedef struct lock_list lock_list; 1.7.7/hdrs/switches.h
r439 r441 61 61 #define SWITCH_IPRINT 60 62 62 #define SWITCH_JOIN 61 63 #define SWITCH_LIST 62 64 #define SWITCH_LOWERCASE 63 65 #define SWITCH_ME 64 66 #define SWITCH_MEMBERS 65 67 #define SWITCH_MOD 66 68 #define SWITCH_MORTAL 67 69 #define SWITCH_MOTD 68 70 #define SWITCH_MUTE 69 71 #define SWITCH_NAME 70 72 #define SWITCH_NO 71 73 #define SWITCH_NOEVAL 72 74 #define SWITCH_NOFLAGCOPY 73 75 #define SWITCH_NOISY 74 76 #define SWITCH_NOSIG 75 77 #define SWITCH_NOSPACE 76 78 #define SWITCH_NOTIFY 77 79 #define SWITCH_NUKE 78 80 #define SWITCH_OFF 79 81 #define SWITCH_ON 80 82 #define SWITCH_OUTSIDE 81 83 #define SWITCH_OVERRIDE 82 84 #define SWITCH_PAGING 83 85 #define SWITCH_PANIC 84 86 #define SWITCH_PARANOID 85 87 #define SWITCH_PLAYERS 86 88 #define SWITCH_PORT 87 89 #define SWITCH_PRESERVE 88 90 #define SWITCH_PRINT 89 91 #define SWITCH_PRIVS 90 92 #define SWITCH_PURGE 91 93 #define SWITCH_QUICK 92 94 #define SWITCH_QUIET 93 95 #define SWITCH_READ 94 96 #define SWITCH_REBOOT 95 97 #define SWITCH_RECALL 96 98 #define SWITCH_REGIONS 97 99 #define SWITCH_REGISTER 98 100 #define SWITCH_REMOVE 99 101 #define SWITCH_RENAME 100 102 #define SWITCH_RESTORE 101 103 #define SWITCH_RESTRICT 102 104 #define SWITCH_RETROACTIVE 103 105 #define SWITCH_ROOM 104 106 #define SWITCH_ROOMS 105 107 #define SWITCH_SEE 106 108 #define SWITCH_SEEFLAG 107 109 #define SWITCH_SELF 108 110 #define SWITCH_SEND 109 111 #define SWITCH_SET 110 112 #define SWITCH_SILENT 111 113 #define SWITCH_SKIPDEFAULTS 112 114 #define SWITCH_SPEAK 113 115 #define SWITCH_STATS 114 116 #define SWITCH_SUMMARY 115 117 #define SWITCH_TABLES 116 118 #define SWITCH_TAG 117 119 #define SWITCH_TELEPORT 118 120 #define SWITCH_TF 119 121 #define SWITCH_THINGS 120 122 #define SWITCH_TITLE 121 123 #define SWITCH_TRACE 122 124 #define SWITCH_UNCLEAR 123 125 #define SWITCH_UNFOLDER 124 126 #define SWITCH_UNGAG 125 127 #define SWITCH_UNHIDE 126 128 #define SWITCH_UNMUTE 127 129 #define SWITCH_UNTAG 128 130 #define SWITCH_UNTIL 129 131 #define SWITCH_URGENT 130 132 #define SWITCH_USEFLAG 131 133 #define SWITCH_WHAT 132 134 #define SWITCH_WHO 133 135 #define SWITCH_WIPE 134 136 #define SWITCH_WIZ 135 137 #define SWITCH_WIZARD 136 138 #define SWITCH_YES 137 139 #define SWITCH_ZONE 138 63 #define SWITCH_LETTER 62 64 #define SWITCH_LIST 63 65 #define SWITCH_LOWERCASE 64 66 #define SWITCH_ME 65 67 #define SWITCH_MEMBERS 66 68 #define SWITCH_MOD 67 69 #define SWITCH_MORTAL 68 70 #define SWITCH_MOTD 69 71 #define SWITCH_MUTE 70 72 #define SWITCH_NAME 71 73 #define SWITCH_NO 72 74 #define SWITCH_NOEVAL 73 75 #define SWITCH_NOFLAGCOPY 74 76 #define SWITCH_NOISY 75 77 #define SWITCH_NOSIG 76 78 #define SWITCH_NOSPACE 77 79 #define SWITCH_NOTIFY 78 80 #define SWITCH_NUKE 79 81 #define SWITCH_OFF 80 82 #define SWITCH_ON 81 83 #define SWITCH_OUTSIDE 82 84 #define SWITCH_OVERRIDE 83 85 #define SWITCH_PAGING 84 86 #define SWITCH_PANIC 85 87 #define SWITCH_PARANOID 86 88 #define SWITCH_PLAYERS 87 89 #define SWITCH_PORT 88 90 #define SWITCH_PRESERVE 89 91 #define SWITCH_PRINT 90 92 #define SWITCH_PRIVS 91 93 #define SWITCH_PURGE 92 94 #define SWITCH_QUICK 93 95 #define SWITCH_QUIET 94 96 #define SWITCH_READ 95 97 #define SWITCH_REBOOT 96 98 #define SWITCH_RECALL 97 99 #define SWITCH_REGIONS 98 100 #define SWITCH_REGISTER 99 101 #define SWITCH_REMOVE 100 102 #define SWITCH_RENAME 101 103 #define SWITCH_RESTORE 102 104 #define SWITCH_RESTRICT 103 105 #define SWITCH_RETROACTIVE 104 106 #define SWITCH_ROOM 105 107 #define SWITCH_ROOMS 106 108 #define SWITCH_SEE 107 109 #define SWITCH_SEEFLAG 108 110 #define SWITCH_SELF 109 111 #define SWITCH_SEND 110 112 #define SWITCH_SET 111 113 #define SWITCH_SILENT 112 114 #define SWITCH_SKIPDEFAULTS 113 115 #define SWITCH_SPEAK 114 116 #define SWITCH_STATS 115 117 #define SWITCH_SUMMARY 116 118 #define SWITCH_TABLES 117 119 #define SWITCH_TAG 118 120 #define SWITCH_TELEPORT 119 121 #define SWITCH_TF 120 122 #define SWITCH_THINGS 121 123 #define SWITCH_TITLE 122 124 #define SWITCH_TRACE 123 125 #define SWITCH_UNCLEAR 124 126 #define SWITCH_UNFOLDER 125 127 #define SWITCH_UNGAG 126 128 #define SWITCH_UNHIDE 127 129 #define SWITCH_UNMUTE 128 130 #define SWITCH_UNTAG 129 131 #define SWITCH_UNTIL 130 132 #define SWITCH_URGENT 131 133 #define SWITCH_USEFLAG 132 134 #define SWITCH_WHAT 133 135 #define SWITCH_WHO 134 136 #define SWITCH_WIPE 135 137 #define SWITCH_WIZ 136 138 #define SWITCH_WIZARD 137 139 #define SWITCH_YES 138 140 #define SWITCH_ZONE 139 1.7.7/hdrs/version.h
r439 r441 1 #define VERSION "PennMUSH version 1.7.7 patchlevel 2 0 [09/04/2003]"2 #define SHORTVN "PennMUSH 1.7.7p2 0"3 #define NUMVERSION 00100700702 01 #define VERSION "PennMUSH version 1.7.7 patchlevel 21 [09/23/2003]" 2 #define SHORTVN "PennMUSH 1.7.7p21" 3 #define NUMVERSION 001007007021 1.7.7/src/SWITCHES
r439 r441 60 60 IPRINT 61 61 JOIN 62 LETTER 62 63 LIST 63 64 LOWERCASE 1.7.7/src/attrib.c
r439 r441 47 47 extern PRIV attr_privs[]; 48 48 49 /** A flag to show if we're in the middle of a @wipe (this changes 50 * behaviour for atr_clr()). Yes, this is gross and ugly, but it 51 * seemed like a better idea than propogating a signature changes 52 * for atr_clr() and do_set_atr() through the entire codebase. If 53 * you come up with a better way, PLEASE fix this... 54 */ 55 int we_are_wiping; 56 57 /** A string to hold the name of a missing prefix branch, set by 58 * can_write_attr_internal. Again, gross and ugly. Please fix. 59 */ 60 static char missing_name[ATTRIBUTE_NAME_LIMIT + 1]; 61 49 62 /*======================================================================*/ 50 63 … … 80 93 * A good attribute name is at least one character long, no more than 81 94 * ATTRIBUTE_NAME_LIMIT characters long, and every character is a 82 * valid character. 95 * valid character. An attribute name may not start or end with a backtick. 96 * An attribute name may not contain multiple consecutive backticks. 83 97 * \param s a string to test for validity as an attribute name. 84 98 */ … … 90 104 if (!s || !*s) 91 105 return 0; 106 if (*s == '`') 107 return 0; 108 if (strstr(s, "``")) 109 return 0; 92 110 for (a = (const unsigned char *) s; *a; a++, len++) 93 111 if (!atr_name_table[*a]) 94 112 return 0; 113 if (*(s + len - 1) == '`') 114 return 0; 95 115 return len <= ATTRIBUTE_NAME_LIMIT; 96 116 } … … 104 124 { 105 125 return aname_hash_lookup(string); 126 } 127 128 /** Find the first attribute branching off the specified attribute. 129 * \param branch the attribute to look under 130 */ 131 ATTR * 132 atr_sub_branch(ATTR *branch) 133 { 134 char const *name, *n2; 135 size_t len; 136 137 name = AL_NAME(branch); 138 len = strlen(name); 139 for (branch = AL_NEXT(branch); branch; branch = AL_NEXT(branch)) { 140 n2 = AL_NAME(branch); 141 if (strlen(n2) <= len) 142 return NULL; 143 if (n2[len] == '`') { 144 if (!strncmp(n2, name, len)) 145 return branch; 146 else 147 return NULL; 148 } 149 } 150 return NULL; 106 151 } 107 152 … … 126 171 return -1; 127 172 return f; 173 } 174 175 /** Convert an attribute flag bitmask into a list of the full 176 * names of the flags. 177 * \param flags the attribute flags to display. 178 * \return a pointer to a static buffer with the full names of the flags. 179 */ 180 const char * 181 atrflag_to_string(int mask) 182 { 183 return privs_to_string(attr_privs, mask); 128 184 } 129 185 … … 334 390 /** Remove an attribute from an object. 335 391 * This function clears an attribute from an object. 392 * Permission is denied if the attribute is a branch, not a leaf. 336 393 * \param thing object to clear attribute from. 337 394 * \param atr name of attribute to remove. … … 341 398 atr_clr(dbref thing, char const *atr, dbref player) 342 399 { 343 ATTR *ptr, **prev ;400 ATTR *ptr, **prev, *sub; 344 401 int comp = 0; 402 size_t len; 345 403 346 404 prev = &List(thing); … … 359 417 return -1; 360 418 419 len = strlen(AL_NAME(ptr)); 420 sub = atr_sub_branch(ptr); 421 if (!we_are_wiping && sub) 422 return -1; 423 361 424 if (!IsPlayer(thing) && !(AL_FLAGS(ptr) & AF_NODUMP)) 362 425 ModTime(thing) = mudtime; … … 372 435 atr_free_list = ptr; 373 436 AttrCount(thing)--; 437 438 if (we_are_wiping && sub) { &nbs
