mux/src/externs.h

Go to the documentation of this file.
00001 // externs.h -- Prototypes for externs not defined elsewhere.
00002 //
00003 // $Id: externs.h,v 1.66 2007/02/03 04:25:46 sdennis Exp $
00004 //
00005 
00006 #ifndef EXTERNS_H
00007 #define EXTERNS_H
00008 
00009 #include "db.h"
00010 #include "match.h"
00011 #include "mudconf.h"
00012 #include "svdrand.h"
00013 
00014 // From bsd.cpp.
00015 //
00016 void boot_slave(dbref executor, dbref caller, dbref enactor, int key);
00017 void close_sockets(bool emergency, char *message);
00018 void CleanUpSlaveSocket(void);
00019 void CleanUpSlaveProcess(void);
00020 #ifdef QUERY_SLAVE
00021 void CleanUpSQLSlaveSocket(void);
00022 void CleanUpSQLSlaveProcess(void);
00023 #endif // QUERY_SLAVE
00024 #ifdef WIN32
00025 extern HANDLE CompletionPort;    // IOs are queued up on this port
00026 extern CRITICAL_SECTION csDescriptorList;
00027 #endif // WIN32
00028 
00029 #ifdef QUERY_SLAVE
00030 void boot_sqlslave(dbref executor, dbref caller, dbref enactor, int key);
00031 #endif // QUERY_SLAVE
00032 
00033 extern NAMETAB sigactions_nametab[];
00034 
00035 // From conf.cpp
00036 //
00037 void cf_log_notfound(dbref, char *, const char *, char *);
00038 int  cf_modify_bits(int *, char *, void *, UINT32, dbref, char *);
00039 void DCL_CDECL cf_log_syntax(dbref player, char *cmd, const char *fmt, ...);
00040 void ValidateConfigurationDbrefs(void);
00041 int  cf_read(void);
00042 void cf_init(void);
00043 void cf_list(dbref, char *, char **);
00044 void cf_display(dbref, char *, char *, char **);
00045 void list_cf_access(dbref);
00046 int cf_set(char *, char *, dbref);
00047 CF_HAND(cf_cf_access);
00048 CF_HAND(cf_access);
00049 CF_HAND(cf_cmd_alias);
00050 CF_HAND(cf_acmd_access);
00051 CF_HAND(cf_attr_access);
00052 CF_HAND(cf_func_access);
00053 CF_HAND(cf_flag_access);
00054 CF_HAND(cf_flag_name);
00055 CF_HAND(cf_art_rule);
00056 
00057 // From local.cpp.
00058 //
00059 void local_startup(void);
00060 void local_presync_database(void);
00061 void local_presync_database_sigsegv(void);
00062 void local_dump_database(int);
00063 void local_dump_complete_signal(void);
00064 void local_shutdown(void);
00065 void local_dbck(void);
00066 void local_connect(dbref, int, int);
00067 void local_disconnect(dbref, int);
00068 void local_data_create(dbref);
00069 void local_data_clone(dbref, dbref);
00070 void local_data_free(dbref);
00071 
00072 // From mail.cpp.
00073 //
00074 void load_mail(FILE *);
00075 int  dump_mail(FILE *);
00076 struct mail *mail_fetch(dbref, int);
00077 
00078 // From netcommon.cpp.
00079 //
00080 void DCL_CDECL raw_broadcast(int, char *, ...);
00081 void list_siteinfo(dbref);
00082 void logged_out0(dbref executor, dbref caller, dbref enactor, int key);
00083 void logged_out1(dbref executor, dbref caller, dbref enactor, int key, char *arg);
00084 void init_logout_cmdtab(void);
00085 void desc_reload(dbref);
00086 void make_portlist(dbref, dbref, char *, char **);
00087 
00088 /* From cque.cpp */
00089 int  nfy_que(dbref, int, int, int);
00090 int  halt_que(dbref, dbref);
00091 void wait_que(dbref executor, dbref caller, dbref enactor, bool,
00092     CLinearTimeAbsolute&, dbref, int, char *, char *[],int, char *[]);
00093 
00094 #ifdef WIN32
00095 #include "crypt/crypt.h"
00096 #else // WIN32
00097 extern "C" char *crypt(const char *inptr, const char *inkey);
00098 #endif // WIN32
00099 extern bool break_called;
00100 
00101 /* From eval.cpp */
00102 void tcache_init(void);
00103 char *parse_to(char **, char, int);
00104 char *parse_arglist(dbref executor, dbref caller, dbref enactor, char *,
00105                     char, int, char *[], int, char*[], int, int *);
00106 int get_gender(dbref);
00107 void mux_exec(char *buff, char **bufc, dbref executor, dbref caller,
00108               dbref enactor, int eval, char **dstr, char *cargs[],
00109               int ncargs);
00110 void save_global_regs(const char *, char *[], int []);
00111 void save_and_clear_global_regs(const char *, char *[], int[]);
00112 void restore_global_regs(const char *, char *[], int []);
00113 char **PushPointers(int nNeeded);
00114 void PopPointers(char **p, int nNeeded);
00115 int *PushIntegers(int nNeeded);
00116 void PopIntegers(int *pi, int nNeeded);
00117 extern const signed char mux_RegisterSet[256];
00118 extern const char *ColorTable[256];
00119 
00120 /* From game.cpp */
00121 #define notify(p,m)                         notify_check(p,p,m, MSG_PUP_ALWAYS|MSG_ME_ALL|MSG_F_DOWN)
00122 #define notify_saypose(p,m)                 notify_check(p,p,m, MSG_PUP_ALWAYS|MSG_ME_ALL|MSG_F_DOWN|MSG_SAYPOSE)
00123 #define notify_html(p,m)                    notify_check(p,p,m, MSG_PUP_ALWAYS|MSG_ME_ALL|MSG_F_DOWN|MSG_HTML)
00124 #define notify_quiet(p,m)                   notify_check(p,p,m, MSG_PUP_ALWAYS|MSG_ME)
00125 #define notify_with_cause(p,c,m)            notify_check(p,c,m, MSG_PUP_ALWAYS|MSG_ME_ALL|MSG_F_DOWN)
00126 #define notify_with_cause_ooc(p,c,m)        notify_check(p,c,m, MSG_PUP_ALWAYS|MSG_ME_ALL|MSG_F_DOWN|MSG_OOC)
00127 #define notify_with_cause_html(p,c,m)       notify_check(p,c,m, MSG_PUP_ALWAYS|MSG_ME_ALL|MSG_F_DOWN|MSG_HTML)
00128 #define notify_quiet_with_cause(p,c,m)      notify_check(p,c,m, MSG_PUP_ALWAYS|MSG_ME)
00129 //#define notify_puppet(p,c,m)                notify_check(p,c,m, MSG_ME_ALL|MSG_F_DOWN)
00130 //#define notify_quiet_puppet(p,c,m)          notify_check(p,c,m, MSG_ME)
00131 #define notify_all(p,c,m)                   notify_check(p,c,m, MSG_ME_ALL|MSG_NBR_EXITS|MSG_F_UP|MSG_F_CONTENTS)
00132 #define notify_all_from_inside(p,c,m)       notify_check(p,c,m, MSG_ME_ALL|MSG_NBR_EXITS_A|MSG_F_UP|MSG_F_CONTENTS|MSG_S_INSIDE)
00133 #define notify_all_from_inside_saypose(p,c,m) notify_check(p,c,m, MSG_ME_ALL|MSG_NBR_EXITS_A|MSG_F_UP|MSG_F_CONTENTS|MSG_S_INSIDE|MSG_SAYPOSE)
00134 #define notify_all_from_inside_html(p,c,m)  notify_check(p,c,m, MSG_ME_ALL|MSG_NBR_EXITS_A|MSG_F_UP|MSG_F_CONTENTS|MSG_S_INSIDE|MSG_HTML)
00135 //#define notify_all_from_outside(p,c,m)      notify_check(p,c,m, MSG_ME_ALL|MSG_NBR_EXITS|MSG_F_UP|MSG_F_CONTENTS|MSG_S_OUTSIDE)
00136 
00137 void notify_except(dbref, dbref, dbref, const char *, int key);
00138 void notify_except2(dbref, dbref, dbref, dbref, const char *);
00139 
00140 void notify_check(dbref, dbref, const char *, int);
00141 
00142 bool Hearer(dbref);
00143 void report(void);
00144 
00145 bool atr_match
00146 (
00147     dbref thing,
00148     dbref player,
00149     char  type,
00150     char  *str,
00151     char  *raw_str,
00152     bool  check_parents
00153 );
00154 
00155 bool regexp_match
00156 (
00157     char *pattern,
00158     char *str,
00159     int case_opt,
00160     char *args[],
00161     int nargs
00162 );
00163 
00164 bool list_check
00165 (
00166     dbref thing,
00167     dbref player,
00168     char  type,
00169     char  *str,
00170     char  *raw_str,
00171     bool  check_parent
00172 );
00173 bool html_escape(const char *src, char *dest, char **destp);
00174 
00175 #define DUMP_I_NORMAL    0  // OUTPUT to the outdb through a temporary file.
00176 #define DUMP_I_PANIC     1  // UNLOAD to a crashdb
00177 #define DUMP_I_RESTART   2  // OUTPUT to the inputdb
00178 #define DUMP_I_FLAT      3  // UNLOAD to a .FLAT file
00179 #define DUMP_I_SIGNAL    4  // UNLOAD to a .FLAT file from signal.
00180 #define NUM_DUMP_TYPES   5
00181 void dump_database_internal(int);
00182 void fork_and_dump(int key);
00183 
00184 /* From help.cpp */
00185 void helpindex_clean(int);
00186 void helpindex_load(dbref);
00187 void helpindex_init(void);
00188 void help_helper(dbref executor, int iHelpfile, char *topic_arg, char *buff, char **bufc);
00189 
00190 /* From htab.cpp */
00191 int  cf_ntab_access(int *, char *, void *, UINT32, dbref, char *);
00192 
00193 /* From log.cpp */
00194 #ifdef WIN32
00195 #define ENDLINE "\r\n"
00196 #else // WIN32
00197 #define ENDLINE "\n"
00198 #endif // WIN32
00199 bool start_log(const char *primary, const char *secondary);
00200 void end_log(void);
00201 void log_perror(const char *, const char *,const char *,
00202             const char *);
00203 void log_text(const char *);
00204 void log_number(int);
00205 void DCL_CDECL log_printf(const char *fmt, ...);
00206 void log_name(dbref);
00207 void log_name_and_loc(dbref);
00208 void log_type_and_name(dbref);
00209 
00210 /* From look.cpp */
00211 void look_in(dbref,dbref, int);
00212 void show_vrml_url(dbref, dbref);
00213 size_t decode_attr_flags(int aflags, char *buff);
00214 
00215 /* From move.cpp */
00216 void move_object(dbref, dbref);
00217 void move_via_generic(dbref, dbref, dbref, int);
00218 bool move_via_teleport(dbref, dbref, dbref, int);
00219 void move_exit(dbref, dbref, bool, const char *, int);
00220 void do_enter_internal(dbref, dbref, bool);
00221 
00222 /* From object.cpp */
00223 dbref start_home(void);
00224 dbref default_home(void);
00225 bool  can_set_home(dbref, dbref, dbref);
00226 dbref new_home(dbref);
00227 dbref clone_home(dbref, dbref);
00228 void  divest_object(dbref);
00229 dbref create_obj(dbref, int, const char *, int);
00230 void  destroy_obj(dbref);
00231 void  empty_obj(dbref);
00232 
00233 /* From player.cpp */
00234 dbref create_player(char *name, char *pass, dbref executor, bool isrobot, const char **pmsg);
00235 void AddToPublicChannel(dbref player);
00236 bool add_player_name(dbref, const char *);
00237 bool delete_player_name(dbref, const char *);
00238 dbref lookup_player(dbref, char *, bool);
00239 void load_player_names(void);
00240 void badname_add(char *);
00241 void badname_remove(char *);
00242 bool badname_check(char *);
00243 void badname_list(dbref, const char *);
00244 void ChangePassword(dbref player, const char *szPassword);
00245 const char *mux_crypt(const char *szPassword, const char *szSalt, int *piType);
00246 int  QueueMax(dbref);
00247 int  a_Queue(dbref, int);
00248 void pcache_reload(dbref);
00249 void pcache_init(void);
00250 
00251 /* From predicates.cpp */
00252 char * DCL_CDECL tprintf(const char *, ...);
00253 void DCL_CDECL safe_tprintf_str(char *, char **, const char *, ...);
00254 dbref insert_first(dbref, dbref);
00255 dbref remove_first(dbref, dbref);
00256 dbref reverse_list(dbref);
00257 bool member(dbref, dbref);
00258 bool could_doit(dbref, dbref, int);
00259 bool can_see(dbref, dbref, bool);
00260 void add_quota(dbref, int);
00261 bool canpayfees(dbref, dbref, int, int);
00262 void giveto(dbref,int);
00263 bool payfor(dbref,int);
00264 char *MakeCanonicalObjectName(const char *pName, int *pnName, bool *pbValid);
00265 char *MakeCanonicalExitName(const char *pName, int *pnName, bool *pbValid);
00266 bool ValidatePlayerName(const char *pName);
00267 bool ok_password(const char *szPassword, const char **pmsg);
00268 void handle_ears(dbref, bool, bool);
00269 dbref match_possessed(dbref, dbref, char *, dbref, bool);
00270 void parse_range(char **, dbref *, dbref *);
00271 bool parse_thing_slash(dbref, char *, char **, dbref *);
00272 bool get_obj_and_lock(dbref, char *, dbref *, ATTR **, char *, char **);
00273 dbref where_is(dbref);
00274 dbref where_room(dbref);
00275 bool locatable(dbref, dbref, dbref);
00276 bool nearby(dbref, dbref);
00277 bool exit_visible(dbref, dbref, int);
00278 bool exit_displayable(dbref, dbref, int);
00279 void did_it(dbref, dbref, int, const char *, int, const char *, int, char *[], int);
00280 bool bCanReadAttr(dbref executor, dbref target, ATTR *tattr, bool bParentCheck);
00281 bool bCanSetAttr(dbref executor, dbref target, ATTR *tattr);
00282 bool bCanLockAttr(dbref executor, dbref target, ATTR *tattr);
00283 
00284 /* From set.cpp */
00285 bool parse_attrib(dbref, char *, dbref *, ATTR **);
00286 bool parse_attrib_wild(dbref, char *, dbref *, bool, bool, bool);
00287 void edit_string(char *, char **, char *, char *);
00288 dbref match_controlled_handler(dbref player, const char *name, bool bQuiet);
00289 #define match_controlled(player,name)       match_controlled_handler(player, name, false)
00290 #define match_controlled_quiet(player,name) match_controlled_handler(player, name, true)
00291 void set_modified(dbref thing);
00292 
00293 /* From boolexp.cpp */
00294 bool eval_boolexp(dbref, dbref, dbref, BOOLEXP *);
00295 BOOLEXP *parse_boolexp(dbref, const char *, bool);
00296 bool eval_boolexp_atr(dbref, dbref, dbref, char *);
00297 
00298 /* From functions.cpp */
00299 bool xlate(char *);
00300 
00301 #define IEEE_MAKE_NAN  1
00302 #define IEEE_MAKE_IND  2
00303 #define IEEE_MAKE_PINF 3
00304 #define IEEE_MAKE_NINF 4
00305 
00306 double MakeSpecialFloat(int iWhich);
00307 
00308 /* From unparse.cpp */
00309 char *unparse_boolexp(dbref, BOOLEXP *);
00310 char *unparse_boolexp_quiet(dbref, BOOLEXP *);
00311 char *unparse_boolexp_decompile(dbref, BOOLEXP *);
00312 char *unparse_boolexp_function(dbref, BOOLEXP *);
00313 
00314 /* From walkdb.cpp */
00315 int chown_all(dbref from_player, dbref to_player, dbref acting_player, int key);
00316 void olist_push(void);
00317 void olist_pop(void);
00318 void olist_add(dbref);
00319 dbref olist_first(void);
00320 dbref olist_next(void);
00321 
00322 /* From wild.cpp */
00323 bool wild(char *, char *, char *[], int);
00324 bool wild_match(char *, const char *);
00325 bool quick_wild(const char *, const char *);
00326 
00327 /* From command.cpp */
00328 bool check_access(dbref player, int mask);
00329 void set_prefix_cmds(void);
00330 char *process_command(dbref executor, dbref caller, dbref enactor, bool,
00331     char *, char *[], int);
00332 
00333 #define Protect(f) (cmdp->perms & f)
00334 
00335 #define Invalid_Objtype(x) \
00336 ((Protect(CA_LOCATION) && !Has_location(x)) || \
00337  (Protect(CA_CONTENTS) && !Has_contents(x)) || \
00338  (Protect(CA_PLAYER) && !isPlayer(x)))
00339 
00340 /* from db.cpp */
00341 bool Commer(dbref);
00342 void s_Pass(dbref, const char *);
00343 void s_Name(dbref, const char *);
00344 void s_Moniker(dbref thing, const char *s);
00345 const char *Name(dbref thing);
00346 const char *PureName(dbref thing);
00347 const char *Moniker(dbref thing);
00348 int  fwdlist_load(FWDLIST *, dbref, char *);
00349 void fwdlist_set(dbref, FWDLIST *);
00350 void fwdlist_clr(dbref);
00351 int  fwdlist_rewrite(FWDLIST *, char *);
00352 FWDLIST *fwdlist_get(dbref);
00353 void atr_push(void);
00354 void atr_pop(void);
00355 int  atr_head(dbref, char **);
00356 int  atr_next(char **);
00357 int  init_dbfile(char *game_dir_file, char *game_pag_file, int nCachePages);
00358 void atr_cpy(dbref dest, dbref source, bool bInternal);
00359 void atr_chown(dbref);
00360 void atr_clr(dbref, int);
00361 void atr_add_raw_LEN(dbref, int, const char *, int);
00362 void atr_add_raw(dbref, int, const char *);
00363 void atr_add(dbref, int, char *, dbref, int);
00364 void atr_set_flags(dbref, int, int);
00365 const char *atr_get_raw_LEN(dbref, int, size_t *);
00366 const char *atr_get_raw(dbref, int);
00367 char *atr_get_LEN(dbref, int, dbref *, int *, size_t *);
00368 char *atr_get_real(dbref, int, dbref *, int *, const char *, const int);
00369 #define atr_get(t,a,o,f) atr_get_real(t,a,o,f, __FILE__, __LINE__)
00370 char *atr_pget_LEN(dbref, int, dbref *, int *, size_t *);
00371 char *atr_pget_real(dbref, int, dbref *, int *, const char *, const int);
00372 #define atr_pget(t,a,o,f) atr_pget_real(t,a,o,f, __FILE__, __LINE__)
00373 char *atr_get_str_LEN(char *s, dbref, int, dbref *, int *, size_t *);
00374 char *atr_get_str(char *, dbref, int, dbref *, int *);
00375 char *atr_pget_str_LEN(char *, dbref, int, dbref *, int *, size_t *);
00376 char *atr_pget_str(char *, dbref, int, dbref *, int *);
00377 bool atr_get_info(dbref, int, dbref *, int *);
00378 bool atr_pget_info(dbref, int, dbref *, int *);
00379 void atr_free(dbref);
00380 bool check_zone_handler(dbref player, dbref thing, bool bPlayerCheck);
00381 #define check_zone(player, thing) check_zone_handler(player, thing, false)
00382 void ReleaseAllResources(dbref obj);
00383 bool fwdlist_ck(dbref player, dbref thing, int anum, char *atext);
00384 
00385 extern int anum_alc_top;
00386 
00387 /* Command handler keys */
00388 
00389 #define ATTRIB_ACCESS   1   /* Change access to attribute */
00390 #define ATTRIB_RENAME   2   /* Rename attribute */
00391 #define ATTRIB_DELETE   4   /* Delete attribute */
00392 #define ATTRIB_INFO     8   /* Info (number, flags) about attribute */
00393 #define BOOT_QUIET      1   /* Inhibit boot message to victim */
00394 #define BOOT_PORT       2   /* Boot by port number */
00395 #define CEMIT_NOHEADER  1   /* Channel emit without header */
00396 #define CHOWN_ONE       1   /* item = new_owner */
00397 #define CHOWN_ALL       2   /* old_owner = new_owner */
00398 //#define CHOWN_NOSTRIP   4   /* Don't strip (most) flags from object */
00399 #define CHOWN_NOZONE    8   /* Strip zones from objects */
00400 #define CLIST_FULL      1   /* Full listing of channels */
00401 #define CLIST_HEADERS   2   /* Lists channel headers, like "[Public]" */
00402 #define CLONE_LOCATION  0   /* Create cloned object in my location */
00403 #define CLONE_INHERIT   1   /* Keep INHERIT bit if set */
00404 #define CLONE_PRESERVE  2   /* Preserve the owner of the object */
00405 #define CLONE_INVENTORY 4   /* Create cloned object in my inventory */
00406 #define CLONE_SET_COST  8   /* ARG2 is cost of cloned object */
00407 #define CLONE_SET_LOC   16  /* ARG2 is location of cloned object */
00408 #define CLONE_SET_NAME  32  /* ARG2 is alternate name of cloned object */
00409 #define CLONE_FROM_PARENT 64 /* Set parent on obj instd of cloning attrs */
00410 #define CBOOT_QUIET     1   // Cboot without a message
00411 #define COMTITLE_ON     1   // Turn Comtitles on.
00412 #define COMTITLE_OFF    2   // Turn Comtitles off.
00413 #define CRE_INVENTORY   0   /* Create object in my inventory */
00414 #define CRE_LOCATION    1   /* Create object in my location */
00415 #define CRE_SET_LOC     2   /* ARG2 is location of new object */
00416 #define CSET_PUBLIC     0   /* Sets a channel public */
00417 #define CSET_PRIVATE    1   /* Sets a channel private (default) */
00418 #define CSET_LOUD       2   /* Channel shows connects and disconnects */
00419 #define CSET_QUIET      3   /* Channel doesn't show connects/disconnects */
00420 #define CSET_LIST       4   /* Lists channels */
00421 #define CSET_OBJECT     5   /* Sets the channel object for the channel */
00422 #define CSET_SPOOF      6   /* Sets the channel spoofable */
00423 #define CSET_NOSPOOF    7   /* Sets the channel non-spoofable */
00424 #define CSET_HEADER     8   /* Sets the channel header, like "[Public]" */
00425 #define CSET_LOG        9   // Set maximum number of messages to log.
00426 #define DBCK_DEFAULT    1   /* Get default tests too */
00427 #define DBCK_FULL       2   /* Do all tests */
00428 #define DECOMP_DBREF    1   /* decompile by dbref */
00429 //#define DECOMP_PRETTY   2   /* pretty-format output */
00430 #define DEST_ONE        1   /* object */
00431 #define DEST_OVERRIDE   4   /* override Safe() */
00432 #define DEST_INSTANT    8   /* instantly destroy */
00433 #define DIG_TELEPORT    1   /* teleport to room after @digging */
00434 #define DOLIST_SPACE    0   /* expect spaces as delimiter */
00435 #define DOLIST_DELIMIT  1   /* expect custom delimiter */
00436 #define DOLIST_NOTIFY   2   /* Send an @notify after the @dolist is completed */
00437 #define DOING_MESSAGE   0   /* Set my DOING message */
00438 #define DOING_HEADER    1   /* Set the DOING header */
00439 #define DOING_POLL      2   /* List DOING header */
00440 #define DOING_UNIQUE    3   // Set DOING message for current port only
00441 #define DOING_MASK     15   // Lower four bits form non-SW_MULTIPLE part.
00442 #define DOING_QUIET    16   // Set DOING messages without 'Set.' message.
00443 #define DROP_QUIET      1   /* Don't do odrop/adrop if control */
00444 #define DUMP_STRUCT     1   /* Dump flat structure file */
00445 #define DUMP_TEXT       2   /* Dump to external attribute database. */
00446 #define DUMP_FLATFILE   4   /* Dump .FLAT file */
00447 #define EXAM_DEFAULT    0   /* Default */
00448 #define EXAM_BRIEF      1   /* Nonowner sees just owner */
00449 #define EXAM_LONG       2   /* Nonowner sees public attrs too */
00450 #define EXAM_DEBUG      4   /* Display more info for finding db problems */
00451 #define EXAM_PARENT     8   /* Get attr from parent when exam obj/attr */
00452 //#define EXAM_PRETTY     16  /* Pretty-format output */
00453 //#define EXAM_PAIRS      32  /* Print paren matches in color */
00454 #define FIXDB_OWNER     1   /* Fix OWNER field */
00455 #define FIXDB_LOC       2   /* Fix LOCATION field */
00456 #define FIXDB_CON       4   /* Fix CONTENTS field */
00457 #define FIXDB_EXITS     8   /* Fix EXITS field */
00458 #define FIXDB_NEXT      16  /* Fix NEXT field */
00459 #define FIXDB_PENNIES   32  /* Fix PENNIES field */
00460 #define FIXDB_ZONE      64  /* Fix ZONE field */
00461 #define FIXDB_LINK      128 /* Fix LINK field */
00462 #define FIXDB_PARENT    256 /* Fix PARENT field */
00463 #define FIXDB_NAME      2048 /* Set NAME attribute */
00464 #define FLAG_REMOVE     1   // Remove a flag alias
00465 #define GET_QUIET       1   /* Don't do osucc/asucc if control */
00466 #define GIVE_QUIET      64  /* Inhibit give messages */
00467 #define GLOB_ENABLE     1   /* key to enable */
00468 #define GLOB_DISABLE    2   /* key to disable */
00469 //#define GLOB_LIST       3   /* key to list */
00470 #define HALT_ALL        1   /* halt everything */
00471 
00472 #define HOOK_BEFORE     1   /* BEFORE hook */
00473 #define HOOK_AFTER      2   /* AFTER hook */
00474 #define HOOK_PERMIT     4   /* PERMIT hook */
00475 #define HOOK_IGNORE     8   /* IGNORE hook */
00476 #define HOOK_IGSWITCH   16  /* BFAIL hook */
00477 #define HOOK_AFAIL      32  /* AFAIL hook */
00478 #define HOOK_CLEAR      64  /* CLEAR hook */
00479 #define HOOK_LIST       128 /* LIST hooks */
00480 #define ICMD_DISABLE    0
00481 #define ICMD_IGNORE     1
00482 #define ICMD_ON         2
00483 #define ICMD_OFF        4
00484 #define ICMD_CLEAR      8
00485 #define ICMD_CHECK      16
00486 #define ICMD_DROOM      32
00487 #define ICMD_IROOM      64
00488 #define ICMD_CROOM      128
00489 #define ICMD_LROOM      256
00490 #define ICMD_LALLROOM   512
00491 #define KILL_KILL       1   /* gives victim insurance */
00492 #define KILL_SLAY       2   /* no insurance */
00493 #define LOOK_LOOK       1   /* list desc (and succ/fail if room) */
00494 #define LOOK_OUTSIDE    8   /* look for object in container of player */
00495 #define MAIL_STATS      1   /* Mail stats */
00496 #define MAIL_DSTATS     2   /* More mail stats */
00497 #define MAIL_FSTATS     3   /* Even more mail stats */
00498 #define MAIL_DEBUG      4   /* Various debugging options */
00499 #define MAIL_NUKE       5   /* Nuke the post office */
00500 #define MAIL_FOLDER     6   /* Do folder stuff */
00501 #define MAIL_LIST       7   /* List @mail by time */
00502 #define MAIL_READ       8   /* Read @mail message */
00503 #define MAIL_CLEAR      9   /* Clear @mail message */
00504 #define MAIL_UNCLEAR    10  /* Unclear @mail message */
00505 #define MAIL_PURGE      11  /* Purge cleared @mail messages */
00506 #define MAIL_FILE       12  /* File @mail in folders */
00507 #define MAIL_TAG        13  /* Tag @mail messages */
00508 #define MAIL_UNTAG      14  /* Untag @mail messages */
00509 #define MAIL_FORWARD    15  /* Forward @mail messages */
00510 #define MAIL_SEND       16  /* Send @mail messages in progress */
00511 #define MAIL_EDIT       17  /* Edit @mail messages in progress */
00512 #define MAIL_URGENT     18  /* Sends a @mail message as URGENT */
00513 #define MAIL_ALIAS      19  /* Creates an @mail alias */
00514 #define MAIL_ALIST      20  /* Lists @mail aliases */
00515 #define MAIL_PROOF      21  /* Proofs @mail messages in progress */
00516 #define MAIL_ABORT      22  /* Aborts @mail messages in progress */
00517 #define MAIL_QUICK      23  /* Sends a quick @mail message */
00518 #define MAIL_REVIEW     24  /* Reviews @mail sent to a player */
00519 #define MAIL_RETRACT    25  /* Retracts @mail sent to a player */
00520 #define MAIL_CC         26  /* Carbon copy */
00521 #define MAIL_SAFE       27  /* Defines a piece of mail as safe. */
00522 #define MAIL_REPLY      28  /* Replies to a message. */
00523 #define MAIL_REPLYALL   29  /* Replies to all recipients of msg */
00524 #define MAIL_BCC        30  // Blind Carbon Copy. Don't show the recipient list to these.
00525 #define MAIL_QUOTE      0x100   /* Quote back original in the reply? */
00526 
00527 #define MALIAS_DESC     1   /* Describes a mail alias */
00528 #define MALIAS_CHOWN    2   /* Changes a mail alias's owner */
00529 #define MALIAS_ADD      3   /* Adds a player to an alias */
00530 #define MALIAS_REMOVE   4   /* Removes a player from an alias */
00531 #define MALIAS_DELETE   5   /* Deletes a mail alias */
00532 #define MALIAS_RENAME   6   /* Renames a mail alias */
00533 #define MALIAS_LIST     8   /* Lists mail aliases */
00534 #define MALIAS_STATUS   9   /* Status of mail aliases */
00535 #define MARK_SET        0   /* Set mark bits */
00536 #define MARK_CLEAR      1   /* Clear mark bits */
00537 #define MOTD_ALL        0   /* login message for all */
00538 #define MOTD_WIZ        1   /* login message for wizards */
00539 #define MOTD_DOWN       2   /* login message when logins disabled */
00540 #define MOTD_FULL       4   /* login message when too many players on */
00541 #define MOTD_LIST       8   /* Display current login messages */
00542 #define MOTD_BRIEF      16  /* Suppress motd file display for wizards */
00543 #define MOVE_QUIET      1   /* Dont do osucc/ofail/asucc/afail if ctrl */
00544 #define NFY_NFY         0   /* Notify first waiting command */
00545 #define NFY_NFYALL      1   /* Notify all waiting commands */
00546 #define NFY_DRAIN       2   /* Delete waiting commands */
00547 #define NFY_QUIET       3   /* Suppress "Notified." message */
00548 #define OPEN_LOCATION   0   /* Open exit in my location */
00549 #define OPEN_INVENTORY  1   /* Open exit in me */
00550 #define PCRE_PLAYER     1   /* create new player */
00551 #define PCRE_ROBOT      2   /* create robot player */
00552 #define PEMIT_PEMIT     1   /* emit to named player */
00553 #define PEMIT_OEMIT     2   /* emit to all in current room except named */
00554 #define PEMIT_WHISPER   3   /* whisper to player in current room */
00555 #define PEMIT_FSAY      4   /* force controlled obj to say */
00556 #define PEMIT_FEMIT     5   /* force controlled obj to emit */
00557 #define PEMIT_FPOSE     6   /* force controlled obj to pose */
00558 #define PEMIT_FPOSE_NS  7   /* force controlled obj to pose w/o space */
00559 #define PEMIT_CONTENTS  8   /* Send to contents (additive) */
00560 #define PEMIT_HERE      16  /* Send to location (@femit, additive) */
00561 #define PEMIT_ROOM      32  /* Send to containing rm (@femit, additive) */
00562 #define PEMIT_LIST      64  /* Send to a list */
00563 #define PEMIT_HTML      128 /* HTML escape, and no newline */
00564 #define PS_BRIEF        0   /* Short PS report */
00565 #define PS_LONG         1   /* Long PS report */
00566 #define PS_SUMM         2   /* Queue counts only */
00567 #define PS_ALL          4   /* List entire queue */
00568 #define QUERY_SQL       1   /* SQL query */
00569 #define QUEUE_KICK      1   /* Process commands from queue */
00570 #define QUEUE_WARP      2   /* Advance or set back wait queue clock */
00571 #define QUOTA_SET       1   /* Set a quota */
00572 #define QUOTA_FIX       2   /* Repair a quota */
00573 #define QUOTA_TOT       4   /* Operate on total quota */
00574 #define QUOTA_REM       8   /* Operate on remaining quota */
00575 #define QUOTA_ALL       16  /* Operate on all players */
00576 //#define QUOTA_ROOM      32  /* Room quota set */
00577 //#define QUOTA_EXIT      64  /* Exit quota set */
00578 //#define QUOTA_THING     128 /* Thing quota set */
00579 //#define QUOTA_PLAYER    256 /* Player quota set */
00580 #define SAY_SAY         1   /* say in current room */
00581 #define SAY_NOSPACE     1   /* OR with xx_EMIT to get nospace form */
00582 #define SAY_POSE        2   /* pose in current room */
00583 #define SAY_POSE_NOSPC  3   /* pose w/o space in current room */
00584 #define SAY_PREFIX      4   /* first char indicates formatting */
00585 #define SAY_EMIT        5   /* emit in current room */
00586 #define SAY_NOEVAL      8   // Don't eval message
00587 #define SHOUT_SHOUT     1   /* shout to all logged-in players */
00588 #define SHOUT_WALLPOSE  2   /* Pose to all logged-in players */
00589 #define SHOUT_WALLEMIT  3   /* Emit to all logged-in players */
00590 #define SHOUT_WIZSHOUT  4   /* shout to all logged-in wizards */
00591 #define SHOUT_WIZPOSE   5   /* Pose to all logged-in wizards */