src/externs.h

Go to the documentation of this file.
00001 
00002 /* externs.h - Prototypes for externs not defined elsewhere */
00003 
00004 /* $Id: externs.h,v 1.6 2005/08/08 10:30:11 murrayma Exp $ */
00005 
00006 #include "config.h"
00007 #include "copyright.h"
00008 
00009 #ifndef __EXTERNS__H
00010 #define __EXTERNS__H
00011 
00012 #include "db.h"
00013 #include "mudconf.h"
00014 #include "interface.h"
00015 #include "mmdb.h"
00016 
00017 #ifndef _DB_C
00018 #define INLINE
00019 #else                           /* _DB_C */
00020 #ifdef __GNUC__
00021 #define INLINE inline
00022 #else                           /* __GNUC__ */
00023 #define INLINE
00024 #endif                          /* __GNUC__ */
00025 #endif                          /* _DB_C */
00026 
00027 #define ToUpper(C)      (((C) >= 'a' && (C) <= 'z')? (C) - 'a' + 'A': (C))
00028 #define ToLower(C)      (((C) >= 'A' && (C) <= 'Z')? (C) - 'A' + 'a': (C))
00029 #define safe_atoi(s)    ((s == NULL) ? 0 : atoi(s))
00030 
00031 /* From conf.c */
00032 int cf_modify_bits(int *, char *, long, dbref, char *);
00033 
00034 /* From mail.c*/
00035 int load_mail(FILE *);
00036 int dump_mail(FILE *);
00037 void mail_init(void);
00038 struct mail *mail_fetch(dbref, int);
00039 
00040 /* From udb_achunk.c */
00041 int dddb_close(void);
00042 int dddb_setfile(char *);
00043 int dddb_init(void);
00044 
00045 /* From netcommon.c */
00046 void choke_player(dbref);
00047 void release_player(dbref);
00048 void make_ulist(dbref, char *, char **);
00049 int fetch_idle(dbref);
00050 int fetch_connect(dbref);
00051 void raw_broadcast(int, char *, ...);
00052 int desc_cmp(void *, void *, void *);
00053 void run_command(DESC *d, char *);
00054 int do_unauth_command(DESC *d, char *);
00055 
00056 /* From cque.c */
00057 int nfy_que(dbref, int, int, int);
00058 int halt_que(dbref, dbref);
00059 void wait_que(dbref, dbref, int, dbref, int, char *, char *[], int, char *[]);
00060 int que_next(void);
00061 int do_top(int ncmds);
00062 void recover_queue_deposits(void);
00063 void cque_dump_restart(struct mmdb_t *);
00064 void cque_load_restart(struct mmdb_t *);
00065 
00066 
00067 /* From eval.c */
00068 void tcache_init(void);
00069 char *parse_to(char **, char, int);
00070 char *parse_arglist(dbref, dbref, char *, char, int, char *[], int, char *[], int);
00071 int get_gender(dbref);
00072 void exec(char *, char **, int, dbref, dbref, int, char **, char *[], int);
00073 
00074 /* From game.c */
00075 void do_shutdown(dbref, dbref, int, char *);
00076 #define notify(p,m)                     notify_checked(p,p,m, MSG_PUP_ALWAYS|MSG_ME_ALL|MSG_F_DOWN)
00077 #define notify_quiet(p,m)               notify_checked(p,p,m, \
00078                                                 MSG_PUP_ALWAYS|MSG_ME)
00079 #define notify_with_cause(p,c,m)        notify_checked(p,c,m, \
00080                                                 MSG_PUP_ALWAYS|MSG_ME_ALL|MSG_F_DOWN)
00081 #define notify_quiet_with_cause(p,c,m)  notify_checked(p,c,m, \
00082                                                 MSG_PUP_ALWAYS|MSG_ME)
00083 #define notify_puppet(p,c,m)            notify_checked(p,c,m, \
00084                                                 MSG_ME_ALL|MSG_F_DOWN)
00085 #define notify_quiet_puppet(p,c,m)      notify_checked(p,c,m, \
00086                                                 MSG_ME)
00087 #define notify_all(p,c,m)               notify_checked(p,c,m, \
00088                                                 MSG_ME_ALL|MSG_NBR_EXITS|MSG_F_UP|MSG_F_CONTENTS)
00089 #define notify_all_from_inside(p,c,m)   notify_checked(p,c,m, \
00090                                                 MSG_ME_ALL|MSG_NBR_EXITS_A|MSG_F_UP|MSG_F_CONTENTS|MSG_S_INSIDE)
00091 #define notify_all_from_outside(p,c,m)  notify_checked(p,c,m, \
00092                                                 MSG_ME_ALL|MSG_NBR_EXITS|MSG_F_UP|MSG_F_CONTENTS|MSG_S_OUTSIDE)
00093 void notify_except(dbref, dbref, dbref, const char *);
00094 void notify_except2(dbref, dbref, dbref, dbref, const char *);
00095 void notify_printf(dbref, const char *, ...);
00096 int check_filter(dbref, dbref, int, const char *);
00097 void notify_checked(dbref, dbref, const char *, int);
00098 int Hearer(dbref);
00099 void report(void);
00100 int atr_match(dbref, dbref, char, char *, int);
00101 int list_check(dbref, dbref, char, char *, int);
00102 
00103 /* From dnschild.c */
00104 int dnschild_init();
00105 void *dnschild_request(DESC *d);
00106 void dnschild_destruct();
00107 void dnschild_kill(void *);
00108 
00109 /* From bsd.c */
00110 void shutdown_services();
00111 void flush_sockets();
00112 int eradicate_broken_fd(int);
00113 void mux_release_socket();
00114 void bind_descriptor(DESC *);
00115 void release_descriptor(DESC *);
00116 
00117 /* From signal.c */
00118 void bind_signals();
00119 void unbind_signals();
00120 
00121 
00122 /* From help.c */
00123 int helpindex_read(HASHTAB *, char *);
00124 void helpindex_load(dbref);
00125 void helpindex_init(void);
00126 
00127 /* From htab.c */
00128 int cf_ntab_access(int *, char *, long, dbref, char *);
00129 
00130 /* From log.c */
00131 char *strip_ansi_r(char *, const char *, size_t);
00132 char *normal_to_white_r(char *, const char *, size_t);
00133 int start_log(const char *, const char *);
00134 void end_log(void);
00135 void log_perror(const char *, const char *, const char *, const char *);
00136 void log_printf(char *, ...);
00137 void log_error(int, char *, char *, char *, ...);
00138 void log_text(char *);
00139 void log_number(int);
00140 void log_name(dbref);
00141 void log_name_and_loc(dbref);
00142 char *OBJTYP(dbref);
00143 void log_type_and_name(dbref);
00144 void log_type_and_num(dbref);
00145 #ifdef ARBITRARY_LOGFILES
00146 int log_to_file(dbref, const char *, const char *);
00147 #endif
00148 
00149 /* From look.c */
00150 void look_in(dbref, dbref, int);
00151 
00152 /* From move.c */
00153 void move_object(dbref, dbref);
00154 void move_via_generic(dbref, dbref, dbref, int);
00155 void move_via_exit(dbref, dbref, dbref, dbref, int);
00156 int move_via_teleport(dbref, dbref, dbref, int);
00157 void move_exit(dbref, dbref, int, const char *, int);
00158 void do_enter_internal(dbref, dbref, int);
00159 
00160 /* From object.c */
00161 void destroy_player(dbref);
00162 dbref start_home(void);
00163 dbref default_home(void);
00164 int can_set_home(dbref, dbref, dbref);
00165 dbref new_home(dbref);
00166 dbref clone_home(dbref, dbref);
00167 void divest_object(dbref);
00168 dbref create_obj(dbref, int, char *, int);
00169 void destroy_obj(dbref, dbref);
00170 void empty_obj(dbref);
00171 
00172 /* From player.c */
00173 void record_login(dbref, int, char *, char *, char *);
00174 int check_pass(dbref, const char *);
00175 dbref connect_player(char *, char *, char *, char *);
00176 dbref create_player(char *, char *, dbref, int, int);
00177 int add_player_name(dbref, char *);
00178 int delete_player_name(dbref, char *);
00179 dbref lookup_player(dbref, char *, int);
00180 void load_player_names(void);
00181 void badname_add(char *);
00182 void badname_remove(char *);
00183 int badname_check(char *);
00184 void badname_list(dbref, const char *);
00185 
00186 /* From predicates.c */
00187 char *tprintf(const char *, ...);
00188 void safe_tprintf_str(char *, char **, const char *, ...);
00189 dbref insert_first(dbref, dbref);
00190 dbref remove_first(dbref, dbref);
00191 dbref reverse_list(dbref);
00192 int member(dbref, dbref);
00193 int is_integer(char *);
00194 int is_number(char *);
00195 int could_doit(dbref, dbref, int);
00196 int can_see(dbref, dbref, int);
00197 void add_quota(dbref, int);
00198 int canpayfees(dbref, dbref, int, int);
00199 void giveto(dbref, int);
00200 int payfor(dbref, int);
00201 int ok_name(const char *);
00202 int ok_player_name(const char *);
00203 int ok_attr_name(const char *);
00204 int ok_password(const char *);
00205 void handle_ears(dbref, int, int);
00206 void handle_xcode(dbref, dbref, int, int);
00207 int HandledCommand(dbref, dbref, char *);
00208 dbref match_possessed(dbref, dbref, char *, dbref, int);
00209 void parse_range(char **, dbref *, dbref *);
00210 int parse_thing_slash(dbref, char *, char **, dbref *);
00211 int get_obj_and_lock(dbref, char *, dbref *, ATTR **, char *, char **);
00212 dbref where_is(dbref);
00213 dbref where_room(dbref);
00214 int locatable(dbref, dbref, dbref);
00215 int nearby(dbref, dbref);
00216 int exit_visible(dbref, dbref, int);
00217 int exit_displayable(dbref, dbref, int);
00218 void did_it(dbref, dbref, int, const char *, int, const char *, int, char *[], int);
00219 void list_bufstats(dbref);
00220 void list_buftrace(dbref);
00221 void do_restart(dbref player, dbref cause, int key);
00222 
00223 
00224 /* From set.c */
00225 int parse_attrib(dbref, char *, dbref *, int *);
00226 int parse_attrib_wild(dbref, char *, dbref *, int, int, int);
00227 void edit_string(char *, char **, char *, char *);
00228 dbref match_controlled(dbref, char *);
00229 dbref match_affected(dbref, char *);
00230 dbref match_examinable(dbref, char *);
00231 
00232 /* From stringutil.c */
00233 char *munge_space(char *);
00234 char *trim_spaces(char *);
00235 char *grabto(char **, char);
00236 int string_compare(const char *, const char *);
00237 int string_prefix(const char *, const char *);
00238 const char *string_match(const char *, const char *);
00239 char *dollar_to_space(const char *);
00240 char *replace_string(const char *, const char *, const char *);
00241 char *replace_string_inplace(const char *, const char *, char *);
00242 char *skip_space(const char *);
00243 char *seek_char(const char *, char);
00244 int prefix_match(const char *, const char *);
00245 int minmatch(char *, char *, int);
00246 char *strsave(const char *);
00247 int safe_copy_str(char *, char *, char **, int);
00248 int safe_copy_chr(char, char *, char **, int);
00249 int matches_exit_from_list(char *, char *);
00250 char *translate_string(const char *, int);
00251 
00252 /* From boolexp.c */
00253 int eval_boolexp(dbref, dbref, dbref, BOOLEXP *);
00254 BOOLEXP *parse_boolexp(dbref, const char *, int);
00255 int eval_boolexp_atr(dbref, dbref, dbref, char *);
00256 
00257 /* From functions.c */
00258 int xlate(char *);
00259 
00260 /* From unparse.c */
00261 char *unparse_boolexp(dbref, BOOLEXP *);
00262 char *unparse_boolexp_quiet(dbref, BOOLEXP *);
00263 char *unparse_boolexp_decompile(dbref, BOOLEXP *);
00264 char *unparse_boolexp_function(dbref, BOOLEXP *);
00265 
00266 /* From walkdb.c */
00267 int chown_all(dbref, dbref);
00268 void olist_push(void);
00269 void olist_pop(void);
00270 void olist_add(dbref);
00271 dbref olist_first(void);
00272 dbref olist_next(void);
00273 
00274 /* From wild.c */
00275 int wild(char *, char *, char *[], int);
00276 int wild_match(char *, char *);
00277 int quick_wild(char *, char *);
00278 
00279 /* From compress.c */
00280 const char *uncompress(const char *, int);
00281 const char *compress(const char *, int);
00282 char *uncompress_str(char *, const char *, int);
00283 
00284 /* From command.c */
00285 int check_access(dbref, int);
00286 void set_prefix_cmds(void);
00287 
00288 /* from db.c */
00289 int Commer(dbref);
00290 void s_Pass(dbref, const char *);
00291 void s_Name(dbref, char *);
00292 char *Name(dbref);
00293 char *PureName(dbref);
00294 int fwdlist_load(FWDLIST *, dbref, char *);
00295 void fwdlist_set(dbref, FWDLIST *);
00296 void fwdlist_clr(dbref);
00297 int fwdlist_rewrite(FWDLIST *, char *);
00298 FWDLIST *fwdlist_get(dbref);
00299 void clone_object(dbref, dbref);
00300 void init_min_db(void);
00301 void atr_push(void);
00302 void atr_pop(void);
00303 int atr_head(dbref, char **);
00304 int atr_next(char **);
00305 int init_gdbm_db(char *);
00306 void atr_cpy(dbref, dbref, dbref);
00307 void atr_chown(dbref);
00308 void atr_clr(dbref, int);
00309 void atr_add_raw(dbref, int, char *);
00310 void atr_add(dbref, int, char *, dbref, int);
00311 void atr_set_owner(dbref, int, dbref);
00312 void atr_set_flags(dbref, int, int);
00313 char *atr_get_raw(dbref, int);
00314 char *atr_get(dbref, int, dbref *, int *);
00315 char *atr_pget(dbref, int, dbref *, int *);
00316 char *atr_get_str(char *, dbref, int, dbref *, int *);
00317 char *atr_pget_str(char *, dbref, int, dbref *, int *);
00318 int atr_get_info(dbref, int, dbref *, int *);
00319 int atr_pget_info(dbref, int, dbref *, int *);
00320 void atr_free(dbref);
00321 int check_zone(dbref, dbref);
00322 int check_zone_for_player(dbref, dbref);
00323 void toast_player(dbref);
00324 void dump_restart_db(void);
00325 
00326 /* Mecha code: */
00327 void DisposeSpecialObject(dbref, dbref);
00328 void UpdateSpecialObjects(void);
00329 void LoadSpecialObjects(void);
00330 void ResetSpecialObjects(void);
00331 void SaveSpecialObjects(int);
00332 void helpindex_faction_load(dbref);
00333 void list_fhashstats(dbref);
00334 void list_chashstats(dbref);
00335 
00336 /* Command handler keys */
00337 #ifdef SQL_SUPPORT
00338 #define QUERY_SQL       1       /* SQL Query */
00339 #define LIST_SQL        2       /* List active and pending queries */
00340 #define KILL_SQL        3       /* Kill an active query */
00341 #endif
00342 #define ATTRIB_ACCESS   1       /* Change access to attribute */
00343 #define ATTRIB_RENAME   2       /* Rename attribute */
00344 #define ATTRIB_DELETE   4       /* Delete attribute */
00345 #define BOOT_QUIET      1       /* Inhibit boot message to victim */
00346 #define BOOT_PORT       2       /* Boot by port number */
00347 #define CEMIT_NOHEADER  1       /* Channel emit without header */
00348 #define CHOWN_ONE       1       /* item = new_owner */
00349 #define CHOWN_ALL       2       /* old_owner = new_owner */
00350 #define CLIST_FULL      1       /* Full listing of channels */
00351 #define CSTATUS_FULL    1       /* Full listing of channel */
00352 #define CLONE_LOCATION  0       /* Create cloned object in my location */
00353 #define CLONE_INHERIT   1       /* Keep INHERIT bit if set */
00354 #define CLONE_PRESERVE  2       /* Preserve the owner of the object */
00355 #define CLONE_INVENTORY 4       /* Create cloned object in my inventory */
00356 #define CLONE_SET_COST  8       /* ARG2 is cost of cloned object */
00357 #define CLONE_SET_LOC   16      /* ARG2 is location of cloned object */
00358 #define CLONE_SET_NAME  32      /* ARG2 is alternate name of cloned object */
00359 #define CLONE_PARENT    64      /* Set parent on obj instd of cloning attrs */
00360 #define CRE_INVENTORY   0       /* Create object in my inventory */
00361 #define CRE_LOCATION    1       /* Create object in my location */
00362 #define CRE_SET_LOC     2       /* ARG2 is location of new object */
00363 #define CSET_PUBLIC     0       /* Sets a channel public */
00364 #define CSET_PRIVATE    1       /* Sets a channel private (default) */
00365 #define CSET_LOUD       2       /* Channel shows connects and disconnects */
00366 #define CSET_QUIET      3       /* Channel doesn't show connects/disconnects */
00367 #define CSET_LIST       4       /* Lists channels */
00368 #define CSET_OBJECT     5       /* Sets the channel object for the channel */
00369 #define CSET_STATUS     6       /* Gives status of channel */
00370 #define CSET_TRANSPARENT 7      /* Set channel 'transparent' */
00371 #define CSET_OPAQUE     8       /* Set channel !transparent */
00372 #define DBCK_DEFAULT    1       /* Get default tests too */
00373 #define DBCK_REPORT     2       /* Report info to invoker */
00374 #define DBCK_FULL       4       /* Do all tests */
00375 #define DBCK_FLOATING   8       /* Look for floating rooms */
00376 #define DBCK_PURGE      16      /* Purge the db of refs to going objects */
00377 #define DBCK_LINKS      32      /* Validate exit and object chains */
00378 #define DBCK_WEALTH     64      /* Validate object value/wealth */
00379 #define DBCK_OWNER      128     /* Do more extensive owner checking */
00380 #define DBCK_OWN_EXIT   256     /* Check exit owner owns src or dest */
00381 #define DBCK_WIZARD     512     /* Check for wizards/wiz objects */
00382 #define DBCK_TYPES      1024    /* Check for valid & appropriate types */
00383 #define DBCK_SPARE      2048    /* Make sure spare header fields are NOTHING */
00384 #define DBCK_HOMES      4096    /* Make sure homes and droptos are valid */
00385 #define DECOMP_DBREF    1       /* decompile by dbref */
00386 #define DEST_ONE        1       /* object */
00387 #define DEST_ALL        2       /* owner */
00388 #define DEST_OVERRIDE   4       /* override Safe() */
00389 #define DEST_RECURSIVE  8
00390 #define DIG_TELEPORT    1       /* teleport to room after @digging */
00391 #define DOLIST_SPACE    0       /* expect spaces as delimiter */
00392 #define DOLIST_DELIMIT  1       /* expect custom delimiter */
00393 #define DOING_MESSAGE   0       /* Set my DOING message */
00394 #define DOING_HEADER    1       /* Set the DOING header */
00395 #define DOING_POLL      2       /* List DOING header */
00396 #define DROP_QUIET      1       /* Don't do odrop/adrop if control */
00397 #define DUMP_STRUCT     1       /* Dump flat structure file */
00398 #define DUMP_TEXT       2       /* Dump text (gdbm) file */
00399 #define DUMP_OPTIMIZE   3       /* Reorganize the gdbm file */
00400 #define EXAM_DEFAULT    0       /* Default */
00401 #define EXAM_BRIEF      1       /* Nonowner sees just owner */
00402 #define EXAM_LONG       2       /* Nonowner sees public attrs too */
00403 #define EXAM_DEBUG      4       /* Display more info for finding db problems */
00404 #define EXAM_PARENT     8       /* Get attr from parent when exam obj/attr */
00405 #define FIXDB_OWNER     1       /* Fix OWNER field */
00406 #define FIXDB_LOC       2       /* Fix LOCATION field */
00407 #define FIXDB_CON       4       /* Fix CONTENTS field */
00408 #define FIXDB_EXITS     8       /* Fix EXITS field */
00409 #define FIXDB_NEXT      16      /* Fix NEXT field */
00410 #define FIXDB_PENNIES   32      /* Fix PENNIES field */
00411 #define FIXDB_ZONE      64      /* Fix ZONE field */
00412 #define FIXDB_LINK      128     /* Fix LINK field */
00413 #define FIXDB_PARENT    256     /* Fix PARENT field */
00414 #define FIXDB_DEL_PN    512     /* Remove player name from player name index */
00415 #define FIXDB_ADD_PN    1024    /* Add player name to player name index */
00416 #define FIXDB_NAME      2048    /* Set NAME attribute */
00417 #define FRC_PREFIX      0       /* #num command */
00418 #define FRC_COMMAND     1       /* what=command */
00419 #define GET_QUIET       1       /* Don't do osucc/asucc if control */
00420 #define GIVE_MONEY      1       /* Give money */
00421 #define GIVE_QUOTA      2       /* Give quota */
00422 #define GIVE_QUIET      64      /* Inhibit give messages */
00423 #define GLOB_ENABLE     1       /* key to enable */
00424 #define GLOB_DISABLE    2       /* key to disable */
00425 #define GLOB_LIST       3       /* key to list */
00426 #define HALT_ALL        1       /* halt everything */
00427 #define HELP_HELP       1       /* get data from help file */
00428 #define HELP_NEWS       2       /* get data from news file */
00429 #define HELP_WIZHELP    3       /* get data from wizard help file */
00430 #define HELP_PLUSHELP   4       /* get data from plushelp file */
00431 #define HELP_WIZNEWS    5       /* wiznews file */
00432 #define KILL_KILL       1       /* gives victim insurance */
00433 #define KILL_SLAY       2       /* no insurance */
00434 #define LOOK_LOOK       1       /* list desc (and succ/fail if room) */
00435 #define LOOK_EXAM       2       /* full listing of object */
00436 #define LOOK_DEXAM      3       /* debug listing of object */
00437 #define LOOK_INVENTORY  4       /* list inventory of object */
00438 #define LOOK_SCORE      5       /* list score (# coins) */
00439 #define LOOK_OUTSIDE    8       /* look for object in container of player */
00440 #define MAIL_STATS      1       /* Mail stats */
00441 #define MAIL_DSTATS     2       /* More mail stats */
00442 #define MAIL_FSTATS     3       /* Even more mail stats */
00443 #define MAIL_DEBUG      4       /* Various debugging options */
00444 #define MAIL_NUKE       5       /* Nuke the post office */
00445 #define MAIL_FOLDER     6       /* Do folder stuff */
00446 #define MAIL_LIST       7       /* List @mail by time */
00447 #define MAIL_READ       8       /* Read @mail message */
00448 #define MAIL_CLEAR      9       /* Clear @mail message */
00449 #define MAIL_UNCLEAR    10      /* Unclear @mail message */
00450 #define MAIL_PURGE      11      /* Purge cleared @mail messages */
00451 #define MAIL_FILE       12      /* File @mail in folders */
00452 #define MAIL_TAG        13      /* Tag @mail messages */
00453 #define MAIL_UNTAG      14      /* Untag @mail messages */
00454 #define MAIL_FORWARD    15      /* Forward @mail messages */
00455 #define MAIL_SEND       16      /* Send @mail messages in progress */
00456 #define MAIL_EDIT       17      /* Edit @mail messages in progress */
00457 #define MAIL_URGENT     18      /* Sends a @mail message as URGENT */
00458 #define MAIL_ALIAS      19      /* Creates an @mail alias */
00459 #define MAIL_ALIST      20      /* Lists @mail aliases */
00460 #define MAIL_PROOF      21      /* Proofs @mail messages in progress */
00461 #define MAIL_ABORT      22      /* Aborts @mail messages in progress */
00462 #define MAIL_QUICK      23      /* Sends a quick @mail message */
00463 #define MAIL_REVIEW     24      /* Reviews @mail sent to a player */
00464 #define MAIL_RETRACT    25      /* Retracts @mail sent to a player */
00465 #define MAIL_CC         26      /* Carbon copy */
00466 #define MAIL_SAFE       27      /* Defines a piece of mail as safe. */
00467 
00468 #define MALIAS_DESC     1       /* Describes a mail alias */
00469 #define MALIAS_CHOWN    2       /* Changes a mail alias's owner */
00470 #define MALIAS_ADD      3       /* Adds a player to an alias */
00471 #define MALIAS_REMOVE   4       /* Removes a player from an alias */
00472 #define MALIAS_DELETE   5       /* Deletes a mail alias */
00473 #define MALIAS_RENAME   6       /* Renames a mail alias */
00474 #define MALIAS_LIST     8       /* Lists mail aliases */
00475 #define MALIAS_STATUS   9       /* Status of mail aliases */
00476 #define MOTD_ALL        0       /* login message for all */
00477 #define MOTD_WIZ        1       /* login message for wizards */
00478 #define MOTD_DOWN       2       /* login message when logins disabled */
00479 #define MOTD_FULL       4       /* login message when too many players on */
00480 #define MOTD_LIST       8       /* Display current login messages */
00481 #define MOTD_BRIEF      16      /* Suppress motd file display for wizards */
00482 #define MOVE_QUIET      1       /* Dont do osucc/ofail/asucc/afail if ctrl */
00483 #define NFY_NFY         0       /* Notify first waiting command */
00484 #define NFY_NFYALL      1       /* Notify all waiting commands */
00485 #define NFY_DRAIN       2       /* Delete waiting commands */
00486 #define OPEN_LOCATION   0       /* Open exit in my location */
00487 #define OPEN_INVENTORY  1       /* Open exit in me */
00488 #define PASS_ANY        1       /* name=newpass */
00489 #define PASS_MINE       2       /* oldpass=newpass */
00490 #define PCRE_PLAYER     1       /* create new player */
00491 #define PCRE_ROBOT      2       /* create robot player */
00492 #define PEMIT_PEMIT     1       /* emit to named player */
00493 #define PEMIT_OEMIT     2       /* emit to all in current room except named */
00494 #define PEMIT_WHISPER   3       /* whisper to player in current room */
00495 #define PEMIT_FSAY      4       /* force controlled obj to say */
00496 #define PEMIT_FEMIT     5       /* force controlled obj to emit */
00497 #define PEMIT_FPOSE     6       /* force controlled obj to pose */
00498 #define PEMIT_FPOSE_NS  7       /* force controlled obj to pose w/o space */
00499 #define PEMIT_CONTENTS  8       /* Send to contents (additive) */
00500 #define PEMIT_HERE      16      /* Send to location (@femit, additive) */
00501 #define PEMIT_ROOM      32      /* Send to containing rm (@femit, additive) */
00502 #define PEMIT_LIST      64      /* Send to a list */
00503 #define PS_BRIEF        0       /* Short PS report */
00504 #define PS_LONG         1       /* Long PS report */
00505 #define PS_SUMM         2       /* Queue counts only */
00506 #define PS_ALL          4       /* List entire queue */
00507 #define QUEUE_KICK      1       /* Process commands from queue */
00508 #define QUEUE_WARP      2       /* Advance or set back wait queue clock */
00509 #define QUOTA_SET       1       /* Set a quota */
00510 #define QUOTA_FIX       2       /* Repair a quota */
00511 #define QUOTA_TOT       4       /* Operate on total quota */
00512 #define QUOTA_REM       8       /* Operate on remaining quota */
00513 #define QUOTA_ALL       16      /* Operate on all players */
00514 #define SAY_SAY         1       /* say in current room */
00515 #define SAY_NOSPACE     1       /* OR with xx_EMIT to get nospace form */
00516 #define SAY_POSE        2       /* pose in current room */
00517 #define SAY_POSE_NOSPC  3       /* pose w/o space in current room */
00518 #define SAY_PREFIX      4       /* first char indicates foratting */
00519 #define SAY_EMIT        5       /* emit in current room */
00520 #define SAY_SHOUT       8       /* shout to all logged-in players */
00521 #define SAY_WALLPOSE    9       /* Pose to all logged-in players */
00522 #define SAY_WALLEMIT    10      /* Emit to all logged-in players */
00523 #define SAY_WIZSHOUT    12      /* shout to all logged-in wizards */
00524 #define SAY_WIZPOSE     13      /* Pose to all logged-in wizards */
00525 #define SAY_WIZEMIT     14      /* Emit to all logged-in wizards */
00526 #define SAY_ADMINSHOUT  15      /* Emit to all wizards or royalty */
00527 #define SAY_GRIPE       16      /* Complain to management */
00528 #define SAY_NOTE        17      /* Comment to log for wizards */
00529 #define SAY_NOTAG       32      /* Don't put Broadcast: in front (additive) */
00530 #define SAY_HERE        64      /* Output to current location */
00531 #define SAY_ROOM        128     /* Output to containing room */
00532 #define SET_QUIET       1       /* Don't display 'Set.' message. */
00533 #define SHUTDN_NORMAL   0       /* Normal shutdown */
00534 #define SHUTDN_PANIC    1       /* Write a panic dump file */
00535 #define SHUTDN_EXIT     2       /* Exit from shutdown code */
00536 #define SHUTDN_COREDUMP 4       /* Produce a coredump */
00537 #define SRCH_SEARCH     1       /* Do a normal search */
00538 #define SRCH_MARK       2       /* Set mark bit for matches */
00539 #define SRCH_UNMARK     3       /* Clear mark bit for matches */
00540 #define STAT_PLAYER     0       /* Display stats for one player or tot objs */
00541 #define STAT_ALL        1       /* Display global stats */
00542 #define STAT_ME         2       /* Display stats for me */
00543 #define SWITCH_DEFAULT  0       /* Use the configured default for switch */
00544 #define SWITCH_ANY      1       /* Execute all cases that match */
00545 #define SWITCH_ONE      2       /* Execute only first case that matches */
00546 #define SWEEP_ME        1       /* Check my inventory */
00547 #define SWEEP_HERE      2       /* Check my location */
00548 #define SWEEP_COMMANDS  4       /* Check for $-commands */
00549 #define SWEEP_LISTEN    8       /* Check for @listen-ers */
00550 #define SWEEP_PLAYER    16      /* Check for players and puppets */
00551 #define SWEEP_CONNECT   32      /* Search for connected players/puppets */
00552 #define SWEEP_EXITS     64      /* Search the exits for audible flags */
00553 #define SWEEP_SCAN      128     /* Scan for pattern matching */
00554 #define SWEEP_VERBOSE   256     /* Display what pattern matches */
00555 #define TELEPORT_DEFAULT 1      /* Emit all messages */
00556 #define TELEPORT_QUIET   2      /* Teleport in quietly */
00557 #define TOAD_NO_CHOWN   1       /* Don't change ownership */
00558 #define TRIG_QUIET      1       /* Don't display 'Triggered.' message. */
00559 #define TWARP_QUEUE     1       /* Warp the wait and sem queues */
00560 #define TWARP_DUMP      2       /* Warp the dump interval */
00561 #define TWARP_CLEAN     4       /* Warp the cleaning interval */
00562 #define TWARP_IDLE      8       /* Warp the idle check interval */
00563 
00564 /* emprty               16 */
00565 #define TWARP_EVENTS    32      /* Warp the events checking interval */
00566 
00567 /* Hush codes for movement messages */
00568 
00569 #define HUSH_ENTER      1       /* xENTER/xEFAIL */
00570 #define HUSH_LEAVE      2       /* xLEAVE/xLFAIL */
00571 #define HUSH_EXIT       4       /* xSUCC/xDROP/xFAIL from exits */
00572 
00573 /* Evaluation directives */
00574 
00575 #define EV_FMASK        0x00000300      /* Mask for function type check */
00576 #define EV_FIGNORE      0x00000000      /* Don't look for func if () found */
00577 #define EV_FMAND        0x00000100      /* Text before () must be func name */
00578 #define EV_FCHECK       0x00000200      /* Check text before () for function */
00579 #define EV_STRIP        0x00000400      /* Strip one level of brackets */
00580 #define EV_EVAL         0x00000800      /* Evaluate results before returning */
00581 #define EV_STRIP_TS     0x00001000      /* Strip trailing spaces */
00582 #define EV_STRIP_LS     0x00002000      /* Strip leading spaces */
00583 #define EV_STRIP_ESC    0x00004000      /* Strip one level of \ characters */
00584 #define EV_STRIP_AROUND 0x00008000      /* Strip {} only at ends of string */
00585 #define EV_TOP          0x00010000      /* This is a toplevel call to eval() */
00586 #define EV_NOTRACE      0x00020000      /* Don't trace this call to eval */
00587 #define EV_NO_COMPRESS  0x00040000      /* Don't compress spaces. */
00588 #define EV_NO_LOCATION  0x00080000      /* Supresses %l */
00589 #define EV_NOFCHECK     0x00100000      /* Do not evaluate functions! */
00590 
00591 /* Termination directives */
00592 
00593 #define PT_NOTHING      0x00000000
00594 #define PT_BRACE        0x00000001
00595 #define PT_BRACKET      0x00000002
00596 #define PT_PAREN        0x00000004
00597 #define PT_COMMA        0x00000008
00598 #define PT_SEMI         0x00000010
00599 #define PT_EQUALS       0x00000020
00600 #define PT_SPACE        0x00000040
00601 
00602 /* Message forwarding directives */
00603 
00604 #define MSG_PUP_ALWAYS  1       /* Always forward msg to puppet own */
00605 #define MSG_INV         2       /* Forward msg to contents */
00606 #define MSG_INV_L       4       /* ... only if msg passes my @listen */
00607 #define MSG_INV_EXITS   8       /* Forward through my audible exits */
00608 #define MSG_NBR         16      /* Forward msg to neighbors */
00609 #define MSG_NBR_A       32      /* ... only if I am audible */
00610 #define MSG_NBR_EXITS   64      /* Also forward to neighbor exits */
00611 #define MSG_NBR_EXITS_A 128     /* ... only if I am audible */
00612 #define MSG_LOC         256     /* Send to my location */
00613 #define MSG_LOC_A       512     /* ... only if I am audible */
00614 #define MSG_FWDLIST     1024    /* Forward to my fwdlist members if aud */
00615 #define MSG_ME          2048    /* Send to me */
00616 #define MSG_S_INSIDE    4096    /* Originator is inside target */
00617 #define MSG_S_OUTSIDE   8192    /* Originator is outside target */
00618 #define MSG_COLORIZE    16384   /* Message needs to be given color */
00619 /* #define FREE         32768   */
00620 #define MSG_NO_SLAVE    65536   /* Don't send to slaves */
00621 #define MSG_ME_ALL      (MSG_ME|MSG_INV_EXITS|MSG_FWDLIST)
00622 #define MSG_F_CONTENTS  (MSG_INV)
00623 #define MSG_F_UP        (MSG_NBR_A|MSG_LOC_A)
00624 #define MSG_F_DOWN      (MSG_INV_L)
00625 
00626 /* Look primitive directives */
00627 
00628 #define LK_IDESC        0x0001
00629 #define LK_OBEYTERSE    0x0002
00630 #define LK_SHOWATTR     0x0004
00631 #define LK_SHOWEXIT     0x0008
00632 
00633 /* Exit visibility precalculation codes */
00634 
00635 #define VE_LOC_XAM      0x01    /* Location is examinable */
00636 #define VE_LOC_DARK     0x02    /* Location is dark */
00637 #define VE_LOC_LIGHT    0x04    /* Location is light */
00638 #define VE_BASE_XAM     0x08    /* Base location (pre-parent) is examinable */
00639 #define VE_BASE_DARK    0x10    /* Base location (pre-parent) is dark */
00640 #define VE_BASE_LIGHT   0x20    /* Base location (pre-parent) is light */
00641 
00642 /* Signal handling directives */
00643 
00644 #define SA_EXIT         1       /* Exit, and dump core */
00645 #define SA_DFLT         2       /* Try to restart on a fatal error */
00646 
00647 #define STARTLOG(key,p,s) \
00648         if ((((key) & mudconf.log_options) != 0) && start_log(p, s))
00649 #define ENDLOG \
00650         end_log()
00651 #define LOG_SIMPLE(key,p,s,m) \
00652         STARTLOG(key,p,s) { \
00653                 log_text(m); \
00654         ENDLOG; }
00655 
00656 #define test_top()              ((mudstate.qfirst != NULL) ? 1 : 0)
00657 #define controls(p,x)           Controls(p,x)
00658 
00659 #endif                          /* __EXTERNS_H */

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