00001 // mudconf.h 00002 // 00003 // $Id: mudconf.h,v 1.35 2006/05/18 18:43:44 sdennis Exp $ 00004 // 00005 00006 #ifndef __CONF_H 00007 #define __CONF_H 00008 00009 #include "alloc.h" 00010 #include "htab.h" 00011 #include "stringutil.h" 00012 00013 #ifndef WIN32 00014 #include <netinet/in.h> 00015 #endif // !WIN32 00016 00017 #define WIDTHOF_DOING_STRING 45 00018 #define SIZEOF_DOING_STRING (2*WIDTHOF_DOING_STRING) 00019 00020 /* CONFDATA: runtime configurable parameters */ 00021 00022 typedef struct tag_int_array 00023 { 00024 int n; 00025 int *pi; 00026 } IntArray; 00027 00028 typedef struct 00029 { 00030 const char *CommandName; 00031 CHashTable *ht; 00032 char *pBaseFilename; 00033 bool bEval; 00034 } HELP_DESC; 00035 00036 typedef struct confdata CONFDATA; 00037 struct confdata 00038 { 00039 bool allow_guest_from_registered_site; // Whether guests from registered sites are allowed. 00040 bool autozone; // New objects are automatically zoned. 00041 bool cache_names; /* Should object names be cached separately */ 00042 bool clone_copy_cost; /* Does @clone copy value? */ 00043 bool compress_db; // should we use compress. 00044 bool dark_sleepers; /* Are sleeping players 'dark'? */ 00045 bool destroy_going_now; // Does GOING act like DESTROY_OK? 00046 bool eval_comtitle; /* Should Comtitles Evaluate? */ 00047 bool ex_flags; /* true = show flags on examine */ 00048 bool exam_public; /* Does EXAM show public attrs by default? */ 00049 bool fascist_tport; /* Src of teleport must be owned/JUMP_OK */ 00050 bool fork_dump; // perform dump in a forked process. 00051 bool have_comsys; // Should the comsystem be active? 00052 bool have_mailer; // Should @mail be active? 00053 bool have_zones; // Should zones be active? 00054 bool idle_wiz_dark; /* Do idling wizards get set dark? */ 00055 bool indent_desc; // Newlines before and after descs? 00056 bool match_mine; /* Should you check yourself for $-commands? */ 00057 bool match_mine_pl; /* Should players check selves for $-cmds? */ 00058 bool name_spaces; // allow player names to have spaces. 00059 bool paranoid_alloc; /* Rigorous buffer integrity checks */ 00060 bool pemit_any; /* Can you @pemit to ANY remote object? */ 00061 bool pemit_players; /* Can you @pemit to faraway players? */ 00062 bool player_listen; /* Are AxHEAR triggered on players? */ 00063 bool pub_flags; /* true = flags() works on anything */ 00064 bool quiet_look; /* true = don't see attribs when looking */ 00065 bool quiet_whisper; /* Can others tell when you whisper? */ 00066 bool quotas; /* true = have building quotas */ 00067 bool read_rem_desc; /* Can the DESCs of nonlocal objs be read? */ 00068 bool read_rem_name; /* Can the NAMEs of nonlocal objs be read? */ 00069 bool reset_players; // Reset the maximum player stat. 00070 bool robot_speak; /* true = allow robots to speak */ 00071 bool run_startup; // If no, startup attributes aren't processed on load. 00072 bool safe_unowned; /* Are objects not owned by you safe? */ 00073 bool safe_wipe; // If yes, SAFE flag must be removed to @wipe. 00074 bool safer_passwords; /* enforce reasonably good password choices? */ 00075 bool see_own_dark; /* Do you see your own dark stuff? */ 00076 bool space_compress; /* Convert multiple spaces into one space */ 00077 bool sweep_dark; /* Can you sweep dark places? */ 00078 bool switch_df_all; /* Should @switch match all by default? */ 00079 bool terse_contents; /* Does TERSE look show exits */ 00080 bool terse_exits; /* Does TERSE look show obvious exits */ 00081 bool terse_look; /* Does manual look obey TERSE */ 00082 bool terse_movemsg; /* Show move msgs (SUCC/LEAVE/etc) if TERSE? */ 00083 bool trace_topdown; /* Is TRACE output top-down or bottom-up? */ 00084 bool use_hostname; /* true = use machine NAME rather than quad */ 00085 bool use_http; /* Should we allow http access? */ 00086 dbref default_home; // HOME when home is inaccessable. 00087 dbref global_error_obj; // Object that is used to generate error messages. 00088 dbref guest_char; // player num of prototype GUEST character. 00089 dbref guest_nuker; // Wiz who nukes the GUEST characters. 00090 dbref hook_obj; // Object with @hook data. 00091 dbref master_room; // Room containing default cmds/exits/etc. 00092 dbref start_home; // initial HOME for players. 00093 dbref start_room; // initial location and home for players. 00094 dbref toad_recipient; /* Default @toad recipient. */ 00095 int active_q_chunk; /* # cmds to run from queue when active */ 00096 int cache_pages; // Size of hash page cache (in pages). 00097 int check_interval; /* interval between db check/cleans in secs */ 00098 int check_offset; /* when to perform first check and clean */ 00099 int cmd_quota_incr; /* Bump #cmds allowed by this each timeslice */ 00100 int cmd_quota_max; /* Max commands at one time */ 00101 int conn_timeout; /* Allow this long to connect before booting */ 00102 int control_flags; /* Global runtime control flags */ 00103 int createmax; /* max cost of @create command */ 00104 int createmin; /* default (and minimum) cost of @create cmd */ 00105 int digcost; /* cost of @dig command */ 00106 int dump_interval; /* interval between ckp dumps in seconds */ 00107 int dump_offset; /* when to take first checkpoint dump */ 00108 int events_daily_hour; /* At what hour should @daily be executed? */ 00109 int exit_quota; /* quota needed to make an exit */ 00110 int func_invk_lim; /* Max funcs invoked by a command */ 00111 int func_nest_lim; /* Max nesting of functions */ 00112 int hook_cmd; // @hooks to be initialized. 00113 int idle_interval; /* when to check for idle users */ 00114 int idle_timeout; /* Boot off players idle this long in secs */ 00115 int init_size; // initial db size. 00116 int killguarantee; /* cost of kill cmd that guarantees success */ 00117 int killmax; /* max cost of kill command */ 00118 int killmin; /* default (and minimum) cost of kill cmd */ 00119 int linkcost; /* cost of @link command */ 00120 int lock_nest_lim; /* Max nesting of lock evals */ 00121 int log_info; /* Info that goes into log entries */ 00122 int log_options; /* What gets logged */ 00123 int machinecost; /* One in mc+1 cmds costs 1 penny (POW2-1) */ 00124 int mail_expiration; /* Number of days to wait to delete mail */ 00125 int mail_per_hour; // Maximum sent @mail per hour per object. 00126 int max_players; /* Max # of connected players */ 00127 int min_guests; // The # we should start nuking at. 00128 int nStackLimit; // Current stack limit. 00129 #ifdef REALITY_LVLS 00130 int no_levels; /* Number of reality levels */ 00131 struct rlevel_def { 00132 char name[9]; /* Rlevel name */ 00133 RLEVEL value; /* Rlevel bitmask */ 00134 char attr[33]; /* desc attribute */ 00135 } reality_level[32]; /* Reality levels */ 00136 RLEVEL def_room_rx; /* Default room RX level */ 00137 RLEVEL def_room_tx; /* Default room TX level */ 00138 RLEVEL def_player_rx; /* Default player RX level */ 00139 RLEVEL def_player_tx; /* Default player RX level */ 00140 RLEVEL def_exit_rx; /* Default exit RX level */ 00141 RLEVEL def_exit_tx; /* Default exit TX level */ 00142 RLEVEL def_thing_rx; /* Default thing RX level */ 00143 RLEVEL def_thing_tx; /* Default thing TX level */ 00144 #endif /* REALITY_LVLS */ 00145 int ntfy_nest_lim; /* Max nesting of notifys */ 00146 int number_guests; // number of guest characters allowed. 00147 int opencost; /* cost of @open command */ 00148 int output_limit; /* Max # chars queued for output */ 00149 int pagecost; /* cost of @page command */ 00150 int parent_nest_lim; /* Max levels of parents */ 00151 int paycheck; /* players earn this much each day connected */ 00152 int payfind; /* chance to find a penny with wandering */ 00153 int paylimit; /* getting money gets hard over this much */ 00154 int paystart; /* new players start with this much money */ 00155 int player_quota; /* quota needed to make a robot player */ 00156 int pcreate_per_hour; // Maximum allowed players created per hour */ 00157 int queue_chunk; /* # cmds to run from queue when idle */ 00158 int queuemax; /* max commands a player may have in queue */ 00159 int retry_limit; /* close conn after this many bad logins */ 00160 int robotcost; /* cost of @robot command */ 00161 int room_quota; /* quota needed to make a room */ 00162 int sacadjust; /* sacrifice earns (obj_cost/sfactor) + sadj */ 00163 int sacfactor; /* ... */ 00164 int searchcost; /* cost of commands that search the whole DB */ 00165 int sig_action; // What to do with fatal signals. 00166 int stack_limit; /* How big can stacks get? */ 00167 int start_quota; /* Quota for new players */ 00168 int thing_quota; /* quota needed to make a thing */ 00169 int trace_limit; /* Max lines of trace output if top-down */ 00170 int vattr_flags; /* Attr flags for all user-defined attrs */ 00171 int vattr_per_hour; // Maximum allowed vattrs per hour per object. 00172 int waitcost; /* cost of @wait (refunded when finishes) */ 00173 int wild_invk_lim; // Max Regular Expression function calls. 00174 int zone_nest_lim; /* Max nesting of zones */ 00175 int restrict_home; // Special condition to restrict 'home' command 00176 00177 unsigned int max_cache_size; /* Max size of attribute cache */ 00178 unsigned int site_chars; // where to truncate site name. 00179 00180 IntArray ports; // user ports. 00181 00182 char guest_prefix[32]; /* Prefix for the guest char's name */ 00183 char guests_channel[32]; /* Name of guests channel */ 00184 char guests_channel_alias[32]; /* Name of guests channel alias */ 00185 char many_coins[32]; /* name of many coins (ie. "pennies") */ 00186 char mud_name[32]; /* Name of the mud */ 00187 char one_coin[32]; /* name of one coin (ie. "penny") */ 00188 char public_channel[32]; /* Name of public channel */ 00189 char public_channel_alias[32]; /* Name of public channel alias */ 00190 char dump_msg[128]; /* Message displayed when @dump-ing */ 00191 char fixed_home_msg[128]; /* Message displayed when going home and FIXED */ 00192 char fixed_tel_msg[128]; /* Message displayed when teleporting and FIXED */ 00193 char postdump_msg[128]; /* Message displayed after @dump-ing */ 00194 char downmotd_msg[GBUF_SIZE]; /* Settable 'logins disabled' message */ 00195 char fullmotd_msg[GBUF_SIZE]; /* Settable 'Too many players' message */ 00196 char motd_msg[GBUF_SIZE]; /* Wizard-settable login message */ 00197 char pueblo_msg[GBUF_SIZE]; /* Message displayed to Pueblo clients */ 00198 char wizmotd_msg[GBUF_SIZE]; /* Login message for wizards only */ 00199 char *compress; /* program to run to compress */ 00200 char *comsys_db; /* name of the comsys db */ 00201 char *config_file; /* name of config file, used by @restart */ 00202 char *conn_file; /* display on connect if no registration */ 00203 char *crashdb; /* write database here on crash */ 00204 char *crea_file; /* display this on login for new users */ 00205 char *creg_file; /* display on connect if registration */ 00206 char *down_file; /* display this file if no logins */ 00207 char *full_file; /* display when max users exceeded */ 00208 char *game_dir; /* use this game CHashFile DIR file if we need one */ 00209 char *game_pag; /* use this game CHashFile PAG file if we need one */ 00210 char *guest_file; /* display if guest connects */ 00211 char *indb; /* database file name */ 00212 char *mail_db; /* name of the @mail database */ 00213 char *motd_file; /* display this file on login */ 00214 char *outdb; /* checkpoint the database to here */ 00215 char *quit_file; /* display on quit */ 00216 char *regf_file; /* display on (failed) create if reg is on */ 00217 char *site_file; /* display if conn from bad site */ 00218 char *status_file; /* Where to write arg to @shutdown */ 00219 char *uncompress; /* program to run to uncompress */ 00220 char *wizmotd_file; /* display this file on login to wizards */ 00221 char *pid_file; // file for communicating process id back to ./Startmux 00222 unsigned char markdata[8]; /* Masks for marking/unmarking */ 00223 CLinearTimeDelta rpt_cmdsecs; /* Reporting Threshhold for time taken by command */ 00224 CLinearTimeDelta max_cmdsecs; /* Upper Limit for real time taken by command */ 00225 CLinearTimeDelta cache_tick_period; // Minor cycle for cache maintenance. 00226 CLinearTimeDelta timeslice; // How often do we bump people's cmd quotas? 00227 00228 FLAGSET exit_flags; /* Flags exits start with */ 00229 FLAGSET player_flags; /* Flags players start with */ 00230 FLAGSET robot_flags; /* Flags robots start with */ 00231 FLAGSET room_flags; /* Flags rooms start with */ 00232 FLAGSET thing_flags; /* Flags things start with */ 00233 00234 ArtRuleset* art_rules; /* Rulesets for defining exceptions. */ 00235 }; 00236 00237 extern CONFDATA mudconf; 00238 00239 typedef struct site_data SITE; 00240 struct site_data 00241 { 00242 struct site_data *next; /* Next site in chain */ 00243 struct in_addr address; /* Host or network address */ 00244 struct in_addr mask; /* Mask to apply before comparing */ 00245 int flag; /* Value to return on match */ 00246 }; 00247 00248 typedef struct objlist_block OBLOCK; 00249 struct objlist_block 00250 { 00251 struct objlist_block *next; 00252 dbref data[(LBUF_SIZE - sizeof(OBLOCK *)) / sizeof(dbref)]; 00253 }; 00254 00255 #define OBLOCK_SIZE ((LBUF_SIZE - sizeof(OBLOCK *)) / sizeof(dbref)) 00256 00257 typedef struct objlist_stack OLSTK; 00258 struct objlist_stack 00259 { 00260 struct objlist_stack *next; /* Next object list in stack */ 00261 OBLOCK *head; /* Head of object list */ 00262 OBLOCK *tail; /* Tail of object list */ 00263 OBLOCK *cblock; /* Current block for scan */ 00264 unsigned int count; /* Number of objs in last obj list block */ 00265 unsigned int citm; /* Current item for scan */ 00266 }; 00267 00268 typedef struct markbuf MARKBUF; 00269 struct markbuf 00270 { 00271 char chunk[5000]; 00272 }; 00273 00274 typedef struct alist ALIST; 00275 struct alist 00276 { 00277 char *data; 00278 size_t len; 00279 struct alist *next; 00280 }; 00281 00282 typedef struct badname_struc BADNAME; 00283 struct badname_struc 00284 { 00285 char *name; 00286 struct badname_struc *next; 00287 }; 00288 00289 typedef struct forward_list FWDLIST; 00290 struct forward_list 00291 { 00292 int count; 00293 int data[1000]; 00294 }; 00295 00296 #define MAX_ITEXT 100 00297 00298 typedef struct statedata STATEDATA; 00299 struct statedata 00300 { 00301 bool bCanRestart; // are we ready to even attempt a restart. 00302 bool bReadingConfiguration; // are we reading the config file at startup? 00303 bool bStackLimitReached; // Was stack slammed? 00304 bool bStandAlone; // Are we running in dbconvert mode. 00305 bool panicking; // are we in the middle of dying horribly? 00306 bool shutdown_flag; /* Should interface be shut down? */ 00307 bool inpipe; // Are we collecting output for a pipe? 00308 #ifndef WIN32 00309 bool restarting; // Are we restarting? 00310 volatile bool dumping; // Are we dumping? 00311 volatile pid_t dumper; // PID of dumping process (as returned by fork()). 00312 volatile pid_t dumped; // PID of dumping process (as given by SIGCHLD). 00313 bool write_protect; // Write-protect against modifications to the 00314 // database during dumps. 00315 #endif // !WIN32 00316 00317 dbref curr_enactor; /* Who initiated the current command */ 00318 dbref curr_executor; /* Who is running the current command */ 00319 dbref freelist; /* Head of object freelist */ 00320 dbref mod_al_id; /* Where did mod_alist come from? */ 00321 dbref poutobj; /* Object doing the piping */ 00322 int attr_next; /* Next attr to alloc when freelist is empty */ 00323 int db_size; /* Allocated size of db structure */ 00324 int db_top; /* Number of items in the db */ 00325 int epoch; /* Generation number for dumps */ 00326 int events_flag; /* Flags for check_events */ 00327 int func_invk_ctr; /* Functions invoked so far by this command */ 00328 int func_nest_lev; /* Current nesting of functions */ 00329 int generation; /* DB global generation number */ 00330 int in_loop; // Loop nesting level. 00331 int lock_nest_lev; /* Current nesting of lock evals */ 00332 int logging; /* Are we in the middle of logging? */ 00333 int mail_db_size; /* Like db_size */ 00334 int mail_db_top; /* Like db_top */ 00335 int mHelpDesc; // Number of entries allocated. 00336 int min_size; /* Minimum db size (from file header) */ 00337 int mstat_curr; /* Which sample is latest */ 00338 int nHelpDesc; // Number of entries used. 00339 int nObjEvalNest; // The nesting level of objeval() invocations. 00340 int nStackNest; // Current stack depth. 00341 int nHearNest; // Current aahear depth. 00342 int pipe_nest_lev; // Number of piped commands. 00343 int pcreates_this_hour; // Player creations possible this hour. 00344 int ntfy_nest_lev; // Current nesting of notifys. 00345 int train_nest_lev; // Current nesting of train. 00346 int record_players; // The maximum # of player logged on. 00347 int wild_invk_ctr; // Regular Expression function calls. 00348 int zone_nest_num; /* Global current zone nest position */ 00349 int mstat_idrss[2]; /* Summed private data size */ 00350 int mstat_isrss[2]; /* Summed private stack size */ 00351 int mstat_ixrss[2]; /* Summed shared size */ 00352 int mstat_secs[2]; /* Time of samples */ 00353 int glob_reg_len[MAX_GLOBAL_REGS]; /* Length of strs */ 00354 int inum[MAX_ITEXT]; // Number of iter(). Equivalent to #@. 00355 int *guest_free; /* Table to keep track of free guests */ 00356 size_t mod_alist_len; /* Length of mod_alist */ 00357 size_t mod_size; /* Length of modified buffer */ 00358 00359 char short_ver[64]; /* Short version number (for INFO) */ 00360 char doing_hdr[SIZEOF_DOING_STRING]; /* Doing column header in the WHO display */ 00361 char version[128]; /* MUX version string */ 00362 char *curr_cmd; /* The current command */ 00363 char *debug_cmd; // The command we are executing (if any). 00364 char *mod_alist; /* Attribute list for modifying */ 00365 char *pout; /* The output of the pipe used in %| */ 00366 char *poutbufc; /* Buffer position for poutnew */ 00367 char *poutnew; /* The output being build by the current command */ 00368 char *global_regs[MAX_GLOBAL_REGS]; /* Global registers */ 00369 char *itext[MAX_ITEXT]; // Text of iter(). Equivalent to ##. 00370 00371 ALIST iter_alist; /* Attribute list for iterations */ 00372 BADNAME *badname_head; /* List of disallowed names */ 00373 HELP_DESC *aHelpDesc; // Table of help files hashes. 00374 MARKBUF *markbits; /* temp storage for marking/unmarking */ 00375 OLSTK *olist; /* Stack of object lists for nested searches */ 00376 SITE *suspect_list; /* Sites that are suspect */ 00377 SITE *access_list; /* Access states for sites */ 00378 00379 CLinearTimeAbsolute check_counter; /* Countdown to next db check */ 00380 CLinearTimeAbsolute cpu_count_from; /* When did we last reset CPU counters? */ 00381 CLinearTimeAbsolute dump_counter; /* Countdown to next db dump */ 00382 CLinearTimeAbsolute events_counter; /* Countdown to next events check */ 00383 CLinearTimeAbsolute idle_counter; /* Countdown to next idle check */ 00384 CLinearTimeAbsolute start_time; /* When was MUX started */ 00385 CLinearTimeAbsolute tThrottleExpired; // How much time is left in this hour of throttling. 00386 00387 CHashTable acache_htab; // Attribute Cache 00388 CHashTable attr_name_htab; /* Attribute names hashtable */ 00389 CHashTable channel_htab; /* Channels hashtable */ 00390 CHashTable command_htab; /* Commands hashtable */ 00391 CHashTable desc_htab; /* Socket descriptor hashtable */ 00392 CHashTable flags_htab; /* Flags hashtable */ 00393 CHashTable func_htab; /* Functions hashtable */ 00394 CHashTable fwdlist_htab; /* Room forwardlists */ 00395 CHashTable logout_cmd_htab; /* Logged-out commands hashtable (WHO, etc) */ 00396 CHashTable mail_htab; /* Mail players hashtable */ 00397 CHashTable parent_htab; /* Parent $-command exclusion */ 00398 CHashTable player_htab; /* Player name->number hashtable */ 00399 CHashTable powers_htab; /* Powers hashtable */ 00400 #ifdef PARSE_TREES 00401 CHashTable tree_htab; /* Parse trees for evaluation */ 00402 #endif // PARSE_TREES 00403 CHashTable ufunc_htab; /* Local functions hashtable */ 00404 CHashTable vattr_name_htab; /* User attribute names hashtable */ 00405 00406 CBitField bfNoListens; // Cache knowledge that there are no ^-Commands. 00407 CBitField bfNoCommands; // Cache knowledge that there are no $-Commands. 00408 CBitField bfCommands; // Cache knowledge that there are $-Commands. 00409 CBitField bfListens; // Cache knowledge that there are ^-Commands. 00410 00411 CBitField bfReport; // Used for LROOMS. 00412 CBitField bfTraverse; // Used for LROOMS. 00413 }; 00414 00415 extern STATEDATA mudstate; 00416 00417 /* Configuration parameter handler definition */ 00418 00419 #define CF_HAND(proc) int proc(int *vp, char *str, void *pExtra, UINT32 nExtra, dbref player, char *cmd) 00420 00421 /* Global flags */ 00422 00423 // Game control flags in mudconf.control_flags. 00424 // 00425 #define CF_LOGIN 0x0001 /* Allow nonwiz logins to the mux */ 00426 #define CF_BUILD 0x0002 /* Allow building commands */ 00427 #define CF_INTERP 0x0004 /* Allow object triggering */ 00428 #define CF_CHECKPOINT 0x0008 /* Perform auto-checkpointing */ 00429 #define CF_DBCHECK 0x0010 /* Periodically check/clean the DB */ 00430 #define CF_IDLECHECK 0x0020 /* Periodically check for idle users */ 00431 #define CF_GUEST 0x0040 /* Allow guest logins to the mux */ 00432 /* empty 0x0080 */ 00433 #define CF_DEQUEUE 0x0100 /* Remove entries from the queue */ 00434 #ifdef MUSH3 00435 #define CF_GODMONITOR 0x0200 // Display commands to the god. 00436 #endif // MUSH3 00437 #define CF_EVENTCHECK 0x0400 // Allow events checking. 00438 00439 // Host information codes 00440 // 00441 #define H_REGISTRATION 0x0001 /* Registration ALWAYS on */ 00442 #define H_FORBIDDEN 0x0002 /* Reject all connects */ 00443 #define H_SUSPECT 0x0004 /* Notify wizards of connects/disconnects */ 00444 #define H_GUEST 0x0008 // Don't permit guests from here 00445 #define H_NOSITEMON 0x0010 // Block SiteMon Information 00446 00447 // Event flags, for noting when an event has taken place. 00448 // 00449 #define ET_DAILY 0x00000001 /* Daily taken place? */ 00450 00451 /* Logging options */ 00452 00453 #define LOG_ALLCOMMANDS 0x00000001 /* Log all commands */ 00454 #define LOG_ACCOUNTING 0x00000002 /* Write accounting info on logout */ 00455 #define LOG_BADCOMMANDS 0x00000004 /* Log bad commands */ 00456 #define LOG_BUGS 0x00000008 /* Log program bugs found */ 00457 #define LOG_DBSAVES 0x00000010 /* Log database dumps */ 00458 #define LOG_CONFIGMODS 0x00000020 /* Log changes to configuration */ 00459 #define LOG_PCREATES 0x00000040 /* Log character creations */ 00460 #define LOG_KILLS 0x00000080 /* Log KILLs */ 00461 #define LOG_LOGIN 0x00000100 /* Log logins and logouts */ 00462 #define LOG_NET 0x00000200 /* Log net connects and disconnects */ 00463 #define LOG_SECURITY 0x00000400 /* Log security-related events */ 00464 #define LOG_SHOUTS 0x00000800 /* Log shouts */ 00465 #define LOG_STARTUP 0x00001000 /* Log nonfatal errors in startup */ 00466 #define LOG_WIZARD 0x00002000 /* Log dangerous things */ 00467 #define LOG_ALLOCATE 0x00004000 /* Log alloc/free from buffer pools */ 00468 #define LOG_PROBLEMS 0x00008000 /* Log runtime problems */ 00469 #define LOG_SUSPECTCMDS 0x00020000 // Log SUSPECT player keyboard commands. 00470 #ifdef MUSH3 00471 #define LOG_KBCOMMANDS 0x00010000 // Log keyboard commands. 00472 #endif // MUSH3 00473 #define LOG_TIMEUSE 0x00040000 // Log CPU time usage. 00474 #define LOG_ALWAYS 0x80000000 /* Always log it */ 00475 00476 #define LOGOPT_FLAGS 0x01 /* Report flags on object */ 00477 #define LOGOPT_LOC 0x02 /* Report loc of obj when requested */ 00478 #define LOGOPT_OWNER 0x04 /* Report owner of obj if not obj */ 00479 #define LOGOPT_TIMESTAMP 0x08 /* Timestamp log entries */ 00480 00481 #endif // !__CONF_H