src/mudconf.h

Go to the documentation of this file.
00001 /* mudconf.h */
00002 
00003 #include "config.h"
00004 
00005 #ifndef __MUDCONF_H
00006 #define __MUDCONF_H
00007 
00008 #include <netinet/in.h>
00009 #include "config.h"
00010 #include "htab.h"
00011 #include "alloc.h"
00012 #include "flags.h"
00013 #include "mail.h"
00014 #include "db.h"
00015 #include "pcache.h"
00016 #include "cque.h"
00017 #include "rbtree.h"
00018 
00019 /* CONFDATA:    runtime configurable parameters */
00020 
00021 typedef unsigned char Uchar;
00022 
00023 typedef struct confdata CONFDATA;
00024 struct confdata {
00025     int cache_trim;             /* Should cache be shrunk to original size */
00026     int cache_steal_dirty;      /* Should cache code write dirty attrs */
00027     int cache_depth;            /* Number of entries in each cache cell */
00028     int cache_width;            /* Number of cache cells */
00029     int cache_names;            /* Should object names be cached separately */
00030     char indb[128];             /* database file name */
00031     char outdb[128];            /* checkpoint the database to here */
00032     char crashdb[128];          /* write database here on crash */
00033     char gdbm[128];             /* use this gdbm file if we need one */
00034     char mail_db[128];          /* name of the @mail database */
00035     char commac_db[128];        /* name of the comsys and macros db */
00036     char hcode_db[128];         /* Hardcode stuff */
00037 #ifdef BT_ADVANCED_ECON
00038     char econ_db[128];          /* Hardcode Econ stuff */
00039 #endif
00040     char mech_db[128];          /* Mecha templates */
00041     char map_db[128];           /* Map templates */
00042     char config_file[128];      /* name of config file, used by @restart */
00043     int compress_db;            /* should we use compress */
00044     char compress[128];         /* program to run to compress */
00045     char uncompress[128];       /* program to run to uncompress */
00046     char status_file[128];      /* Where to write arg to @shutdown */
00047     int have_specials;          /* Should the special hcode be active? */
00048     int have_comsys;            /* Should the comsystem be active? */
00049     int have_macros;            /* Should the macro system be active? */
00050     int have_mailer;            /* Should @mail be active? */
00051     int have_zones;             /* Should zones be active? */
00052     int port;                   /* user port */
00053     int conc_port;              /* concentrator port */
00054     int init_size;              /* initial db size */
00055     int have_guest;             /* Do we wish to allow a GUEST character? */
00056     int guest_char;             /* player num of prototype GUEST character */
00057     int guest_nuker;            /* Wiz who nukes the GUEST characters. */
00058     int number_guests;          /* number of guest characters allowed */
00059     char guest_prefix[32];      /* Prefix for the guest char's name */
00060     char guest_file[32];        /* display if guest connects */
00061     char conn_file[32];         /* display on connect if no registration */
00062     char conn_dir[32];          /* display on connect if no registration */
00063     char creg_file[32];         /* display on connect if registration */
00064     char regf_file[32];         /* display on (failed) create if reg is on */
00065     char motd_file[32];         /* display this file on login */
00066     char wizmotd_file[32];      /* display this file on login to wizards */
00067     char quit_file[32];         /* display on quit */
00068     char down_file[32];         /* display this file if no logins */
00069     char full_file[32];         /* display when max users exceeded */
00070     char site_file[32];         /* display if conn from bad site */
00071     char crea_file[32];         /* display this on login for new users */
00072     char help_file[32];         /* HELP text file */
00073     char help_indx[32];         /* HELP index file */
00074     char news_file[32];         /* NEWS text file */
00075     char news_indx[32];         /* NEWS index file */
00076     char whelp_file[32];        /* Wizard help text file */
00077     char whelp_indx[32];        /* Wizard help index file */
00078     char plushelp_file[32];     /* +help text file */
00079     char plushelp_indx[32];     /* +help index file */
00080     char wiznews_file[32];      /*  wiznews text file */
00081     char wiznews_indx[32];      /*  wiznews index file */
00082     char motd_msg[4096];        /* Wizard-settable login message */
00083     char wizmotd_msg[4096];     /* Login message for wizards only */
00084     char downmotd_msg[4096];    /* Settable 'logins disabled' message */
00085     char fullmotd_msg[4096];    /* Settable 'Too many players' message */
00086     char dump_msg[128];         /* Message displayed when @dump-ing */
00087     char postdump_msg[128];     /* Message displayed after @dump-ing */
00088     char fixed_home_msg[128];   /* Message displayed when going home and FIXED */
00089     char fixed_tel_msg[128];    /* Message displayed when teleporting and FIXED */
00090     char public_channel[32];    /* Name of public channel */
00091     char guests_channel[32];    /* Name of guests channel */
00092     int allow_unloggedwho;      /* Wether or not to allow unlogged-in clients to use WHO, DOING and SESSION */
00093     int btech_explode_reactor;  /* Allow or disallow explode reactor */
00094     int btech_explode_ammo;     /* Allow or disallow explode ammo */
00095     int btech_explode_stop;     /* Allow or disallow explode stop */
00096     int btech_explode_time;     /* Number of tics self-destruction takes */
00097     int btech_ic;               /* Allow or disallow MechWarrior embark/disembark */
00098     int btech_parts;
00099     int btech_vcrit;
00100     int btech_slowdown;
00101     int btech_fasaturn;
00102     int btech_dynspeed;
00103     int btech_stackpole;        /* Mechs mushroom as a result of triple engine crits */
00104     int btech_erange;
00105     int btech_phys_use_pskill;  /* Use piloting skills for physical attacks */
00106     int namechange_days;
00107     int allow_chanlurking;      /* 'last' and 'who' on 'off' channels ? */
00108     int btech_newterrain;       /* fasa terrain restrictions for wheeled */
00109     int btech_fasacrit;         /* fasa critsystem */
00110     int btech_fasaadvvtolcrit;  /* L3 FASA VTOL crits and hitlocs */
00111     int btech_fasaadvvhlcrit;   /* L3 FASA ground vehicle crits and hitlocs */
00112     int btech_fasaadvvhlfire;   /* L3 FASA ground vehicle fire rules */
00113     int btech_divrotordamage;   /* amount to divide damage to vtol rotors by. Instead of just 1 pt per hit, we'll divide the damage by something */
00114     int btech_moddamagewithrange;       /* For energy weapons: +1 damage at <=1 hex, -1 damage at long range */
00115     int btech_moddamagewithwoods;       /* Occupied woods do not add to BTH but lessen damage. -2 for light, -4 for heavy, chance to clear on each shot. Intervening woods don't change. */
00116     int btech_hotloadaddshalfbthmod;    /* Mod the BTH for hotloaded LRMs. The BTH mod is half what it is if not hotloaded */
00117     int btech_nofusionvtolfuel; /* Fusion engine'd VTOLs don't use fuel */
00118     int btech_vhltacthreshold;  /* threshold for vehicle TACs. If it's <= 0, we ignore any armor level and do normal tacs, else we only TAC if the armor percent is <= to the value. */
00119     int btech_mechtacthreshold; /* threshold for Mech TACs. If it's <= 0, we ignore any armor level and do normal tacs, else we only TAC if the armor percent is <= to the value. */
00120     int btech_newcharge;
00121     int btech_tl3_charge;
00122     int btech_tankfriendly;     /* Some tank friendly changes if fasacrit is too harsh */
00123     int btech_skidcliff;        /* skidroll to check for cliffs and falldamage for mechs  */
00124     int btech_xp_bthmod;        /* Use bth modifier in new xp code */
00125     int btech_xp_missilemod;    /* Modifier for missile weapons */
00126     int btech_xp_ammomod;       /* modifier for ammo weapons (not missiles ) */
00127     int btech_defaultweapdam;   /* modifier to default weapon BV */
00128     int btech_xp_usePilotBVMod; /* use the pilot's skills to modify the BV of the unit */
00129     int btech_xp_modifier;      /* modifier to increase or decrease xp-gain */
00130     int btech_defaultweapbv;    /* Weapons with BVs higher than this give less xp, lower give more */
00131     int btech_oldxpsystem;      /* Uses old xp system if 1 */
00132     int btech_xp_vrtmod;        /* Modifier for VRT weapons used if !0 */
00133     int btech_limitedrepairs;   /* If on then armor fixes and reloads in stalls only */
00134     int btech_digbonus;
00135     int btech_dig_only_fs;
00136     int btech_xploss;
00137     int btech_critlevel;        /* percentage of armor left before TAC occurs */
00138     int btech_tankshield;
00139     int btech_newstagger;       /* For the new round based stagger */
00140     int btech_extendedmovemod;  /* Whether to use MaxTech's extended target movement modifiers */
00141     int btech_stacking;         /* Whether to check for stacking, and how to penalize */
00142     int btech_stackdamage;      /* Damage modifier for btech_stacking=2 */
00143     int btech_mw_losmap;        /* Whether MechWarriors always get a losmap */
00144     int btech_seismic_see_stopped; /* Whether you see stopped mechs on seismic */
00145     int btech_exile_stun_code;      /* Should we use the Exile Head Hit Stun code */
00146     int btech_roll_on_backwalk;     /* wheter a piloting roll should be made to walk backwards over elevation changes */
00147     int btech_usedmechstore;    /* DBref for the dead mechs to spool into upon IC death */
00148     int btech_ooc_comsys;       /* Enable bypassing of CA_NO_IC command checks for IC location blocking */
00149     int btech_idf_requires_spotter; /* Requires spotter for IDF firing */
00150     int btech_vtol_ice_causes_fire; /* VTOL ICE engines cause fire on crash/explosion */
00151     int btech_glancing_blows; /* 0=Don't, 1=maxtech (BTH) , 2= Exile (BTH-1) */
00152     int btech_inferno_penalty;    /* FASA Inferno Ammo penalty (+30 heat, ammo explode) */
00153     int btech_perunit_xpmod;    /* Allow per unit xp modifications */
00154 #ifdef BT_FREETECHTIME
00155     int btech_freetechtime;     /* Near instant repair times */
00156 #endif
00157 #ifdef BT_COMPLEXREPAIRS
00158     int btech_complexrepair;
00159 #endif
00160 #ifdef HUDINFO_SUPPORT
00161     int hudinfo_show_mapinfo;   /* What kind of info we are willing to give */
00162     int hudinfo_enabled;        /* At runtime turn HUD on and off */
00163 #endif
00164     int afterlife_dbref;
00165     int afterscen_dbref;
00166     int indent_desc;            /* Newlines before and after descs? */
00167     int name_spaces;            /* allow player names to have spaces */
00168     int show_unfindable_who;    /* should players set UNFINDABLE appear on who? */
00169     int site_chars;             /* where to truncate site name */
00170     int fork_dump;              /* perform dump in a forked process */
00171     int fork_vfork;             /* use vfork to fork */
00172     int sig_action;             /* What to do with fatal signals */
00173     int paranoid_alloc;         /* Rigorous buffer integrity checks */
00174     int max_players;            /* Max # of connected players */
00175     int dump_interval;          /* interval between ckp dumps in seconds */
00176     int check_interval;         /* interval between db check/cleans in secs */
00177     int events_daily_hour;      /* At what hour should @daily be executed? */
00178     int dump_offset;            /* when to take first checkpoint dump */
00179     int check_offset;           /* when to perform first check and clean */
00180     int idle_timeout;           /* Boot off players idle this long in secs */
00181     int conn_timeout;           /* Allow this long to connect before booting */
00182     int idle_interval;          /* when to check for idle users */
00183     int retry_limit;            /* close conn after this many bad logins */
00184     int output_limit;           /* Max # chars queued for output */
00185     int paycheck;               /* players earn this much each day connected */
00186     int paystart;               /* new players start with this much money */
00187     int paylimit;               /* getting money gets hard over this much */
00188     int start_quota;            /* Quota for new players */
00189     int payfind;                /* chance to find a penny with wandering */
00190     int digcost;                /* cost of @dig command */
00191     int linkcost;               /* cost of @link command */
00192     int opencost;               /* cost of @open command */
00193     int createmin;              /* default (and minimum) cost of @create cmd */
00194     int createmax;              /* max cost of @create command */
00195     int killmin;                /* default (and minimum) cost of kill cmd */
00196     int killmax;                /* max cost of kill command */
00197     int killguarantee;          /* cost of kill cmd that guarantees success */
00198     int robotcost;              /* cost of @robot command */
00199     int pagecost;               /* cost of @page command */
00200     int searchcost;             /* cost of commands that search the whole DB */
00201     int waitcost;               /* cost of @wait (refunded when finishes) */
00202     int mail_expiration;        /* Number of days to wait to delete mail */
00203     int use_http;               /* Should we allow http access? */
00204     int queuemax;               /* max commands a player may have in queue */
00205     int queue_chunk;            /* # cmds to run from queue when idle */
00206     int active_q_chunk;         /* # cmds to run from queue when active */
00207     int machinecost;            /* One in mc+1 cmds costs 1 penny (POW2-1) */
00208     int room_quota;             /* quota needed to make a room */
00209     int exit_quota;             /* quota needed to make an exit */
00210     int thing_quota;            /* quota needed to make a thing */
00211     int player_quota;           /* quota needed to make a robot player */
00212     int sacfactor;              /* sacrifice earns (obj_cost/sfactor) + sadj */
00213     int sacadjust;              /* ... */
00214     int clone_copy_cost;        /* Does @clone copy value? */
00215     int use_hostname;           /* TRUE = use machine NAME rather than quad */
00216     int quotas;                 /* TRUE = have building quotas */
00217     int ex_flags;               /* TRUE = show flags on examine */
00218     int robot_speak;            /* TRUE = allow robots to speak */
00219     int pub_flags;              /* TRUE = flags() works on anything */
00220     int quiet_look;             /* TRUE = don't see attribs when looking */
00221     int exam_public;            /* Does EXAM show public attrs by default? */
00222     int read_rem_desc;          /* Can the DESCs of nonlocal objs be read? */
00223     int read_rem_name;          /* Can the NAMEs of nonlocal objs be read? */
00224     int sweep_dark;             /* Can you sweep dark places? */
00225     int player_listen;          /* Are AxHEAR triggered on players? */
00226     int quiet_whisper;          /* Can others tell when you whisper? */
00227     int dark_sleepers;          /* Are sleeping players 'dark'? */
00228     int see_own_dark;           /* Do you see your own dark stuff? */
00229     int idle_wiz_dark;          /* Do idling wizards get set dark? */
00230     int pemit_players;          /* Can you @pemit to faraway players? */
00231     int pemit_any;              /* Can you @pemit to ANY remote object? */
00232     int match_mine;             /* Should you check yourself for $-commands? */
00233     int match_mine_pl;          /* Should players check selves for $-cmds? */
00234     int switch_df_all;          /* Should @switch match all by default? */
00235     int fascist_tport;          /* Src of teleport must be owned/JUMP_OK */
00236     int terse_look;             /* Does manual look obey TERSE */
00237     int terse_contents;         /* Does TERSE look show exits */
00238     int terse_exits;            /* Does TERSE look show obvious exits */
00239     int terse_movemsg;          /* Show move msgs (SUCC/LEAVE/etc) if TERSE? */
00240     int trace_topdown;          /* Is TRACE output top-down or bottom-up? */
00241     int trace_limit;            /* Max lines of trace output if top-down */
00242     int stack_limit;            /* How big can stacks get? */
00243     int safe_unowned;           /* Are objects not owned by you safe? */
00244     int space_compress;         /* Convert multiple spaces into one space */
00245     int start_room;             /* initial location and home for players */
00246     int start_home;             /* initial HOME for players */
00247     int default_home;           /* HOME when home is inaccessable */
00248     int master_room;            /* Room containing default cmds/exits/etc */
00249     FLAGSET player_flags;       /* Flags players start with */
00250     FLAGSET room_flags;         /* Flags rooms start with */
00251     FLAGSET exit_flags;         /* Flags exits start with */
00252     FLAGSET thing_flags;        /* Flags things start with */
00253     FLAGSET robot_flags;        /* Flags robots start with */
00254     int vattr_flags;            /* Attr flags for all user-defined attrs */
00255     char mud_name[32];          /* Name of the mud */
00256     char one_coin[32];          /* name of one coin (ie. "penny") */
00257     char many_coins[32];        /* name of many coins (ie. "pennies") */
00258     int timeslice;              /* How often do we bump people's cmd quotas? */
00259     int cmd_quota_max;          /* Max commands at one time */
00260     int cmd_quota_incr;         /* Bump #cmds allowed by this each timeslice */
00261     int control_flags;          /* Global runtime control flags */
00262     int log_options;            /* What gets logged */
00263     int log_info;               /* Info that goes into log entries */
00264     Uchar markdata[8];          /* Masks for marking/unmarking */
00265     int func_nest_lim;          /* Max nesting of functions */
00266     int func_invk_lim;          /* Max funcs invoked by a command */
00267     int ntfy_nest_lim;          /* Max nesting of notifys */
00268     int lock_nest_lim;          /* Max nesting of lock evals */
00269     int parent_nest_lim;        /* Max levels of parents */
00270     int zone_nest_lim;          /* Max nesting of zones */
00271 #ifdef SQL_SUPPORT
00272     int sqlDB_init_A;
00273     char sqlDB_type_A[128];     /* Currently only 'MySQL' */
00274     char sqlDB_hostname_A[128]; /* Usually localhost */
00275     char sqlDB_username_A[128]; /* SQL user */
00276     char sqlDB_password_A[128]; /* SQL user's password */
00277     char sqlDB_dbname_A[128];   /* Name of the DB to use */
00278     int sqlDB_init_B;
00279     char sqlDB_type_B[128];
00280     char sqlDB_hostname_B[128];
00281     char sqlDB_username_B[128];
00282     char sqlDB_password_B[128];
00283     char sqlDB_dbname_B[128];
00284     int sqlDB_init_C;
00285     char sqlDB_type_C[128];
00286     char sqlDB_hostname_C[128];
00287     char sqlDB_username_C[128];
00288     char sqlDB_password_C[128];
00289     char sqlDB_dbname_C[128];
00290     int sqlDB_init_D;
00291     char sqlDB_type_D[128];
00292     char sqlDB_hostname_D[128];
00293     char sqlDB_username_D[128];
00294     char sqlDB_password_D[128];
00295     char sqlDB_dbname_D[128];
00296     int sqlDB_init_E;
00297     char sqlDB_type_E[128];
00298     char sqlDB_hostname_E[128];
00299     char sqlDB_username_E[128];
00300     char sqlDB_password_E[128];
00301     char sqlDB_dbname_E[128];
00302     char sqlDB_sqlite_dbdir[128];
00303     char sqlDB_mysql_socket[128];
00304     int sqlDB_max_queries;
00305 #endif
00306     int room_parent;
00307     int exit_parent;
00308 };
00309 
00310 extern CONFDATA mudconf;
00311 
00312 typedef struct site_data SITE;
00313 struct site_data {
00314     struct site_data *next;     /* Next site in chain */
00315     struct in_addr address;     /* Host or network address */
00316     struct in_addr mask;        /* Mask to apply before comparing */
00317     int flag;                   /* Value to return on match */
00318 };
00319 
00320 typedef struct objlist_block OBLOCK;
00321 struct objlist_block {
00322     struct objlist_block *next;
00323     dbref data[(LBUF_SIZE - sizeof(OBLOCK *)) / sizeof(dbref)];
00324 };
00325 
00326 #define OBLOCK_SIZE ((LBUF_SIZE - sizeof(OBLOCK *)) / sizeof(dbref))
00327 
00328 typedef struct objlist_stack OLSTK;
00329 struct objlist_stack {
00330         struct objlist_stack *next;     /* Next object list in stack */
00331         OBLOCK  *head;          /* Head of object list */
00332         OBLOCK  *tail;          /* Tail of object list */
00333         OBLOCK  *cblock;        /* Current block for scan */
00334         int     count;          /* Number of objs in last obj list block */
00335         int     citm;           /* Current item for scan */
00336 };
00337 
00338 typedef struct markbuf MARKBUF;
00339 struct markbuf {
00340     char chunk[5000];
00341 };
00342 
00343 typedef struct alist ALIST;
00344 struct alist {
00345     char *data;
00346     int len;
00347     struct alist *next;
00348 };
00349 
00350 typedef struct badname_struc BADNAME;
00351 struct badname_struc {
00352     char *name;
00353     struct badname_struc *next;
00354 };
00355 
00356 typedef struct forward_list FWDLIST;
00357 struct forward_list {
00358     int count;
00359     int data[1000];
00360 };
00361 
00362 typedef struct statedata STATEDATA;
00363 struct statedata {
00364     int record_players;         /* The maximum # of player logged on */
00365     int initializing;           /* are we reading config file at startup? */
00366     int panicking;              /* are we in the middle of dying horribly? */
00367     int restarting;             /* Are we restarting? */
00368     int dumping;                /* Are we dumping? */
00369     int logging;                /* Are we in the middle of logging? */
00370     int epoch;                  /* Generation number for dumps */
00371     int generation;             /* DB global generation number */
00372     dbref curr_enactor;         /* Who initiated the current command */
00373     dbref curr_player;          /* Who is running the current command */
00374     int alarm_triggered;        /* Has periodic alarm signal occurred? */
00375     time_t now;                 /* What time is it now? */
00376     time_t dump_counter;        /* Countdown to next db dump */
00377     time_t check_counter;       /* Countdown to next db check */
00378     time_t idle_counter;        /* Countdown to next idle check */
00379     time_t mstats_counter;      /* Countdown to next mstats snapshot */
00380     time_t events_counter;      /* Countdown to next events check */
00381     int events_flag;            /* Flags for check_events */
00382     int events_lasthour;        /* Last hour we ran hourly maintenance */
00383 
00384     int shutdown_flag;          /* Should interface be shut down? */
00385     char version[256];          /* MUX version string */
00386     time_t start_time;          /* When was MUX started */
00387     time_t restart_time;        /* When was MUX (re-)started */
00388     char buffer[256];           /* A buffer for holding temp stuff */
00389     char *debug_cmd;            /* The command we are executing (if any) */
00390     char doing_hdr[41];         /* Doing column header in the WHO display */
00391     SITE *access_list;          /* Access states for sites */
00392     SITE *suspect_list;         /* Sites that are suspect */
00393     HASHTAB command_htab;       /* Commands hashtable */
00394     HASHTAB macro_htab;         /* Macro command hashtable */
00395     HASHTAB channel_htab;       /* Channels hashtable */
00396     NHSHTAB mail_htab;          /* Mail players hashtable */
00397     HASHTAB logout_cmd_htab;    /* Logged-out commands hashtable (WHO, etc) */
00398     HASHTAB func_htab;          /* Functions hashtable */
00399     HASHTAB ufunc_htab;         /* Local functions hashtable */
00400     HASHTAB powers_htab;        /* Powers hashtable */
00401     HASHTAB flags_htab;         /* Flags hashtable */
00402     HASHTAB attr_name_htab;     /* Attribute names hashtable */
00403     HASHTAB vattr_name_htab;    /* User attribute names hashtable */
00404     HASHTAB player_htab;        /* Player name->number hashtable */
00405     rbtree desctree;
00406     NHSHTAB fwdlist_htab;       /* Room forwardlists */
00407     NHSHTAB parent_htab;        /* Parent $-command exclusion */
00408 #ifdef PARSE_TREES
00409     NHSHTAB tree_htab;          /* Parse trees for evaluation */
00410 #endif
00411     HASHTAB news_htab;          /* News topics hashtable */
00412     HASHTAB help_htab;          /* Help topics hashtable */
00413     HASHTAB wizhelp_htab;       /* Wizard help topics hashtable */
00414     HASHTAB plushelp_htab;      /* +help topics hashtable */
00415     HASHTAB wiznews_htab;       /* wiznews topics hashtable */
00416     int attr_next;              /* Next attr to alloc when freelist is empty */
00417     OBJQE *qhead;        /* Per Object Queue Entries */
00418     OBJQE *qtail;        
00419     BQUE *qwait;                /* Head of wait queue */
00420     BQUE *qsemfirst;            /* Head of semaphore queue */
00421     BQUE *qsemlast;             /* Tail of semaphore queue */
00422     BADNAME *badname_head;      /* List of disallowed names */
00423     int mstat_ixrss[2];         /* Summed shared size */
00424     int mstat_idrss[2];         /* Summed private data size */
00425     int mstat_isrss[2];         /* Summed private stack size */
00426     int mstat_secs[2];          /* Time of samples */
00427     int mstat_curr;             /* Which sample is latest */
00428     ALIST iter_alist;           /* Attribute list for iterations */
00429     char *mod_alist;            /* Attribute list for modifying */
00430     int mod_size;               /* Length of modified buffer */
00431     dbref mod_al_id;            /* Where did mod_alist come from? */
00432     OLSTK *olist;               /* Stack of object lists for nested searches */
00433     dbref freelist;             /* Head of object freelist */
00434     int min_size;               /* Minimum db size (from file header) */
00435     int db_top;                 /* Number of items in the db */
00436     int db_size;                /* Allocated size of db structure */
00437     int db_revision;     /* database revision */
00438     int mail_freelist;          /* The next free mail number */
00439     int mail_db_top;            /* Like db_top */
00440     int mail_db_size;           /* Like db_size */
00441     MENT *mail_list;            /* The mail database */
00442     int *guest_free;            /* Table to keep track of free guests */
00443     MARKBUF *markbits;          /* temp storage for marking/unmarking */
00444     int func_nest_lev;          /* Current nesting of functions */
00445     int func_invk_ctr;          /* Functions invoked so far by this command */
00446     int ntfy_nest_lev;          /* Current nesting of notifys */
00447     int lock_nest_lev;          /* Current nesting of lock evals */
00448     char *global_regs[MAX_GLOBAL_REGS]; /* Global registers */
00449     int zone_nest_num;          /* Global current zone nest position */
00450     int inpipe;                 /* Boolean flag for command piping */
00451     char *pout;                 /* The output of the pipe used in %| */
00452     char *poutnew;              /* The output being build by the current command */
00453     char *poutbufc;             /* Buffer position for poutnew */
00454     dbref poutobj;              /* Object doing the piping */
00455     char *executable_path;
00456 };
00457 
00458 extern STATEDATA mudstate;
00459 
00460 /* Global flags */
00461 
00462 /* Game control flags in mudconf.control_flags */
00463 
00464 #define CF_LOGIN        0x0001  /* Allow nonwiz logins to the mux */
00465 #define CF_BUILD        0x0002  /* Allow building commands */
00466 #define CF_INTERP       0x0004  /* Allow object triggering */
00467 #define CF_CHECKPOINT   0x0008  /* Perform auto-checkpointing */
00468 #define CF_DBCHECK      0x0010  /* Periodically check/clean the DB */
00469 #define CF_IDLECHECK    0x0020  /* Periodically check for idle users */
00470 
00471 /* empty                0x0040 */
00472 
00473 /* empty                0x0080 */
00474 #define CF_DEQUEUE      0x0100  /* Remove entries from the queue */
00475 #define CF_EVENTCHECK   0x0200  /* Allow events checking */
00476 
00477 /* Host information codes */
00478 
00479 #define H_REGISTRATION  0x0001  /* Registration ALWAYS on */
00480 #define H_FORBIDDEN     0x0002  /* Reject all connects */
00481 #define H_SUSPECT       0x0004  /* Notify wizards of connects/disconnects */
00482 
00483 /* Event flags, for noting when an event has taken place */
00484 
00485 #define ET_DAILY        0x00000001      /* Daily taken place? */
00486 
00487 /* Logging options */
00488 
00489 #define LOG_ALLCOMMANDS 0x00000001      /* Log all commands */
00490 #define LOG_ACCOUNTING  0x00000002      /* Write accounting info on logout */
00491 #define LOG_BADCOMMANDS 0x00000004      /* Log bad commands */
00492 #define LOG_BUGS        0x00000008      /* Log program bugs found */
00493 #define LOG_DBSAVES     0x00000010      /* Log database dumps */
00494 #define LOG_CONFIGMODS  0x00000020      /* Log changes to configuration */
00495 #define LOG_PCREATES    0x00000040      /* Log character creations */
00496 #define LOG_KILLS       0x00000080      /* Log KILLs */
00497 #define LOG_LOGIN       0x00000100      /* Log logins and logouts */
00498 #define LOG_NET         0x00000200      /* Log net connects and disconnects */
00499 #define LOG_SECURITY    0x00000400      /* Log security-related events */
00500 #define LOG_SHOUTS      0x00000800      /* Log shouts */
00501 #define LOG_STARTUP     0x00001000      /* Log nonfatal errors in startup */
00502 #define LOG_WIZARD      0x00002000      /* Log dangerous things */
00503 #define LOG_ALLOCATE    0x00004000      /* Log alloc/free from buffer pools */
00504 #define LOG_PROBLEMS    0x00008000      /* Log runtime problems */
00505 #define LOG_SUSPECTCMDS 0x00010000      /* Log commands by people set SUSPECT */
00506 #define LOG_ALWAYS      0x80000000      /* Always log it */
00507 
00508 #define LOGOPT_FLAGS            0x01    /* Report flags on object */
00509 #define LOGOPT_LOC              0x02    /* Report loc of obj when requested */
00510 #define LOGOPT_OWNER            0x04    /* Report owner of obj if not obj */
00511 #define LOGOPT_TIMESTAMP        0x08    /* Timestamp log entries */
00512 
00513 #define HIDDEN_IDLESECS         600     /* Show people idle for less as 0s idle */
00514 
00515 #endif

Generated on Mon May 28 04:25:25 2007 for BattletechMUX by  doxygen 1.4.7