| 1 | /*--------------------------------------------------------------------* |
|---|
| 2 | * dune.h - DuneMUSH source modification options * |
|---|
| 3 | * Nearly all code compiled in by these options was written by * |
|---|
| 4 | * Alan Schwartz (Javelin, Paul@DuneMUSH, alansz@cogsci.berkeley.edu) * |
|---|
| 5 | * * |
|---|
| 6 | * Please read all the options carefully. They are separated into the * |
|---|
| 7 | * following categories: * |
|---|
| 8 | * SECURITY - options relating to MUSH security * |
|---|
| 9 | * DB - options which modify the MUSH db structure * |
|---|
| 10 | * DUMP - options which relate to MUSH dump behavior * |
|---|
| 11 | * HELP - options which relate to MUSH text files * |
|---|
| 12 | * COMMAND - options which add or modify MUSH commands * |
|---|
| 13 | * FUNCTION - options which add or modify MUSH functions * |
|---|
| 14 | * FLAG - options which add or modify MUSH flags, powers, attrs * |
|---|
| 15 | * LOCKS - options which add or modify MUSH locks * |
|---|
| 16 | * COSMETIC - options which change how various things look to users * |
|---|
| 17 | * MISC - miscellaneous stuff which doesn't fit elsewhere * |
|---|
| 18 | * My recommendations are noted for some of the options. :) * |
|---|
| 19 | * * |
|---|
| 20 | * To define an option, remove the '/*' in front of the #define. * |
|---|
| 21 | * To undefine an option, add a '/*' in front of the #define. * |
|---|
| 22 | *--------------------------------------------------------------------*/ |
|---|
| 23 | |
|---|
| 24 | /* $Name: 1_6_1 $ */ |
|---|
| 25 | |
|---|
| 26 | #ifndef __DUNE_H |
|---|
| 27 | #define __DUNE_H |
|---|
| 28 | |
|---|
| 29 | /*--------------------------- SECURITY -------------------------------*/ |
|---|
| 30 | |
|---|
| 31 | /* If defined, Guest players may not @link, @set, or set attribs. |
|---|
| 32 | * Highly recommended. |
|---|
| 33 | */ |
|---|
| 34 | #define HARSH_GUEST /* */ |
|---|
| 35 | |
|---|
| 36 | /* If defined, only roy/wiz/see_all players can see other players' powers */ |
|---|
| 37 | /* #define HASPOWER_RESTRICTED /* */ |
|---|
| 38 | |
|---|
| 39 | /* If defined, enables the @sitelock command, which allows Wizards to |
|---|
| 40 | * add sites to the sites.conf file on-the-fly, and allows God to use |
|---|
| 41 | * @sitelock/ban, and add to the lockout.conf file on the fly. Recommended. |
|---|
| 42 | */ |
|---|
| 43 | /* #define SITELOCK_COMMAND /* */ |
|---|
| 44 | |
|---|
| 45 | /* If defined, objects can't evaluate ufuns on more privileged objects. |
|---|
| 46 | * Highly recommended. |
|---|
| 47 | */ |
|---|
| 48 | #define SAFER_UFUN |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | /*------------------------------ DB ----------------------------------*/ |
|---|
| 52 | |
|---|
| 53 | /* If defined, enables Ralph Melton's @lock rewrite, which allows |
|---|
| 54 | * many more types of locks with less memory usage. |
|---|
| 55 | * Highly recommended. If you use this, see the LOCK section later. |
|---|
| 56 | */ |
|---|
| 57 | #define RALPH_LOCKS /* */ |
|---|
| 58 | |
|---|
| 59 | /* If defined, enables the MUSH Building Warning system, which checks |
|---|
| 60 | * for various building problems at a configurable interval or at |
|---|
| 61 | * a player's request. Pretty neat stuff. Will typically add 4 bytes to each |
|---|
| 62 | * object in memory. Recommended. |
|---|
| 63 | */ |
|---|
| 64 | /* #define USE_WARNINGS /* */ |
|---|
| 65 | |
|---|
| 66 | /* If defined, enables tracking of creation times for all objects, |
|---|
| 67 | * attribute modification times for non-player objects, |
|---|
| 68 | * and number of login failures for player objects. |
|---|
| 69 | * Will typically add 8 bytes to each object in memory |
|---|
| 70 | * Tracking login failures and modification times is a good security |
|---|
| 71 | * measure, too. Also enables the ctime() and mtime() functions. |
|---|
| 72 | * On the whole, recommended unless you're really pinched for memory |
|---|
| 73 | * (i.e., for a 10,000 object db, you can't afford using another 80kb) |
|---|
| 74 | * |
|---|
| 75 | */ |
|---|
| 76 | /* #define CREATION_TIMES /* */ |
|---|
| 77 | |
|---|
| 78 | /*----------------------------- DUMP ---------------------------------*/ |
|---|
| 79 | |
|---|
| 80 | /* If defined, 1 minute and 5 minute warnings will be given before |
|---|
| 81 | * non-forking dumps. Highly recommended. |
|---|
| 82 | */ |
|---|
| 83 | #define DUMP_WARNINGS /* */ |
|---|
| 84 | |
|---|
| 85 | |
|---|
| 86 | /*----------------------------- HELP ---------------------------------*/ |
|---|
| 87 | |
|---|
| 88 | /* If defined, enables the "index" command, which works just like |
|---|
| 89 | * help, news, and events, and which, together with the script |
|---|
| 90 | * "txtindex" (at ftp://mellers1.psych.berkeley.edu/pub/DuneMUSH/Scripts) |
|---|
| 91 | * allows your players to read keyword-generated indexes to the other |
|---|
| 92 | * text files |
|---|
| 93 | */ |
|---|
| 94 | /* #define INDEX_COMMAND /* */ |
|---|
| 95 | #ifdef INDEX_COMMAND |
|---|
| 96 | #define INDEX_FILE "txt/index.txt" |
|---|
| 97 | #define INDEXINDX "txt/index.indx" |
|---|
| 98 | #endif |
|---|
| 99 | |
|---|
| 100 | /* If defined, creates a new command, 'rules', which works just like |
|---|
| 101 | * help, news, and events. |
|---|
| 102 | */ |
|---|
| 103 | /* #define RULES /* */ |
|---|
| 104 | #ifdef RULES |
|---|
| 105 | #define RULES_FILE "txt/rules.txt" |
|---|
| 106 | #define RULESINDX "txt/rules.indx" |
|---|
| 107 | #endif |
|---|
| 108 | |
|---|
| 109 | |
|---|
| 110 | /*---------------------------- COMMAND -------------------------------*/ |
|---|
| 111 | |
|---|
| 112 | /* Dune's extended @mail system, described in extmail.c. |
|---|
| 113 | * This will not increase the size of your maildb or anything nasty. |
|---|
| 114 | * The maildb under extended mail can be used with normal mail, and vice versa |
|---|
| 115 | * Try it, you'll like it! |
|---|
| 116 | */ |
|---|
| 117 | #define EXTENDED_MAIL /* */ |
|---|
| 118 | |
|---|
| 119 | /* |
|---|
| 120 | * Defining MAIL_SUBJECTS adds subject lines to @mail. This modifies |
|---|
| 121 | * the maildb format, but you can reverse it. |
|---|
| 122 | */ |
|---|
| 123 | /* #define MAIL_SUBJECTS /* */ |
|---|
| 124 | |
|---|
| 125 | /* Defining ALLOW_NOSUBJECT (which only applies if EXTENDED_MAIL and |
|---|
| 126 | * MAIL_SUBJECTS are defined) marks mail sent with no subject as having |
|---|
| 127 | * subject '(no subject)'. The default is for the subject of the mail |
|---|
| 128 | * to be the first 30 characters of the message when not specfied |
|---|
| 129 | */ |
|---|
| 130 | /* #define ALLOW_NOSUBJECT /* */ |
|---|
| 131 | |
|---|
| 132 | /* If defined, the @dest command is renamed @recycle (@rec) |
|---|
| 133 | * Why do I hate @dest? Because it's too close to @desc... :P |
|---|
| 134 | * Recommended. |
|---|
| 135 | */ |
|---|
| 136 | /* #define HATE_DEST /* */ |
|---|
| 137 | |
|---|
| 138 | /* If defined, the @toad command is disabled. Wizards shouldn't @toad, |
|---|
| 139 | * they should @newpassword and tell God. God shouldn't waste time |
|---|
| 140 | * using @toad, and should just @nuke the player. |
|---|
| 141 | * Idea by Kenric@DuneII |
|---|
| 142 | */ |
|---|
| 143 | /* #define HATE_TOAD /* */ |
|---|
| 144 | |
|---|
| 145 | /* If defined, disables the 'kill' command, admonishing players to use |
|---|
| 146 | * the IC combat system instead. The wizard command slay is still enabled |
|---|
| 147 | */ |
|---|
| 148 | /* #define NO_KILL /* */ |
|---|
| 149 | |
|---|
| 150 | /* If defined, whisper defaults to whisper/noisy. That means that |
|---|
| 151 | * people in the room will see a "Broncalo whispers to Paul." message. |
|---|
| 152 | * Applies to whisper-poses, too, but not to admin long-distance |
|---|
| 153 | * whispering. Players can still use whisper/silent for the other |
|---|
| 154 | * behavior. |
|---|
| 155 | */ |
|---|
| 156 | /* #define NOISY_WHISPER /* */ |
|---|
| 157 | |
|---|
| 158 | /* If this is defined, possessive get is enabled (get player's object), |
|---|
| 159 | * as is standard on PennMUSH. Some may prefer to disable it. |
|---|
| 160 | */ |
|---|
| 161 | #define POSSESSIVE_GET /* */ |
|---|
| 162 | |
|---|
| 163 | /* If this is defined, possessive get is allows on disconnected players, |
|---|
| 164 | * which is standard in PennMUSH. Many may prefer to disable this. |
|---|
| 165 | */ |
|---|
| 166 | #define POSSGET_ON_DISCONNECTED /* */ |
|---|
| 167 | |
|---|
| 168 | /* If defined, the command 'read' is a synonym for 'look'. If not, |
|---|
| 169 | * people can use it as a user-defined command. Not recommended. |
|---|
| 170 | */ |
|---|
| 171 | #define READ /* */ |
|---|
| 172 | |
|---|
| 173 | /* If defined, the SAFE flag blocks any attempt to destroy an object. |
|---|
| 174 | * Anyone who has the privileges to destroy the object can set it !safe, |
|---|
| 175 | * anyway. |
|---|
| 176 | */ |
|---|
| 177 | #define REALLY_SAFE |
|---|
| 178 | |
|---|
| 179 | /* If defined, only royalty can use the @find command. Why? |
|---|
| 180 | * Mortals shouldn't use it, because it's expensive, and @search is better |
|---|
| 181 | * Wizards shouldn't use it, because it shows them the whole db |
|---|
| 182 | * That leaves royalty as possible users. |
|---|
| 183 | */ |
|---|
| 184 | /* #define ROY_FIND /* */ |
|---|
| 185 | |
|---|
| 186 | /* If defined, when a player is destroyed, any objects he owns that are |
|---|
| 187 | * not set SAFE are destroyed, and any objects he owns that are set SAFE |
|---|
| 188 | * are @chowned to God. If this is not defined, all possessions of a player |
|---|
| 189 | * are chowned to God when the player is destroyed. |
|---|
| 190 | */ |
|---|
| 191 | #define DESTROY_POSSESSIONS |
|---|
| 192 | |
|---|
| 193 | |
|---|
| 194 | /*---------------------------- FUNCTION ------------------------------*/ |
|---|
| 195 | |
|---|
| 196 | /* If defined, the encrypt() and decrypt() functions are enabled */ |
|---|
| 197 | #define CRYPTFUNS /* */ |
|---|
| 198 | |
|---|
| 199 | /* If defined, the shl(), shr(), inc(), and dec() functions are added |
|---|
| 200 | * That's bitshift left, right, increment by 1 and decrement. |
|---|
| 201 | */ |
|---|
| 202 | /* #define LOWER_MATH /* */ |
|---|
| 203 | |
|---|
| 204 | /* If defined, the objmem() and playermem() functions are added, which |
|---|
| 205 | * return memory usage for an object or all a player's objects. |
|---|
| 206 | */ |
|---|
| 207 | /* #define MEMORY_FUNS /* */ |
|---|
| 208 | |
|---|
| 209 | /* If this is defined, the lparent() function is available. |
|---|
| 210 | * lparent(<obj>) returns a list of <obj> and all its ancestors |
|---|
| 211 | * (via @parent) which the player is priv'd to see. |
|---|
| 212 | */ |
|---|
| 213 | #define LPARENT_FUNCTION /* */ |
|---|
| 214 | |
|---|
| 215 | /* TinyMUSH 2.2 uses atoi in boolean logic functions. That is, any |
|---|
| 216 | * string (or db#) evaluates to 0 (false). |
|---|
| 217 | * PennMUSH has traditionally used a function which makes strings and |
|---|
| 218 | * db#'s which are larger than #0 return true. |
|---|
| 219 | * If you want Tiny 2.2 compatibility in and(), or(), not(), define this |
|---|
| 220 | * It may break existing code. |
|---|
| 221 | */ |
|---|
| 222 | /* #define TINY22_BOOLEANS */ |
|---|
| 223 | |
|---|
| 224 | /* If defined, adds vector arithmetic functions: vadd, vsub, vmul, vmag, |
|---|
| 225 | * vdim, vunit |
|---|
| 226 | */ |
|---|
| 227 | /* #define VECTORS /* */ |
|---|
| 228 | |
|---|
| 229 | |
|---|
| 230 | /*------------------------------ FLAG --------------------------------*/ |
|---|
| 231 | |
|---|
| 232 | /* The &adest attrib will be triggered when an object is nuked if this |
|---|
| 233 | * is defined. |
|---|
| 234 | */ |
|---|
| 235 | /* #define ADEST_ATTRIB /* */ |
|---|
| 236 | |
|---|
| 237 | /* The &amail attrib will be triggered when a player received @mail, |
|---|
| 238 | * with sender as %#, if this is defined. It's currently restricted |
|---|
| 239 | * to roy/wiz only, since it does no checking for mail loops! |
|---|
| 240 | */ |
|---|
| 241 | /* #define AMAIL /* */ |
|---|
| 242 | |
|---|
| 243 | /* The fixed flag, when set on a player, prevents the player or anything |
|---|
| 244 | * they own from using @tel or home (roy/wizzes exempted from @tel restriction) |
|---|
| 245 | * Nice for enforcing IC travel. :) |
|---|
| 246 | * The only exception is that players are permitted to @tel their objects |
|---|
| 247 | * to their inventory - which makes coding puppets to follow you possible. |
|---|
| 248 | */ |
|---|
| 249 | #define FIXED_FLAG /* */ |
|---|
| 250 | |
|---|
| 251 | /* If defined, enables the Jury and Judge flags, which don't do anything |
|---|
| 252 | * in themselves, but which other MUSHes may find useful |
|---|
| 253 | */ |
|---|
| 254 | /* #define JURY_OK /* */ |
|---|
| 255 | |
|---|
| 256 | /* If defined, adds support for the UNREGISTERED flag, which you can |
|---|
| 257 | * arrange in mush.conf to have set on new players, and can test for. |
|---|
| 258 | * The only hardcoded restriction is in wiz.c - unreg'd players can't |
|---|
| 259 | * be given powers |
|---|
| 260 | */ |
|---|
| 261 | /* #define ONLINE_REG /* */ |
|---|
| 262 | |
|---|
| 263 | /* If defined, adds support for the ON_VACATION flag, which a player |
|---|
| 264 | * can set to indicate that they're going to be away from the MUSH |
|---|
| 265 | * for vacation (and which a wizard can test for when doing player purges, |
|---|
| 266 | * or which can aid other players, etc). This flags is automatically |
|---|
| 267 | * cleared when a player logs in, so it should be set just before the |
|---|
| 268 | * player leaves for vacation |
|---|
| 269 | */ |
|---|
| 270 | /* #define VACATION_FLAG /* */ |
|---|
| 271 | |
|---|
| 272 | /* If this is defined, and PLAYER_LISTEN is defined, players may have |
|---|
| 273 | * @listens (for example *, so their contents can hear things), but |
|---|
| 274 | * can't have @ahears. |
|---|
| 275 | */ |
|---|
| 276 | /* #define PLAYER_NOAHEAR /* */ |
|---|
| 277 | |
|---|
| 278 | /* If defined, @aconnect/@adisconnect in rooms will be triggered for |
|---|
| 279 | * players connecting/disconnecting therein |
|---|
| 280 | */ |
|---|
| 281 | /* #define ROOM_CONNECTS /* */ |
|---|
| 282 | |
|---|
| 283 | /* If defined, adds the UNINSPECTED flag for rooms, which does nothing, |
|---|
| 284 | * but can be tested for in mushcode, etc. |
|---|
| 285 | */ |
|---|
| 286 | /* #define UNINSPECTED_FLAG /* */ |
|---|
| 287 | |
|---|
| 288 | /*------------------------------ LOCK --------------------------------*/ |
|---|
| 289 | |
|---|
| 290 | /* If defined, @lock/listen sets a lock which controls who can trigger |
|---|
| 291 | * ^patterns and @ahears on the thing. |
|---|
| 292 | */ |
|---|
| 293 | #define LISTEN_LOCK /* */ |
|---|
| 294 | |
|---|
| 295 | /* If defined, @lock/speech sets a lock which controls who can |
|---|
| 296 | * speak/pose/emit in a room. |
|---|
| 297 | */ |
|---|
| 298 | #define SPEECH_LOCK /* */ |
|---|
| 299 | |
|---|
| 300 | /* If defined, @lock/leave sets a lock which controls who can |
|---|
| 301 | * leave an object |
|---|
| 302 | */ |
|---|
| 303 | #define LEAVE_LOCK /* */ |
|---|
| 304 | |
|---|
| 305 | /* If defined, @lock/drop sets a lock which controls who can drop |
|---|
| 306 | * an object. |
|---|
| 307 | */ |
|---|
| 308 | #define DROP_LOCK /* */ |
|---|
| 309 | |
|---|
| 310 | /* If defined, @lock/give sets a lock which controls who can |
|---|
| 311 | * give away an object |
|---|
| 312 | */ |
|---|
| 313 | #define GIVE_LOCK /* */ |
|---|
| 314 | |
|---|
| 315 | /*---------------------------- COSMETIC ------------------------------*/ |
|---|
| 316 | |
|---|
| 317 | /* If defined, object/room/player names will appear bold. Requires |
|---|
| 318 | * EXTENDED_ANSI to be defined in order to work. Recommended. */ |
|---|
| 319 | #define ANSI_NAMES /* */ |
|---|
| 320 | |
|---|
| 321 | /* If defined, the count of players on the WHO list will include |
|---|
| 322 | * Dark/Hidden players not visible on the list |
|---|
| 323 | */ |
|---|
| 324 | /* #define COUNT_ALL /* */ |
|---|
| 325 | |
|---|
| 326 | /* If defined, rooms which have at least one exit are not considered |
|---|
| 327 | * "disconnected rooms" and do not need to be set FLOATING. |
|---|
| 328 | * If not defined, the traditional definition of a connected room |
|---|
| 329 | * (a room which can be reached from #0) is used. |
|---|
| 330 | */ |
|---|
| 331 | /* #define EXITS_CONNECT_ROOMS */ |
|---|
| 332 | |
|---|
| 333 | /* These are defined as the prefixes which prepend @wizwall, @rwall, |
|---|
| 334 | * and @wall messages. You can change them as you like. |
|---|
| 335 | * Idea by Aragorn@ElendorMUSH |
|---|
| 336 | */ |
|---|
| 337 | #define WIZWALL_PREFIX "Broadcast:" |
|---|
| 338 | #define RWALL_PREFIX "Admin:" |
|---|
| 339 | #define WALL_PREFIX "Announcement:" |
|---|
| 340 | |
|---|
| 341 | |
|---|
| 342 | /*------------------------------ MISC --------------------------------*/ |
|---|
| 343 | |
|---|
| 344 | /* What type of attribute compression should the MUSH use? |
|---|
| 345 | * Your options are: |
|---|
| 346 | * 1 - the default Huffman compression which has been in use since |
|---|
| 347 | * pl10. In theory, this should be the best compression, |
|---|
| 348 | * possibly at the cost of some speed. Sometimes has trouble |
|---|
| 349 | * on linux systems for some reason. |
|---|
| 350 | * 2 - the bigram compression from pl9 and earlier (but autotuned) |
|---|
| 351 | * This should be intermediate in compression and speed, and |
|---|
| 352 | * and at least one database that won't load under Huffman, |
|---|
| 353 | * will load under bigram. Use if Huffman won't work. |
|---|
| 354 | * 0 - No compression at all. Very fast, but your db in memory |
|---|
| 355 | * will be big - at least as large as your on-disk db. |
|---|
| 356 | * Possibly suitable for the building stages of a small MUSH. |
|---|
| 357 | * You can change this at any time, with no worries. It only affects |
|---|
| 358 | * the in-memory compression of attribute/mail text, not the disk |
|---|
| 359 | * db compression. Recommend to keep it at 1. |
|---|
| 360 | */ |
|---|
| 361 | #define COMPRESSION_TYPE 1 |
|---|
| 362 | |
|---|
| 363 | /* If defined, one may only @link to rooms, not to link_ok objects. |
|---|
| 364 | * This makes link_ok on objects function purely as parent_ok. |
|---|
| 365 | */ |
|---|
| 366 | /* #define NO_LINK_TO_OBJECT /* */ |
|---|
| 367 | |
|---|
| 368 | /* If defined, adds support for a new kind of chat channel, object-channels. |
|---|
| 369 | * Only objects (and wizards) may join these channels. Useful for |
|---|
| 370 | * radio systems, etc., though it can be computationally expensive. |
|---|
| 371 | * Not recommended unless you have an important application. |
|---|
| 372 | * Does not apply to the extended chat system |
|---|
| 373 | */ |
|---|
| 374 | /* #define OBJECT_CHAT /* */ |
|---|
| 375 | |
|---|
| 376 | /* If defined, queue limits are maintained on a per-owner basis, |
|---|
| 377 | * instead of a per-object basis. That is, your object is runaway |
|---|
| 378 | * when your total queue goes too high, not when that object's |
|---|
| 379 | * queue does. |
|---|
| 380 | */ |
|---|
| 381 | /* #define QUEUE_PER_OWNER /* */ |
|---|
| 382 | |
|---|
| 383 | /* If defined, DARK wizards don't trigger AENTER/ALEAVE as they move around */ |
|---|
| 384 | /* #define WIZ_NOAENTER /* */ |
|---|
| 385 | |
|---|
| 386 | |
|---|
| 387 | #endif /* __DUNE_H */ |
|---|