Changeset 423
- Timestamp:
- 08/12/06 17:18:05 (2 years ago)
- Files:
-
- 1.7.7/CHANGES (modified) (1 diff)
- 1.7.7/CHANGES.176 (added)
- 1.7.7/MANIFEST (modified) (3 diffs)
- 1.7.7/Makefile.SH (modified) (1 diff)
- 1.7.7/Patchlevel (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennchat.hlp (modified) (5 diffs)
- 1.7.7/game/txt/hlp/penncmd.hlp (modified) (3 diffs)
- 1.7.7/game/txt/hlp/penncode.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennflag.hlp (modified) (2 diffs)
- 1.7.7/game/txt/hlp/pennfunc.hlp (modified) (4 diffs)
- 1.7.7/game/txt/hlp/penntop.hlp (modified) (1 diff)
- 1.7.7/hdrs/command.h (modified) (1 diff)
- 1.7.7/hdrs/dbdefs.h (modified) (1 diff)
- 1.7.7/hdrs/extchat.h (modified) (5 diffs)
- 1.7.7/hdrs/flags.h (modified) (2 diffs)
- 1.7.7/hdrs/htab.h (modified) (1 diff)
- 1.7.7/hdrs/lock.h (modified) (1 diff)
- 1.7.7/hdrs/switches.h (modified) (2 diffs)
- 1.7.7/hdrs/version.h (modified) (1 diff)
- 1.7.7/src/Makefile (modified) (8 diffs)
- 1.7.7/src/SWITCHES (modified) (2 diffs)
- 1.7.7/src/bsd.c (modified) (14 diffs)
- 1.7.7/src/cmds.c (modified) (4 diffs)
- 1.7.7/src/command.c (modified) (6 diffs)
- 1.7.7/src/conf.c (modified) (1 diff)
- 1.7.7/src/create.c (modified) (3 diffs)
- 1.7.7/src/destroy.c (modified) (3 diffs)
- 1.7.7/src/extchat.c (modified) (11 diffs)
- 1.7.7/src/flags.c (modified) (30 diffs)
- 1.7.7/src/funcrypt.c (modified) (1 diff)
- 1.7.7/src/function.c (modified) (29 diffs)
- 1.7.7/src/fundb.c (modified) (6 diffs)
- 1.7.7/src/funlist.c (modified) (9 diffs)
- 1.7.7/src/funmath.c (modified) (9 diffs)
- 1.7.7/src/funmisc.c (modified) (3 diffs)
- 1.7.7/src/funstr.c (modified) (4 diffs)
- 1.7.7/src/funtime.c (modified) (5 diffs)
- 1.7.7/src/funufun.c (modified) (2 diffs)
- 1.7.7/src/game.c (modified) (53 diffs)
- 1.7.7/src/help.c (modified) (9 diffs)
- 1.7.7/src/htab.c (modified) (19 diffs)
- 1.7.7/src/ident.c (modified) (5 diffs)
- 1.7.7/src/info_slave.c (modified) (1 diff)
- 1.7.7/src/lock.c (modified) (24 diffs)
- 1.7.7/src/log.c (modified) (10 diffs)
- 1.7.7/src/look.c (modified) (18 diffs)
- 1.7.7/src/malias.c (modified) (26 diffs)
- 1.7.7/src/match.c (modified) (5 diffs)
- 1.7.7/src/memcheck.c (modified) (6 diffs)
- 1.7.7/src/move.c (modified) (34 diffs)
- 1.7.7/src/mycrypt.c (modified) (2 diffs)
- 1.7.7/src/mymalloc.c (modified) (1 diff)
- 1.7.7/src/notify.c (added)
- 1.7.7/src/parse.c (modified) (1 diff)
- 1.7.7/src/player.c (modified) (1 diff)
- 1.7.7/src/set.c (modified) (1 diff)
- 1.7.7/src/speech.c (modified) (1 diff)
- 1.7.7/src/switchinc.c (modified) (4 diffs)
- 1.7.7/src/wiz.c (modified) (1 diff)
- 1.7.7/utils/mkvershlp.pl (modified) (4 diffs)
- 1.7.7/win32/funs.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.7.7/CHANGES
r421 r423 18 18 19 19 ========================================================================== 20 21 Version 1.7.7 patchlevel 12 March 21, 2003 22 23 Commands: 24 * @channel/buffer creates a buffer for a channel to store the most 25 recent messages broadcast on the channel. @channel/recall can be 26 used to recall them. These are not stored across reboots and should 27 be set up by #1's @startup. 28 Functions/Substitutions: 29 * accname() gives the accented name of an object (applying @nameaccent). 30 * %~ gives the accented name of the enactor. 31 Minor Changes: 32 * The chat-related commands and functions have been moved out 33 of bsd.c and funmisc.c and into extchat.c. Patch by Vadiv@M*U*S*H. 34 * The notification stuff has been moved out of bsd.c and into a new 35 notify.c file. 36 * @name no longer requires a password for changing player names, 37 and ignores one if given. Suggested by Ambrosia@M*U*S*H (and others). 38 * @hook can not be used on the @password or @newpassword commands. 39 * The dump_complete message is also shown after a forking dump, 40 if one is defined. Suggested by Nathan Schuette. 41 * @lock/leave on a room now prevents people within it from leaving 42 via exits or via @tel. Suggested by Peter Bengtson, patch by 43 BlaZe@M*U*S*H. 44 Fixes: 45 * Fixes from 1.7.6p8 46 * Cleanup of a few new db[x] mentions in the source to use dbdefs.h 47 macros. Inspired by Vadiv@M*U*S*H. 48 * @command/restrict didn't work properly for most flags, especially 49 new ones. Reported by Caesar and Sholevi@M*U*S*H. 50 * @pemit/list didn't honor NOSPOOF. Patch by Cheetah@M*U*S*H. 51 20 52 21 53 Version 1.7.7 patchlevel 11 February 22, 2003 1.7.7/MANIFEST
r411 r423 1 1 Patchlevel 2 CHANGES 2 CHANGES.177 3 CHANGES.176 3 4 MANIFEST 4 5 options.h.dist … … 93 94 src/mymalloc.c 94 95 src/mysocket.c 96 src/notify.c 95 97 src/parse.c 96 98 src/pcre.c … … 193 195 game/txt/hlp/pennpueb.hlp 194 196 game/txt/hlp/penntop.hlp 195 game/txt/hlp/pennvers.hlp 197 game/txt/hlp/pennvOLD.hlp 198 game/txt/hlp/pennv174.hlp 199 game/txt/hlp/pennv175.hlp 200 game/txt/hlp/pennv176.hlp 201 game/txt/hlp/pennv177.hlp 196 202 game/txt/nws/index.nws 197 203 game/txt/nws/pennmush.nws 1.7.7/Makefile.SH
r421 r423 122 122 versions: CHANGES* 123 123 -rm -rf CHANGES*~ CHANGES*bak 124 utils/mkvershlp.pl game/txt/hlp /pennvers.hlpCHANGES*124 utils/mkvershlp.pl game/txt/hlp CHANGES* 125 125 126 126 safety: 1.7.7/Patchlevel
r421 r423 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.7.7p1 12 This is PennMUSH 1.7.7p12 1.7.7/game/txt/hlp/pennchat.hlp
r355 r423 59 59 a player name as a second argument. 60 60 61 Some channels may be restricted in who can join them and/or speak 62 on them. If the Extended Chat System is enabled, @channel/list will 63 show you the channel's name, number of users, number of message 64 since last restart, access information, and your status. See 65 "help channel-list" for an explanation of how to read the listing. 61 Channels may be restricted in who can join them and/or speak on 62 them. @channel/list will show you the channel's name, number of users, 63 number of message since last restart, access information, and your 64 status. See "help channel-list" for an explanation of how to read 65 the listing. 66 66 67 @channel/what will show you the channel's name, access information, 67 68 and a description of the channel's purpose. 68 69 69 More details are provided in "help @channel2". See also: chat70 More commands are provided in "help @channel2". See also: chat 70 71 & @channel2 71 72 @channel/who <channel> … … 89 90 @channel/mute <channel> = <yes|no> 90 91 @channel/gag <channel> = <yes|no> 91 92 Some channels broadcast messages when players connect or disconnect 93 from the MUSH. If you're on such a channel and don't want to hear 94 those messages, use @channel/mute <channel>=yes. To resume hearing 95 the messages, use @channel/mute <channel>=no. You can also use 96 @channel/unmute <channel>. 92 @channel/recall <channel> [ = <lines> ] 93 94 Some channels broadcast messages when players connect or disconnect from 95 the MUSH. If you don't want to hear those messages, use @channel/mute 96 <channel>=yes. To resume hearing the messages, use @channel/mute 97 <channel>=no or @channel/unmute <channel>. Leave out <channel> 98 to mute or unmute all channels. 97 99 98 100 If you want to remain on a channel but not receive any messages 99 101 on the channel, use @channel/gag <channel>=yes. To resume hearing, 100 use @channel/gag <channel>=no (or @channel/ungag <channel>). If you 101 disconnect, the channel will be automatically ungagged for you. If the 102 channel does not have the "open" priv, you can not speak on it while 103 you are gagged. 104 105 If you do not specify a channel with these commands, you mute or 106 gag (or unmute or ungag) all channels at once. 102 use @channel/gag <channel>=no (or @channel/ungag <channel>). When 103 you disconnect, the channel will be automatically ungagged for you. 104 Leave out <channel> to gag or ungag all channels. If the channel does 105 not have the "open" priv, you can not speak on it while you are gagged. 106 107 @channel/recall shows you the most recent messages on the channel; 108 the number of messages depends on how the channel is configured, but 109 can be limited by specifying <lines>. You must be on a channel to 110 recall from it. 107 111 108 112 See "help @channel4" for more. … … 135 139 @channel/quiet <channel> = <yes | no> 136 140 @channel/wipe <channel> 141 @channel/buffer <channel> = <lines> 137 142 @channel/decompile[/brief] <channel> 138 143 @channel/chown <channel> = <new owner> … … 141 146 The "quiet" switch turns the quiet status of a channel on and off. 142 147 The "wipe" switch clears a channel of players without deleting it. 148 The "buffer" switch sets the maximum number of full-length lines that 149 the channel will buffer for @chan/recall. Many more shorter lines may 150 actually be buffered. Setting it to 0 turns off buffering. 143 151 144 152 The "decompile" and "chown" switches can only be used by Wizards. … … 150 158 Here's the legend for reading the @channel/list output: 151 159 152 Channel Name Num Users Num Msgs Access Locks Status153 Sample 1 0 [DPOWQHo jsmvh*] [On QH] 154 ||||||| |||||| | || 155 Channel is DISABLED----------------------------/|||||| |||||| | || 156 Channel allows PLAYERS--------------------------/||||| |||||| | || 157 Channel allows OBJECTS---------------------------/|||| |||||| | || 158 Channel is Wizard-only (W) or Admin-only (A)------/||| |||||| | || 159 Channel is QUIET-----------------------------------/|| |||||| | || 160 Channel is HIDE_OK----------------------------------/| |||||| | || 161 Channel is OPEN (non-members can speak on it)--------/ |||||| | || 162 Channel has @clock/join set----------------------------|||||| | || 163 Channel has @clock/speak set----------------------------/|||| | || 164 Channel has @clock/mod set-------------------------------/||| | || 165 Channel has @clock/see set--------------------------------/|| | || 166 Channel has @clock/hide set--------------------------------/| | || 167 Player is the owner of the channel--------------------------/ | || 168 Player is currently on/off/gagging the channel------------------/ || 169 If on, player has the channel muted---------------------------------/| 170 If on, player is hiding on the channel-------------------------------/ 171 160 Channel Name Num Users Num Msgs Access Locks Status Buf 161 Sample 1 0 [DPOWQHo jsmvh*] [On QH] 4 162 ||||||| |||||| | || | 163 Channel is DISABLED----------------------------/|||||| |||||| | || | 164 Channel allows PLAYERS--------------------------/||||| |||||| | || | 165 Channel allows OBJECTS---------------------------/|||| |||||| | || | 166 Channel is Wizard-only (W) or Admin-only (A)------/||| |||||| | || | 167 Channel is QUIET-----------------------------------/|| |||||| | || | 168 Channel is HIDE_OK----------------------------------/| |||||| | || | 169 Channel is OPEN (non-members can speak on it)--------/ |||||| | || | 170 Channel has @clock/join set----------------------------|||||| | || | 171 Channel has @clock/speak set----------------------------/|||| | || | 172 Channel has @clock/mod set-------------------------------/||| | || | 173 Channel has @clock/see set--------------------------------/|| | || | 174 Channel has @clock/hide set--------------------------------/| | || | 175 Player is the owner of the channel--------------------------/ | || | 176 Player is currently on/off/gagging the channel------------------/ || | 177 If on, player has the channel muted---------------------------------/| | 178 If on, player is hiding on the channel-------------------------------/ | 179 Size of the channel buffer in full-length lines---------------------------/ 172 180 & @clock 173 181 @clock/join <channel> [= <key>] 1.7.7/game/txt/hlp/penncmd.hlp
r421 r423 1937 1937 @lock/listen Who can trigger my @ahear/^-pattern actions 1938 1938 @lock/command Who can trigger my $-pattern commands 1939 @lock/leave Who can leave this object 1939 @lock/leave Who can leave this object (or room, via exits/@tel) 1940 1940 @lock/drop Who can drop this object or in this room 1941 1941 @lock/give Who can give this object … … 2044 2044 See also: go, @omove, @oxmove, @amove 2045 2045 & @name 2046 @name <object>=<new name> [<password>]2046 @name <object>=<new name> 2047 2047 2048 2048 Changes the name of <object>, which can be a thing, player, exit, 2049 2049 or room. You can refer to object by name, DBREF number, or as "me" 2050 or "here". For a player, it requires the player's password. 2050 or "here". 2051 2052 When changing a player's name on games that support multi-word player 2053 names, the name should be enclosed in quotes: 2054 @name me = "James Bond" 2051 2055 2052 2056 & @newpassword … … 2542 2546 2543 2547 Sends the message to all contents of <object>, which can be a room, 2544 thing, or player. (The TinyMUSH equivalent is @pemit/contents). 2548 thing, or player. The message is also sent to the <object> itself. 2549 (The TinyMUSH equivalent is @pemit/contents). 2545 2550 2546 2551 The /silent switch stops the remitter from getting feedback if they're 1.7.7/game/txt/hlp/penncode.hlp
r417 r423 1 & Code 1 & code 2 & contact 2 3 The latest version of this MUSH code is available via anonymous 3 4 FTP, at ftp.pennmush.org, directory /pub/PennMUSH/Source. It will 1.7.7/game/txt/hlp/pennflag.hlp
r417 r423 48 48 Z - Shared, Z_Tel 49 49 50 a - Audible b - Debug c - Connected , Cloudy50 a - Audible b - Debug c - Connected 51 51 d - Destroy_Ok e - Enter_Ok g - Gagged 52 52 h - Halt j - Jury_Ok l - Light … … 54 54 p - Puppet, Paranoid r - Royalty s - Suspect 55 55 t - Transparent u - Uninspected v - Verbose 56 w - No_Warn x - Terse ? - Unregistered56 w - No_Warn x - Terse, Cloudy ? - Unregistered 57 57 ^ - Listen_Parent ~ - Noaccents 58 58 --------------------------------------------------------------------- 1.7.7/game/txt/hlp/pennfunc.hlp
r417 r423 1264 1264 You say, "1 1 1 1 0 " 1265 1265 1266 & ACCNAME() 1267 accname(<object>) 1268 1269 accname() returns the name of object <object>, applying the object's 1270 @nameaccent, if any. 1271 1272 Related functions: NAME(), ACCNAME(), INAME() 1266 1273 & FULLNAME() 1267 1274 fullname(<object>) … … 1274 1281 You say, "South;sout;sou;so;s" 1275 1282 1276 Related functions: NAME(), INAME()1283 Related functions: NAME(), ACCNAME(), INAME() 1277 1284 & FUNCTIONS() 1278 1285 functions() … … 2343 2350 that it will continue to do this for the time being. Don't rely on it. 2344 2351 2345 Related functions: FULLNAME(), INAME()2352 Related functions: FULLNAME(), ACCNAME(), INAME() 2346 2353 & NAND() 2347 2354 nand(<boolean>, <boolean>,...) … … 3536 3543 'me' refers to the object that supplied the attribute. 3537 3544 3538 However, unlike the u() function, the global registers r(0) through r(9)3539 (%q0 - %q9) are preserved in their initial state. This means that functions3540 "below" the level of the u() can reset global registers for temporary3541 calculations, without needing to worry about "clobbering" the original3542 values.3543 3545 However, unlike the u() function, the global registers r(0)-r(9) and 3546 r(A)-r(Z) (%q0-%q9, %qa-%qz) are preserved in their initial state. This 3547 means that functions "below" the level of the u() can reset global 3548 registers for temporary calculations, without needing to worry about 3549 "clobbering" the original values. 3550 3544 3551 This makes ulocal() particularly useful for global or shared code which 3545 3552 calls arbitrary u() functions, where global register values need to be 1.7.7/game/txt/hlp/penntop.hlp
r417 r423 1700 1700 master, it is a zone master room (ZMR). ZMRs are like local "master" 1701 1701 rooms. Exits in the ZMR are global to that zone, and $commands on 1702 objects in the ZMR are global to that zone. Zone master rooms are 1703 only defined if globals are used. Zone master rooms are best used for 1704 very large zones which have a lot of global exits, or for zones with 1705 restricted commands that can go on a separate use-locked object from 1706 general ones. 1702 objects in the ZMR are global to that zone ($commands on the ZMR itself, 1703 like $commands on the master room, are ignored). If a ZMR is a player's 1704 personal zone, objects in the ZMR are checked for commands that the 1705 player can use anywhere (but exits are not checked unless the player 1706 is in a zoned room). 1707 1708 Zone master rooms are only defined if globals are used. Zone master 1709 rooms are best used for very large zones which have a lot of global 1710 exits, or for zones with restricted commands that can go on a separate 1711 use-locked object from general ones. 1707 1712 1708 1713 See also: ZONES, MASTER ROOM, EVALUATION 1.7.7/hdrs/command.h
r417 r423 152 152 const char *switches; /**< Space-separated list of switch names */ 153 153 command_func func; /**< Function to call when command is run */ 154 unsigned int type; /** Types of objects that can use the command */154 unsigned int type; /**< Types of objects that can use the command */ 155 155 const char *flagstr; /**< Space-separated list of flags that can use */ 156 156 unsigned int powers; /**< Powers to which the command is restricted */ 1.7.7/hdrs/dbdefs.h
r417 r423 73 73 74 74 /* Generic type check */ 75 #define Typeof(x) (db[(x)].type & ~TYPE_MARKED) 75 #define Type(x) (db[(x)].type) 76 #define Typeof(x) (Type(x) & ~TYPE_MARKED) 76 77 77 78 /* Check for a specific one */ 1.7.7/hdrs/extchat.h
r417 r423 34 34 * @channel/quiet channel = yes/no 35 35 * @channel/wipe channel 36 * @channel/buffer channel = <maxlines> 37 * @channel/recall channel [= <lines>] 36 38 * 37 39 *------------------------------------------------------------------*/ … … 92 94 struct boolexp *hidelock; /**< Who may hide from view */ 93 95 struct channel *next; /**< Next channel in linked list */ 96 char *buffer; /**< Pointer to channel recall buffer start */ 97 char *buffer_end; /**< Pointer to channel recall buffer end */ 98 int buffersize; /**< Size of channel recall buffer */ 99 int num_buffered; /**< Number of lines in the buffer */ 94 100 }; 95 101 … … 140 146 #define ChanSeeLock(c) ((c)->seelock) 141 147 #define ChanHideLock(c) ((c)->hidelock) 148 #define ChanBuffer(c) ((c)->buffer) 149 #define ChanBufferSize(c) ((c)->buffersize) 150 #define ChanBufferEnd(c) ((c)->buffer_end) 151 #define ChanNumBuffered(c) ((c)->num_buffered) 142 152 #define Channel_Quiet(c) (ChanType(c) & CHANNEL_QUIET) 143 153 #define Channel_Open(c) (ChanType(c) & CHANNEL_OPEN) … … 204 214 extern void do_chan_desc(dbref player, const char *name, const char *title); 205 215 extern void do_chan_title(dbref player, const char *name, const char *title); 206 207 /* From chat.c */ 216 extern void do_chan_recall(dbref player, const char *name, const char *lines); 217 extern void do_chan_buffer(dbref player, const char *name, const char *lines); 208 218 extern void init_chat(void); 209 219 extern void do_channel … … 219 229 extern void do_chan_decompile(dbref player, const char *name, int brief); 220 230 extern void do_chan_chown(dbref player, const char *name, const char *newowner); 231 extern const char *channel_description(dbref player); 221 232 222 233 1.7.7/hdrs/flags.h
r417 r423 55 55 /* From flags.c */ 56 56 extern FLAG *flag_hash_lookup(const char *name, int type); 57 extern int has_flag(dbref thing, FLAG *f);58 57 extern int has_flag_by_name(dbref thing, const char *flag, int type); 59 58 extern const char *unparse_flags(dbref thing, dbref player); … … 79 78 extern int has_bit(object_flag_type bitmask, int bitpos); 80 79 extern int has_all_bits(object_flag_type source, object_flag_type bitmask); 80 extern int null_flagmask(object_flag_type source); 81 81 extern int has_any_bits(object_flag_type source, object_flag_type bitmask); 82 82 extern object_flag_type string_to_bits(const char *str); 1.7.7/hdrs/htab.h
r417 r423 50 50 extern char *hash_key(HASHENT *entry); 51 51 extern void hash_resize(HASHTAB *htab, int size); 52 extern HASHENT *hash_new(HASHTAB *htab, const char *key);53 52 extern int hash_add 54 53 (HASHTAB *htab, const char *key, void *hashdata, int extra_size); 1.7.7/hdrs/lock.h
r417 r423 54 54 struct boolexp *getlock(dbref thing, lock_type type); 55 55 struct boolexp *getlock_noparent(dbref thing, lock_type type); 56 lock_list *getlockstruct(dbref thing, lock_type type);57 lock_list *getlockstruct_noparent(dbref thing, lock_type type);58 56 lock_type match_lock(lock_type type); 59 57 const lock_list *get_lockproto(lock_type type); 1.7.7/hdrs/switches.h
r411 r423 11 11 #define SWITCH_BLIND 10 12 12 #define SWITCH_BRIEF 11 13 #define SWITCH_ CHECK1214 #define SWITCH_CH OWN1315 #define SWITCH_C LEAR1416 #define SWITCH_C MD1517 #define SWITCH_C OMMANDS1618 #define SWITCH_CO NN1719 #define SWITCH_CONN ECT1820 #define SWITCH_CONNECT ED1921 #define SWITCH_CON TENTS2022 #define SWITCH_CO STS 2123 #define SWITCH_CO UNT2224 #define SWITCH_C REATE2325 #define SWITCH_ DATABASE 2426 #define SWITCH_D B2527 #define SWITCH_D EBUG2628 #define SWITCH_DE COMPILE2729 #define SWITCH_DE FAULTS2830 #define SWITCH_DE LETE2931 #define SWITCH_DEL IMIT3032 #define SWITCH_DE SCRIBE3133 #define SWITCH_DES TROY3234 #define SWITCH_D ISABLE3335 #define SWITCH_D OWN3436 #define SWITCH_D STATS3537 #define SWITCH_ EMIT3638 #define SWITCH_E NABLE3739 #define SWITCH_E RR3840 #define SWITCH_E XITS3941 #define SWITCH_ FILE4042 #define SWITCH_FI RST4143 #define SWITCH_F LAGS4244 #define SWITCH_F OLDERS 4345 #define SWITCH_FO RWARD4446 #define SWITCH_F STATS4547 #define SWITCH_F ULL4648 #define SWITCH_FU NCTIONS4749 #define SWITCH_F WD4850 #define SWITCH_ GAG4951 #define SWITCH_G LOBALS5052 #define SWITCH_ HEADER5153 #define SWITCH_HE RE5254 #define SWITCH_H IDE 5355 #define SWITCH_ ILIST5456 #define SWITCH_I NVENTORY5557 #define SWITCH_I PRINT5658 #define SWITCH_ JOIN5759 #define SWITCH_ LIST5860 #define SWITCH_L OWERCASE5961 #define SWITCH_ ME 6062 #define SWITCH_ME MBERS6163 #define SWITCH_M OD6264 #define SWITCH_MO RTAL6365 #define SWITCH_MO TD6466 #define SWITCH_M UTE6567 #define SWITCH_ NAME 6668 #define SWITCH_N O6769 #define SWITCH_NO EVAL6870 #define SWITCH_NO FLAGCOPY6971 #define SWITCH_NO ISY 7072 #define SWITCH_NO SIG7173 #define SWITCH_NOS PACE7274 #define SWITCH_NO TIFY7375 #define SWITCH_N UKE7476 #define SWITCH_ OFF7577 #define SWITCH_O N7678 #define SWITCH_O UTSIDE7779 #define SWITCH_O VERRIDE 7880 #define SWITCH_ PANIC7981 #define SWITCH_PA RANOID8082 #define SWITCH_P LAYERS8183 #define SWITCH_P ORT8284 #define SWITCH_PO SE8313 #define SWITCH_BUFFER 12 14 #define SWITCH_CHECK 13 15 #define SWITCH_CHOWN 14 16 #define SWITCH_CLEAR 15 17 #define SWITCH_CMD 16 18 #define SWITCH_COMMANDS 17 19 #define SWITCH_CONN 18 20 #define SWITCH_CONNECT 19 21 #define SWITCH_CONNECTED 20 22 #define SWITCH_CONTENTS 21 23 #define SWITCH_COSTS 22 24 #define SWITCH_COUNT 23 25 #define SWITCH_CREATE 24 26 #define SWITCH_DATABASE 25 27 #define SWITCH_DB 26 28 #define SWITCH_DEBUG 27 29 #define SWITCH_DECOMPILE 28 30 #define SWITCH_DEFAULTS 29 31 #define SWITCH_DELETE 30 32 #define SWITCH_DELIMIT 31 33 #define SWITCH_DESCRIBE 32 34 #define SWITCH_DESTROY 33 35 #define SWITCH_DISABLE 34 36 #define SWITCH_DOWN 35 37 #define SWITCH_DSTATS 36 38 #define SWITCH_EMIT 37 39 #define SWITCH_ENABLE 38 40 #define SWITCH_ERR 39 41 #define SWITCH_EXITS 40 42 #define SWITCH_FILE 41 43 #define SWITCH_FIRST 42 44 #define SWITCH_FLAGS 43 45 #define SWITCH_FOLDERS 44 46 #define SWITCH_FORWARD 45 47 #define SWITCH_FSTATS 46 48 #define SWITCH_FULL 47 49 #define SWITCH_FUNCTIONS 48 50 #define SWITCH_FWD 49 51 #define SWITCH_GAG 50 52 #define SWITCH_GLOBALS 51 53 #define SWITCH_HEADER 52 54 #define SWITCH_HERE 53 55 #define SWITCH_HIDE 54 56 #define SWITCH_ILIST 55 57 #define SWITCH_INVENTORY 56 58 #define SWITCH_IPRINT 57 59 #define SWITCH_JOIN 58 60 #define SWITCH_LIST 59 61 #define SWITCH_LOWERCASE 60 62 #define SWITCH_ME 61 63 #define SWITCH_MEMBERS 62 64 #define SWITCH_MOD 63 65 #define SWITCH_MORTAL 64 66 #define SWITCH_MOTD 65 67 #define SWITCH_MUTE 66 68 #define SWITCH_NAME 67 69 #define SWITCH_NO 68 70 #define SWITCH_NOEVAL 69 71 #define SWITCH_NOFLAGCOPY 70 72 #define SWITCH_NOISY 71 73 #define SWITCH_NOSIG 72 74 #define SWITCH_NOSPACE 73 75 #define SWITCH_NOTIFY 74 76 #define SWITCH_NUKE 75 77 #define SWITCH_OFF 76 78 #define SWITCH_ON 77 79 #define SWITCH_OUTSIDE 78 80 #define SWITCH_OVERRIDE 79 81 #define SWITCH_PANIC 80 82 #define SWITCH_PARANOID 81 83 #define SWITCH_PLAYERS 82 84 #define SWITCH_PORT 83 85 85 #define SWITCH_PRESERVE 84 86 86 #define SWITCH_PRINT 85 … … 91 91 #define SWITCH_READ 90 92 92 #define SWITCH_REBOOT 91 93 #define SWITCH_RE GISTER9294 #define SWITCH_RE MOVE9395 #define SWITCH_RE NAME 9496 #define SWITCH_RE STORE 9597 #define SWITCH_REST RICT9698 #define SWITCH_RE TROACTIVE9799 #define SWITCH_R OOM98100 #define SWITCH_ROOM S99101 #define SWITCH_RO YALTY10093 #define SWITCH_RECALL 92 94 #define SWITCH_REGISTER 93 95 #define SWITCH_REMOVE 94 96 #define SWITCH_RENAME 95 97 #define SWITCH_RESTORE 96 98 #define SWITCH_RESTRICT 97 99 #define SWITCH_RETROACTIVE 98 100 #define SWITCH_ROOM 99 101 #define SWITCH_ROOMS 100 102 102 #define SWITCH_SEE 101 103 103 #define SWITCH_SEEFLAG 102 1.7.7/hdrs/version.h
r421 r423 1 #define VERSION "PennMUSH version 1.7.7 patchlevel 1 1 [02/22/2003]"2 #define SHORTVN "PennMUSH 1.7.7p1 1"3 #define NUMVERSION 00100700701 11 #define VERSION "PennMUSH version 1.7.7 patchlevel 12 [03/21/2003]" 2 #define SHORTVN "PennMUSH 1.7.7p12" 3 #define NUMVERSION 001007007012 1.7.7/src/Makefile
r417 r423 32 32 funlocal.c funmath.c funmisc.c funstr.c funtime.c funufun.c game.c \ 33 33 help.c htab.c ident.c local.c lock.c log.c look.c mycrypt.c mymalloc.c \ 34 malias.c match.c memcheck.c move.c mysocket.c parse.c pcre.c \34 malias.c match.c memcheck.c move.c mysocket.c notify.c parse.c pcre.c \ 35 35 player.c plyrlist.c predicat.c privtab.c ptab.c rob.c services.c \ 36 36 set.c shs.c sig.c speech.c strdup.c strtree.c strutil.c \ … … 96 96 move.o \ 97 97 mysocket.o \ 98 notify.o \ 98 99 parse.o \ 99 100 pcre.o \ … … 360 361 bsd.o: ../hdrs/memcheck.h 361 362 bsd.o: ../hdrs/mymalloc.h 362 bsd.o: ../hdrs/extchat.h363 363 bsd.o: ../hdrs/extmail.h 364 364 bsd.o: ../hdrs/attrib.h … … 391 391 cmds.o: ../hdrs/extmail.h 392 392 cmds.o: ../hdrs/malias.h 393 cmds.o: ../hdrs/extchat.h394 393 cmds.o: ../hdrs/getpgsiz.h 395 394 cmds.o: ../hdrs/parse.h … … 417 416 command.o: ../hdrs/attrib.h 418 417 command.o: ../hdrs/extmail.h 419 command.o: ../hdrs/extchat.h420 418 command.o: ../hdrs/getpgsiz.h 421 419 command.o: ../hdrs/parse.h … … 566 564 extchat.o: ../hdrs/dbdefs.h 567 565 extchat.o: ../hdrs/htab.h 566 extchat.o: ../hdrs/function.h 567 extchat.o: ../hdrs/command.h 568 extchat.o: ../hdrs/switches.h 568 569 extmail.o: ../config.h 569 570 extmail.o: ../hdrs/copyrite.h … … 684 685 fundb.o: ../hdrs/attrib.h 685 686 fundb.o: ../hdrs/function.h 686 fundb.o: ../hdrs/extchat.h687 687 funlist.o: ../hdrs/copyrite.h 688 688 funlist.o: ../config.h … … 733 733 funmisc.o: ../confmagic.h 734 734 funmisc.o: ../hdrs/version.h 735 funmisc.o: ../hdrs/extchat.h736 735 funmisc.o: ../hdrs/htab.h 737 736 funmisc.o: ../hdrs/flags.h 737 funmisc.o: ../hdrs/match.h 738 funmisc.o: ../hdrs/mushdb.h 738 739 funmisc.o: ../hdrs/dbdefs.h 739 740 funmisc.o: ../hdrs/parse.h 1.7.7/src/SWITCHES
r411 r423 10 10 BLIND 11 11 BRIEF 12 BUFFER 12 13 CHECK 13 14 CHOWN … … 89 90 READ 90 91 REBOOT 92 RECALL 91 93 REMOVE 92 94 RENAME 1.7.7/src/bsd.c
r421 r423 107 107 #include "mymalloc.h" 108 108 109 #ifdef CHAT_SYSTEM110 #include "extchat.h"111 extern CHAN *channels;112 struct na_cpass {113 CHANUSER *u;114 int checkquiet;115 };116 117 #endif118 109 #include "extmail.h" 119 110 #include "attrib.h" … … 158 149 int shutdown_flag = 0; 159 150 extern int paranoid_dump; /* from game.c */ 151 extern void chat_player_announce(dbref player, char *msg); 160 152 161 153 static int login_number = 0; … … 246 238 static const char *register_success = 247 239 "Registration successful! You will receive your password by email."; 248 static const char *flushed_message = "\r\n<Output Flushed>\x1B[0m\r\n";249 240 static const char *shutdown_message = "Going down - Bye"; 250 241 static const char *asterisk_line = … … 319 310 struct timeval *update_quotas(struct timeval *last, struct timeval *current); 320 311 312 static int how_many_fds(void); 321 313 static void shovechars(Port_t port, Port_t sslport); 322 314 static int test_connection(int newsock); … … 348 340 void shutdownsock(DESC *d); 349 341 DESC *initializesock(int s, char *addr, char *ip); 342 int process_output(DESC *d); 343 /* Notify.c */ 350 344 struct text_block *make_text_block(const unsigned char *s, int n); 351 345 void free_text_block(struct text_block *t); 352 346 void add_to_queue(struct text_queue *q, const unsigned char *b, int n); 353 347 int flush_queue(struct text_queue *q, int n); 354 staticint queue_write(DESC *d, const unsigned char *b, int n);355 static int queue_newwrite(DESC *d, const unsigned char *b, int n);356 static int queue_string(DESC *d, const char *s);357 static int queue_string_eol(DESC *d, const char *s);358 int process_output(DESC *d);348 int queue_write(DESC *d, const unsigned char *b, int n); 349 int queue_eol(DESC *d); 350 int queue_newwrite(DESC *d, const unsigned char *b, int n); 351 int queue_string(DESC *d, const char *s); 352 int queue_string_eol(DESC *d, const char *s); 359 353 void freeqs(DESC *d); 360 354 void welcome_user(DESC *d); … … 827 821 } 828 822 829 enum na_type {830 NA_ASCII = 0,831 NA_ANSI, /* ANSI flag */832 NA_COLOR, /* ANSI and COLOR flags */833 NA_PUEBLO, /* html */834 NA_PASCII, /* Player without any of the above */835 NA_TANSI, /* Like above with telnet-aware client */836 NA_TCOLOR, /* Like above with telnet-aware client */837 NA_TPASCII, /* Like above with telnet-aware client */838 NA_NANSI, /* ANSI and NOACCENTS */839 NA_NCOLOR, /* ANSI, COLOR, NOACCENTS */840 NA_NPUEBLO, /* html & NOACCENTS */841 NA_NPASCII /* 11. NOACCENTS */842 };843 #define TA_BGC 0844 #define TA_FGC 1845 #define TA_BOLD 2846 #define TA_REV 3847 #define TA_BLINK 4848 #define TA_ULINE 5849 850 static int na_depth = 0;851 852 #define MESSAGE_TYPES 12853 854 struct notify_strings {855 unsigned char *message;856 size_t len;857 int made;858 };859 860 static int how_many_fds(void);861 static void fillstate(int state[], const unsigned char **f);862 static void ansi_change_state(char *t, char **o, int color, int *state,863 int *newstate);864 static enum na_type notify_type(DESC *d);865 static void free_strings(struct notify_strings messages[]);866 static void zero_strings(struct notify_strings messages[]);867 static unsigned char *notify_makestring(const char *message,868 struct notify_strings messages[],869 enum na_type type);870 871 872 static void873 fillstate(int state[6], const unsigned char **f)874 {875 const unsigned char *p;876 int i;877 int n;878 p = *f;879 p++;880 if (*p != '[') {881 while (*p && *p != 'm')882 p++;883 } else {884 p++;885 while (*p && *p != 'm') {886 if ((*p > '9') || (*p < '0')) {887 /* Nada */888 } else if (!(*(p + 1)) || (*(p + 1) == 'm') || (*(p + 1) == ';')) {889 /* ShortCode */ ;890 switch (*p) {891 case '0':892 for (i = 0; i < 6; i++)893 state[i] = 0;894 break;895 case '1':896 state[TA_BOLD] = 1;897 break;898 case '7':899 state[TA_REV] = 1;900 break;901 case '5':902 state[TA_BLINK] = 1;903 break;904 case '4':905 state[TA_ULINE] = 1;906 break;907 }908 } else {909 n = (*p - '0') * 10;910 p++;911 n += (*p - '0');912 if ((n >= 30) && (n <= 37))913 state[TA_FGC] = n - 29;914 else if ((n >= 40) && (n <= 47))915 state[TA_BGC] = n - 39;916 }917 p++;918 }919 }920 if ((p != *f) && (*p != 'm'))921 p--;922 *f = p;923 }924 925 #define add_ansi_if(x,c) \926 do { \927 if (newstate[(x)] && (newstate[(x)]!=state[(x)])) { \928 if (i) safe_chr(';',t,o); \929 safe_str((c),t,o); \930 i=1; \931 } \932 } while (0)933 934 static void935 ansi_change_state(char *t, char **o, int color, int *state, int *newstate)936 {937 int i, n;938 if ((state[TA_BOLD] && !newstate[TA_BOLD]) ||939 (state[TA_REV] && !newstate[TA_REV]) ||940 (state[TA_BLINK] && !newstate[TA_BLINK]) ||941 (state[TA_ULINE] && !newstate[TA_ULINE]) ||942 (color && state[TA_FGC] && !newstate[TA_FGC]) ||943 (color && state[TA_BGC] && !newstate[TA_BGC])) {944 for (n = 0; n < 6; n++)945 state[n] = 0;946 safe_str(ANSI_NORMAL, t, o);947 }948 if ((newstate[TA_BOLD] && (newstate[TA_BOLD] != state[TA_BOLD])) ||949 (newstate[TA_REV] && (newstate[TA_REV] != state[TA_REV])) ||950 (newstate[TA_BLINK] && (newstate[TA_BLINK] != state[TA_BLINK])) ||951 (newstate[TA_ULINE] && (newstate[TA_ULINE] != state[TA_ULINE])) ||952 (color && newstate[TA_FGC] && (newstate[TA_FGC] != state[TA_FGC])) ||953 (color && newstate[TA_BGC] && (newstate[TA_BGC] != state[TA_BGC]))) {954 safe_chr(ESC_CHAR, t, o);955 safe_chr('[', t, o);956 i = 0;957 add_ansi_if(TA_BOLD, "1");958 add_ansi_if(TA_REV, "7");959 add_ansi_if(TA_BLINK, "5");960 add_ansi_if(TA_ULINE, "4");961 if (color) {962 add_ansi_if(TA_FGC, unparse_integer(newstate[TA_FGC] + 29));963 add_ansi_if(TA_BGC, unparse_integer(newstate[TA_BGC] + 39));964 }965 safe_chr('m', t, o);966 }967 for (n = 0; n < 6; n++)968 state[n] = newstate[n];969 }970 971 #undef add_ansi_if972 973 int html_cols[] = {974 0xC0C0C0, /* Default */975 0x000000,976 0xC00000,977 0x00C000,978 0xC0C000,979 &nbs
