Changeset 932
- Timestamp:
- 06/14/07 11:45:22 (1 year ago)
- Files:
-
- 1.8.2/branches/devel/CHANGES.182 (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/access.h (modified) (3 diffs)
- 1.8.2/branches/devel/hdrs/ansi.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/atr_tab.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/attrib.h (modified) (8 diffs)
- 1.8.2/branches/devel/hdrs/boolexp.h (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/bufferq.h (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/case.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/chunk.h (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/command.h (modified) (8 diffs)
- 1.8.2/branches/devel/hdrs/compile.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/conf.h (modified) (6 diffs)
- 1.8.2/branches/devel/hdrs/csrimalloc.h (modified) (3 diffs)
- 1.8.2/branches/devel/hdrs/dbdefs.h (modified) (9 diffs)
- 1.8.2/branches/devel/hdrs/dbio.h (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/extchat.h (modified) (7 diffs)
- 1.8.2/branches/devel/hdrs/externs.h (modified) (26 diffs)
- 1.8.2/branches/devel/hdrs/extmail.h (modified) (3 diffs)
- 1.8.2/branches/devel/hdrs/flags.h (modified) (8 diffs)
- 1.8.2/branches/devel/hdrs/function.h (modified) (8 diffs)
- 1.8.2/branches/devel/hdrs/game.h (modified) (11 diffs)
- 1.8.2/branches/devel/hdrs/getpgsiz.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/help.h (modified) (3 diffs)
- 1.8.2/branches/devel/hdrs/htab.h (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/ident.h (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/lock.h (modified) (4 diffs)
- 1.8.2/branches/devel/hdrs/log.h (modified) (3 diffs)
- 1.8.2/branches/devel/hdrs/malias.h (modified) (3 diffs)
- 1.8.2/branches/devel/hdrs/match.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/mushdb.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/mushtype.h (modified) (4 diffs)
- 1.8.2/branches/devel/hdrs/mymalloc.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/mysocket.h (modified) (6 diffs)
- 1.8.2/branches/devel/hdrs/myssl.h (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/oldflags.h (modified) (5 diffs)
- 1.8.2/branches/devel/hdrs/parse.h (modified) (3 diffs)
- 1.8.2/branches/devel/hdrs/pcre.h (modified) (6 diffs)
- 1.8.2/branches/devel/hdrs/privtab.h (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/ptab.h (modified) (2 diffs)
- 1.8.2/branches/devel/hdrs/pueblo.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/shs.h (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/strtree.h (modified) (2 diffs)
- 1.8.2/branches/devel/src/access.c (modified) (16 diffs)
- 1.8.2/branches/devel/src/atr_tab.c (modified) (6 diffs)
- 1.8.2/branches/devel/src/attrib.c (modified) (52 diffs)
- 1.8.2/branches/devel/src/boolexp.c (modified) (33 diffs)
- 1.8.2/branches/devel/src/bsd.c (modified) (136 diffs)
- 1.8.2/branches/devel/src/bufferq.c (modified) (2 diffs)
- 1.8.2/branches/devel/src/chunk.c (modified) (59 diffs)
- 1.8.2/branches/devel/src/cmdlocal.dst (modified) (1 diff)
- 1.8.2/branches/devel/src/cmds.c (modified) (22 diffs)
- 1.8.2/branches/devel/src/command.c (modified) (44 diffs)
- 1.8.2/branches/devel/src/comp_h.c (modified) (14 diffs)
- 1.8.2/branches/devel/src/comp_w.c (modified) (10 diffs)
- 1.8.2/branches/devel/src/comp_w8.c (modified) (10 diffs)
- 1.8.2/branches/devel/src/compress.c (modified) (2 diffs)
- 1.8.2/branches/devel/src/conf.c (modified) (44 diffs)
- 1.8.2/branches/devel/src/cque.c (modified) (42 diffs)
- 1.8.2/branches/devel/src/create.c (modified) (17 diffs)
- 1.8.2/branches/devel/src/csrimalloc.c (modified) (93 diffs)
- 1.8.2/branches/devel/src/db.c (modified) (43 diffs)
- 1.8.2/branches/devel/src/destroy.c (modified) (37 diffs)
- 1.8.2/branches/devel/src/extchat.c (modified) (81 diffs)
- 1.8.2/branches/devel/src/extmail.c (modified) (79 diffs)
- 1.8.2/branches/devel/src/filecopy.c (modified) (9 diffs)
- 1.8.2/branches/devel/src/flags.c (modified) (70 diffs)
- 1.8.2/branches/devel/src/funcrypt.c (modified) (2 diffs)
- 1.8.2/branches/devel/src/function.c (modified) (22 diffs)
- 1.8.2/branches/devel/src/fundb.c (modified) (50 diffs)
- 1.8.2/branches/devel/src/funlist.c (modified) (75 diffs)
- 1.8.2/branches/devel/src/funmath.c (modified) (26 diffs)
- 1.8.2/branches/devel/src/funmisc.c (modified) (20 diffs)
- 1.8.2/branches/devel/src/funstr.c (modified) (48 diffs)
- 1.8.2/branches/devel/src/funtime.c (modified) (16 diffs)
- 1.8.2/branches/devel/src/funufun.c (modified) (16 diffs)
- 1.8.2/branches/devel/src/game.c (modified) (84 diffs)
- 1.8.2/branches/devel/src/help.c (modified) (15 diffs)
- 1.8.2/branches/devel/src/htab.c (modified) (13 diffs)
- 1.8.2/branches/devel/src/ident.c (modified) (14 diffs)
- 1.8.2/branches/devel/src/info_slave.c (modified) (5 diffs)
- 1.8.2/branches/devel/src/local.dst (modified) (7 diffs)
- 1.8.2/branches/devel/src/lock.c (modified) (10 diffs)
- 1.8.2/branches/devel/src/log.c (modified) (7 diffs)
- 1.8.2/branches/devel/src/look.c (modified) (70 diffs)
- 1.8.2/branches/devel/src/malias.c (modified) (29 diffs)
- 1.8.2/branches/devel/src/match.c (modified) (19 diffs)
- 1.8.2/branches/devel/src/memcheck.c (modified) (3 diffs)
- 1.8.2/branches/devel/src/move.c (modified) (41 diffs)
- 1.8.2/branches/devel/src/myrlimit.c (modified) (3 diffs)
- 1.8.2/branches/devel/src/mysocket.c (modified) (64 diffs)
- 1.8.2/branches/devel/src/myssl.c (modified) (13 diffs)
- 1.8.2/branches/devel/src/notify.c (modified) (30 diffs)
- 1.8.2/branches/devel/src/parse.c (modified) (18 diffs)
- 1.8.2/branches/devel/src/pcre.c (modified) (230 diffs)
- 1.8.2/branches/devel/src/player.c (modified) (24 diffs)
- 1.8.2/branches/devel/src/plyrlist.c (modified) (3 diffs)
- 1.8.2/branches/devel/src/portmsg.c (modified) (1 diff)
- 1.8.2/branches/devel/src/predicat.c (modified) (39 diffs)
- 1.8.2/branches/devel/src/privtab.c (modified) (9 diffs)
- 1.8.2/branches/devel/src/ptab.c (modified) (6 diffs)
- 1.8.2/branches/devel/src/rob.c (modified) (15 diffs)
- 1.8.2/branches/devel/src/services.c (modified) (35 diffs)
- 1.8.2/branches/devel/src/set.c (modified) (33 diffs)
- 1.8.2/branches/devel/src/shs.c (modified) (7 diffs)
- 1.8.2/branches/devel/src/sig.c (modified) (3 diffs)
- 1.8.2/branches/devel/src/speech.c (modified) (33 diffs)
- 1.8.2/branches/devel/src/sql.c (modified) (4 diffs)
- 1.8.2/branches/devel/src/strtree.c (modified) (11 diffs)
- 1.8.2/branches/devel/src/strutil.c (modified) (39 diffs)
- 1.8.2/branches/devel/src/timer.c (modified) (11 diffs)
- 1.8.2/branches/devel/src/unparse.c (modified) (5 diffs)
- 1.8.2/branches/devel/src/utils.c (modified) (21 diffs)
- 1.8.2/branches/devel/src/version.c (modified) (1 diff)
- 1.8.2/branches/devel/src/warnings.c (modified) (13 diffs)
- 1.8.2/branches/devel/src/wild.c (modified) (21 diffs)
- 1.8.2/branches/devel/src/wiz.c (modified) (72 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.2/branches/devel/CHANGES.182
r924 r932 15 15 ========================================================================== 16 16 17 Version 1.8.2 patchevel 6 ??? ??, 2007 18 19 Fixes: 20 * Fixed assorted small memory leaks. [SW] 21 17 22 Version 1.8.2 patchlevel 5 June 13, 2007 18 23 … … 23 28 Fixes: 24 29 * Cleaned up some unsafe signal handler functions. [SW] 30 31 Help files: 32 * Mention examine lock in help lattr(). Talvo. 25 33 26 34 Version 1.8.2 patchlevel 4 May 16, 2007 1.8.2/branches/devel/hdrs/access.h
r924 r932 7 7 */ 8 8 struct access { 9 char host[BUFFER_LEN]; /**< The host pattern */10 char comment[BUFFER_LEN]; /**< A comment about the rule */11 dbref who; /**< Who created this rule if sitelock used */12 int can; /**< Bitflags of what the host can do */13 int cant; /**< Bitflags of what the host can't do */14 struct access *next; /**< Pointer to next rule in the list */9 char host[BUFFER_LEN]; /**< The host pattern */ 10 char comment[BUFFER_LEN]; /**< A comment about the rule */ 11 dbref who; /**< Who created this rule if sitelock used */ 12 int can; /**< Bitflags of what the host can do */ 13 int cant; /**< Bitflags of what the host can't do */ 14 struct access *next; /**< Pointer to next rule in the list */ 15 15 }; 16 16 17 17 18 18 /* These flags are can/can't - a site may or may not be allowed to do them */ 19 #define ACS_CONNECT 0x1 /* Connect to non-guests */20 #define ACS_CREATE 0x2 /* Create new players */21 #define ACS_GUEST 0x4 /* Connect to guests */22 #define ACS_REGISTER 0x8 /* Site can use the 'register' command */19 #define ACS_CONNECT 0x1 /* Connect to non-guests */ 20 #define ACS_CREATE 0x2 /* Create new players */ 21 #define ACS_GUEST 0x4 /* Connect to guests */ 22 #define ACS_REGISTER 0x8 /* Site can use the 'register' command */ 23 23 /* These flags are set in the 'can' bit, but they mark special processing */ 24 #define ACS_SITELOCK 0x10 /* Marker for where to insert @sitelock */25 #define ACS_SUSPECT 0x20 /* All players from this site get SUSPECT */26 #define ACS_DENY_SILENT 0x40 /* Don't log failed attempts */27 #define ACS_REGEXP 0x80 /* Treat the host pattern as a regexp */24 #define ACS_SITELOCK 0x10 /* Marker for where to insert @sitelock */ 25 #define ACS_SUSPECT 0x20 /* All players from this site get SUSPECT */ 26 #define ACS_DENY_SILENT 0x40 /* Don't log failed attempts */ 27 #define ACS_REGEXP 0x80 /* Treat the host pattern as a regexp */ 28 28 29 #define ACS_GOD 0x100 /* God can connect from this site */30 #define ACS_WIZARD 0x200 /* Wizards can connect from this site */31 #define ACS_ADMIN 0x400 /* Admins can connect from this site */29 #define ACS_GOD 0x100 /* God can connect from this site */ 30 #define ACS_WIZARD 0x200 /* Wizards can connect from this site */ 31 #define ACS_ADMIN 0x400 /* Admins can connect from this site */ 32 32 33 33 /* This is the usual default access */ … … 50 50 struct access *site_check_access(const char *hname, dbref who, int *rulenum); 51 51 int format_access(struct access *ap, int rulenum, 52 dbref who53 __attribute__ ((__unused__)), char *buff, char **bp);52 dbref who 53 __attribute__ ((__unused__)), char *buff, char **bp); 54 54 int add_access_sitelock(dbref player, const char *host, dbref who, int can, 55 int cant);55 int cant); 56 56 int remove_access_sitelock(const char *pattern); 57 57 void do_list_access(dbref player); … … 59 59 (const char *opts, dbref *who, int *can, int *cant, dbref player); 60 60 61 #endif /* __ACCESS_H */61 #endif /* __ACCESS_H */ 1.8.2/branches/devel/hdrs/ansi.h
r924 r932 67 67 #define ANSI_END "m" 68 68 69 #endif /* __ANSI_H */69 #endif /* __ANSI_H */ 1.8.2/branches/devel/hdrs/atr_tab.h
r924 r932 254 254 }; 255 255 256 #endif /* __ATR_TAB_H */256 #endif /* __ATR_TAB_H */ 1.8.2/branches/devel/hdrs/attrib.h
r924 r932 16 16 */ 17 17 struct attr { 18 char const *name; /**< Name of attribute */19 unsigned int flags; /**< Attribute flags */20 chunk_reference_t data; /**< The attribute's value, compressed */21 dbref creator; /**< The attribute's creator's dbref */22 ATTR *next; /**< Pointer to next attribute in list */18 char const *name; /**< Name of attribute */ 19 unsigned int flags; /**< Attribute flags */ 20 chunk_reference_t data; /**< The attribute's value, compressed */ 21 dbref creator; /**< The attribute's creator's dbref */ 22 ATTR *next; /**< Pointer to next attribute in list */ 23 23 }; 24 24 … … 42 42 AE_OKAY = 0, /**< Success */ 43 43 AE_ERROR = -1, /**< general failure */ 44 AE_SAFE = -2, /**< attempt to overwrite a safe attribute */44 AE_SAFE = -2, /**< attempt to overwrite a safe attribute */ 45 45 AE_BADNAME = -3, /**< invalid name */ 46 46 AE_TOOMANY = -4, /**< too many attribs */ 47 AE_TREE = -5, /**< unable to delete/create entire tree */47 AE_TREE = -5, /**< unable to delete/create entire tree */ 48 48 AE_NOTFOUND = -6 /** No such attribute */ 49 49 } atr_err; … … 54 54 extern ATTR *atr_sub_branch(ATTR *branch); 55 55 extern void atr_new_add(dbref thing, char const *RESTRICT atr, 56 char const *RESTRICT s, dbref player,57 unsigned int flags, unsigned char derefs);56 char const *RESTRICT s, dbref player, 57 unsigned int flags, unsigned char derefs); 58 58 extern atr_err atr_add(dbref thing, char const *RESTRICT atr, 59 char const *RESTRICT s, dbref player,60 unsigned int flags);59 char const *RESTRICT s, dbref player, 60 unsigned int flags); 61 61 extern atr_err atr_clr(dbref thing, char const *atr, dbref player); 62 62 extern atr_err wipe_atr(dbref thing, char const *atr, dbref player); … … 65 65 typedef int (*aig_func) (dbref, dbref, dbref, const char *, ATTR *, void *); 66 66 extern int atr_iter_get(dbref player, dbref thing, char const *name, 67 int mortal, aig_func func, void *args);67 int mortal, aig_func func, void *args); 68 68 extern int atr_iter_get_parent(dbref player, dbref thing, char const *name, 69 int mortal, aig_func func, void *args);69 int mortal, aig_func func, void *args); 70 70 extern int atr_pattern_count(dbref player, dbref thing, const char *name, 71 int doparent, int mortal);71 int doparent, int mortal); 72 72 extern ATTR *atr_complete_match(dbref player, char const *atr, dbref privs); 73 73 extern void atr_free_all(dbref thing); … … 75 75 extern char const *convert_atr(int oldatr); 76 76 extern int atr_comm_match(dbref thing, dbref player, int type, int end, 77 char const *str, int just_match, char *atrname,78 char **abp, dbref *errobj);77 char const *str, int just_match, char *atrname, 78 char **abp, dbref *errobj); 79 79 extern int one_comm_match(dbref thing, dbref player, const char *atr, 80 const char *str);80 const char *str); 81 81 extern int do_set_atr(dbref thing, char const *RESTRICT atr, 82 char const *RESTRICT s, dbref player, unsigned int flags);82 char const *RESTRICT s, dbref player, unsigned int flags); 83 83 extern void do_atrlock(dbref player, char const *arg1, char const *arg2); 84 84 extern void do_atrchown(dbref player, char const *arg1, char const *arg2); 85 85 extern int string_to_atrflag(dbref player, const char *p); 86 86 extern int string_to_atrflagsets(dbref player, const char *p, int *setbits, 87 int *clrbits);87 int *clrbits); 88 88 extern const char *atrflag_to_string(int mask); 89 89 extern void init_atr_name_tree(void); … … 91 91 extern int can_read_attr_internal(dbref player, dbref obj, ATTR *attr); 92 92 extern int can_write_attr_internal(dbref player, dbref obj, ATTR *attr, 93 int safe);93 int safe); 94 94 extern unsigned const char *atr_get_compressed_data(ATTR *atr); 95 95 extern char *atr_value(ATTR *atr); … … 99 99 100 100 /* possible attribute flags */ 101 #define AF_EMPTY_FLAGS 0x0 /**< No flag at all */102 #define AF_ODARK 0x1 /**< OBSOLETE! Leave here but don't use */103 #define AF_INTERNAL 0x2 /**< no one can see it or set it */104 #define AF_WIZARD 0x4 /**< Wizard only can change it */105 #define AF_NUKED 0x8 /**< OBSOLETE! Leave here but don't use */106 #define AF_LOCKED 0x10 /**< Only creator of attrib can change it. */107 #define AF_NOPROG 0x20 /**< won't be searched for $ commands. */108 #define AF_MDARK 0x40 /**< Only wizards can see it */109 #define AF_PRIVATE 0x80 /**< Children don't inherit it */110 #define AF_NOCOPY 0x100 /**< atr_cpy (for @clone) doesn't copy it */111 #define AF_VISUAL 0x200 /**< Everyone can see this attribute */112 #define AF_REGEXP 0x400 /**< Match $/^ patterns using regexps */113 #define AF_CASE 0x800 /**< Match $/^ patterns case-sensitive */114 #define AF_SAFE 0x1000 /**< This attribute may not be modified */115 #define AF_ROOT 0x2000 /**< Root of an attribute tree */116 #define AF_UNDEF1 0x4000 /**< Undefined; reserved for a future flag */117 #define AF_UNDEF2 0x8000 /**< Undefined; reserved for a future flag */118 #define AF_STATIC 0x10000 /**< OBSOLETE! Leave here but don't use */119 #define AF_COMMAND 0x20000 /**< INTERNAL: value starts with $ */120 #define AF_LISTEN 0x40000 /**< INTERNAL: value starts with ^ */121 #define AF_NODUMP 0x80000 /**< INTERNAL: attribute is not saved */122 #define AF_LISTED 0x100000 /**< INTERNAL: Used in @list attribs */123 #define AF_PREFIXMATCH 0x200000 /**< Subject to prefix-matching */124 #define AF_VEILED 0x400000 /**< On ex, show presence, not value */125 #define AF_DEBUG 0x800000 /**< Show debug when evaluated */126 #define AF_NEARBY 0x1000000 /**< Override AF_VISUAL if remote */127 #define AF_PUBLIC 0x2000000 /**< Override SAFER_UFUN */128 #define AF_ANON 0x4000000 /**< INTERNAL: Attribute doesn't really101 #define AF_EMPTY_FLAGS 0x0 /**< No flag at all */ 102 #define AF_ODARK 0x1 /**< OBSOLETE! Leave here but don't use */ 103 #define AF_INTERNAL 0x2 /**< no one can see it or set it */ 104 #define AF_WIZARD 0x4 /**< Wizard only can change it */ 105 #define AF_NUKED 0x8 /**< OBSOLETE! Leave here but don't use */ 106 #define AF_LOCKED 0x10 /**< Only creator of attrib can change it. */ 107 #define AF_NOPROG 0x20 /**< won't be searched for $ commands. */ 108 #define AF_MDARK 0x40 /**< Only wizards can see it */ 109 #define AF_PRIVATE 0x80 /**< Children don't inherit it */ 110 #define AF_NOCOPY 0x100 /**< atr_cpy (for @clone) doesn't copy it */ 111 #define AF_VISUAL 0x200 /**< Everyone can see this attribute */ 112 #define AF_REGEXP 0x400 /**< Match $/^ patterns using regexps */ 113 #define AF_CASE 0x800 /**< Match $/^ patterns case-sensitive */ 114 #define AF_SAFE 0x1000 /**< This attribute may not be modified */ 115 #define AF_ROOT 0x2000 /**< Root of an attribute tree */ 116 #define AF_UNDEF1 0x4000 /**< Undefined; reserved for a future flag */ 117 #define AF_UNDEF2 0x8000 /**< Undefined; reserved for a future flag */ 118 #define AF_STATIC 0x10000 /**< OBSOLETE! Leave here but don't use */ 119 #define AF_COMMAND 0x20000 /**< INTERNAL: value starts with $ */ 120 #define AF_LISTEN 0x40000 /**< INTERNAL: value starts with ^ */ 121 #define AF_NODUMP 0x80000 /**< INTERNAL: attribute is not saved */ 122 #define AF_LISTED 0x100000 /**< INTERNAL: Used in @list attribs */ 123 #define AF_PREFIXMATCH 0x200000 /**< Subject to prefix-matching */ 124 #define AF_VEILED 0x400000 /**< On ex, show presence, not value */ 125 #define AF_DEBUG 0x800000 /**< Show debug when evaluated */ 126 #define AF_NEARBY 0x1000000 /**< Override AF_VISUAL if remote */ 127 #define AF_PUBLIC 0x2000000 /**< Override SAFER_UFUN */ 128 #define AF_ANON 0x4000000 /**< INTERNAL: Attribute doesn't really 129 129 exist in the database */ 130 #define AF_NONAME 0x8000000 /**< No name in did_it */131 #define AF_NOSPACE 0x10000000 /**< No space in did_it */132 #define AF_MHEAR 0x20000000 /**< ^-listens can be triggered by %! */133 #define AF_AHEAR 0x40000000 /**< ^-listens can be triggered by anyone */134 #define AF_UNDEF3 0x80000000 /**< Undefined; reserved for a future flag */130 #define AF_NONAME 0x8000000 /**< No name in did_it */ 131 #define AF_NOSPACE 0x10000000 /**< No space in did_it */ 132 #define AF_MHEAR 0x20000000 /**< ^-listens can be triggered by %! */ 133 #define AF_AHEAR 0x40000000 /**< ^-listens can be triggered by anyone */ 134 #define AF_UNDEF3 0x80000000 /**< Undefined; reserved for a future flag */ 135 135 136 #define AF_MAXVAL 0x100000000 /**< Largest attribute flag value. */136 #define AF_MAXVAL 0x100000000 /**< Largest attribute flag value. */ 137 137 138 138 /*** external predefined attributes. */ … … 157 157 #define OPAE_NULL -3 158 158 159 #endif /* __ATTRIB_H */159 #endif /* __ATTRIB_H */ 1.8.2/branches/devel/hdrs/boolexp.h
r924 r932 23 23 extern boolexp parse_boolexp(dbref player, const char *buf, lock_type ltype); 24 24 extern boolexp parse_boolexp_d(dbref player, const char *buf, lock_type ltype, 25 int derefs);25 int derefs); 26 26 extern void free_boolexp(boolexp b); 27 27 boolexp getboolexp(FILE * f, const char *ltype); … … 34 34 }; 35 35 extern char *unparse_boolexp(dbref player, boolexp b, enum u_b_f flag); 36 #endif /* BOOLEXP_H */36 #endif /* BOOLEXP_H */ 1.8.2/branches/devel/hdrs/bufferq.h
r924 r932 12 12 13 13 struct bufferq { 14 char *buffer; /**< Pointer to start of buffer */15 char *buffer_end; /**< Pointer to insertion point in buffer */16 int buffer_size; /**< Size allocated to buffer, in bytes */17 int num_buffered; /**< Number of strings in the buffer */18 char last_string[BUFFER_LEN]; /**< Cache of last string inserted */19 char last_type; /**< Cache of type of last string inserted */14 char *buffer; /**< Pointer to start of buffer */ 15 char *buffer_end; /**< Pointer to insertion point in buffer */ 16 int buffer_size; /**< Size allocated to buffer, in bytes */ 17 int num_buffered; /**< Number of strings in the buffer */ 18 char last_string[BUFFER_LEN]; /**< Cache of last string inserted */ 19 char last_type; /**< Cache of type of last string inserted */ 20 20 }; 21 21 … … 29 29 extern void free_bufferq(BUFFERQ * bq); 30 30 extern void add_to_bufferq(BUFFERQ * bq, int type, dbref player, 31 const char *msg);31 const char *msg); 32 32 extern char *iter_bufferq(BUFFERQ * bq, char **p, dbref *player, int *type, 33 time_t * timestamp);33 time_t * timestamp); 34 34 extern int bufferq_lines(BUFFERQ * bq); 35 35 extern int isempty_bufferq(BUFFERQ * bq); 1.8.2/branches/devel/hdrs/case.h
r924 r932 11 11 #define UPCASE(x) (islower((unsigned char)x) ? toupper((unsigned char)x) : (x)) 12 12 #endif 13 #endif /* CASE_H */13 #endif /* CASE_H */ 1.8.2/branches/devel/hdrs/chunk.h
r924 r932 13 13 14 14 chunk_reference_t chunk_create(unsigned char const *data, u_int_16 len, 15 unsigned char derefs);15 unsigned char derefs); 16 16 void chunk_delete(chunk_reference_t reference); 17 17 u_int_16 chunk_fetch(chunk_reference_t reference, 18 unsigned char *buffer, u_int_16 buffer_len);18 unsigned char *buffer, u_int_16 buffer_len); 19 19 u_int_16 chunk_len(chunk_reference_t reference); 20 20 unsigned char chunk_derefs(chunk_reference_t reference); … … 33 33 void chunk_fork_done(void); 34 34 35 #endif /* _CHUNK_H_ */35 #endif /* _CHUNK_H_ */ 1.8.2/branches/devel/hdrs/command.h
r924 r932 109 109 typedef struct command_info COMMAND_INFO; 110 110 typedef void (*command_func) (COMMAND_INFO *, dbref, dbref, switch_mask, char *, 111 char *, char *, char *, char *[MAX_ARG], char *,112 char *[MAX_ARG]);111 char *, char *, char *, char *[MAX_ARG], char *, 112 char *[MAX_ARG]); 113 113 114 114 /** A hook specification. 115 115 */ 116 116 struct hook_data { 117 dbref obj; /**< Object where the hook attribute is stored. */118 char *attrname; /**< Attribute name of the hook attribute */117 dbref obj; /**< Object where the hook attribute is stored. */ 118 char *attrname; /**< Attribute name of the hook attribute */ 119 119 }; 120 120 … … 123 123 */ 124 124 struct command_info { 125 const char *name; /**< Canonical name of the command */126 const char *restrict_message; /**< Message sent when command is restricted */127 command_func func; /**< Function to call when command is run */128 unsigned int type; /**< Types of objects that can use the command */129 object_flag_type flagmask; /**< Flags to which the command is restricted */130 object_flag_type powers; /**< Powers to which the command is restricted */131 switch_mask sw; /**< Bitflags of switches this command can take */125 const char *name; /**< Canonical name of the command */ 126 const char *restrict_message; /**< Message sent when command is restricted */ 127 command_func func; /**< Function to call when command is run */ 128 unsigned int type; /**< Types of objects that can use the command */ 129 object_flag_type flagmask; /**< Flags to which the command is restricted */ 130 object_flag_type powers; /**< Powers to which the command is restricted */ 131 switch_mask sw; /**< Bitflags of switches this command can take */ 132 132 /** Hooks on this command. 133 133 */ 134 134 struct { 135 struct hook_data before; /**< Hook to evaluate before command */136 struct hook_data after; /**< Hook to evaluate after command */137 struct hook_data ignore; /**< Hook to evaluate to decide if we should ignore hardcoded command */138 struct hook_data override; /**< Hook to override command with $command */135 struct hook_data before; /**< Hook to evaluate before command */ 136 struct hook_data after; /**< Hook to evaluate after command */ 137 struct hook_data ignore; /**< Hook to evaluate to decide if we should ignore hardcoded command */ 138 struct hook_data override; /**< Hook to override command with $command */ 139 139 } hooks; 140 140 }; … … 147 147 */ 148 148 struct command_list { 149 const char *name; /**< Command name */150 const char *switches; /**< Space-separated list of switch names */151 command_func func; /**< Function to call when command is run */152 unsigned int type; /**< Types of objects that can use the command */153 const char *flagstr; /**< Space-separated list of flags that can use */154 const char *powers; /**< Powers to which the command is restricted */149 const char *name; /**< Command name */ 150 const char *switches; /**< Space-separated list of switch names */ 151 command_func func; /**< Function to call when command is run */ 152 unsigned int type; /**< Types of objects that can use the command */ 153 const char *flagstr; /**< Space-separated list of flags that can use */ 154 const char *powers; /**< Powers to which the command is restricted */ 155 155 }; 156 156 … … 162 162 */ 163 163 struct switch_value { 164 const char *name; /**< Name of the switch */165 int value; /**< Number of the switch */164 const char *name; /**< Name of the switch */ 165 int value; /**< Number of the switch */ 166 166 }; 167 167 … … 173 173 */ 174 174 struct com_sort_struc { 175 struct com_sort_struc *next; /**< Pointer to next in list */176 COMMAND_INFO *cmd; /**< Command data */175 struct com_sort_struc *next; /**< Pointer to next in list */ 176 COMMAND_INFO *cmd; /**< Command data */ 177 177 }; 178 178 … … 182 182 */ 183 183 struct command_perms_t { 184 const char *name; /**< Permission name */185 unsigned int type; /**< Bitmask for this permission */184 const char *name; /**< Permission name */ 185 unsigned int type; /**< Bitmask for this permission */ 186 186 }; 187 187 … … 199 199 object_flag_type powers, switch_mask *sw, command_func func); 200 200 extern COMMAND_INFO *command_modify(const char *name, int type, 201 object_flag_type flagmask,202 object_flag_type powers, switch_mask *sw,203 command_func func);201 object_flag_type flagmask, 202 object_flag_type powers, switch_mask *sw, 203 command_func func); 204 204 extern void reserve_alias(const char *a); 205 205 extern int alias_command(const char *command, const char *alias); … … 224 224 225 225 226 #endif /* __COMMAND_H */226 #endif /* __COMMAND_H */ 1.8.2/branches/devel/hdrs/compile.h
r924 r932 71 71 #endif 72 72 73 #endif /* __COMPILE_H */73 #endif /* __COMPILE_H */ 1.8.2/branches/devel/hdrs/conf.h
r924 r932 67 67 #define SPILLOVER_THRESHOLD 0 68 68 /* #define SPILLOVER_THRESHOLD (MAX_OUTPUT / 2) */ 69 #define COMMAND_TIME_MSEC 1000 /* time slice length in milliseconds */70 #define COMMAND_BURST_SIZE 100 /* commands allowed per user in a burst */71 #define COMMANDS_PER_TIME 1 /* commands per time slice after burst */69 #define COMMAND_TIME_MSEC 1000 /* time slice length in milliseconds */ 70 #define COMMAND_BURST_SIZE 100 /* commands allowed per user in a burst */ 71 #define COMMANDS_PER_TIME 1 /* commands per time slice after burst */ 72 72 73 73 … … 81 81 82 82 typedef int (*config_func) (const char *opt, const char *val, void *loc, 83 int maxval, int source);83 int maxval, int source); 84 84 85 85 /** Runtime configuration parameter. … … 87 87 */ 88 88 typedef struct confparm { 89 const char *name; /**< name of option. */89 const char *name; /**< name of option. */ 90 90 /** the function handler. */ 91 91 config_func handler; 92 void *loc; /**< place to put this option. */93 int max; /**< max: string length, integer value. */94 int overridden; /**< Has the default been overridden? */95 const char *group; /**< The option's group name */92 void *loc; /**< place to put this option. */ 93 int max; /**< max: string length, integer value. */ 94 int overridden; /**< Has the default been overridden? */ 95 const char *group; /**< The option's group name */ 96 96 } PENNCONF; 97 97 … … 101 101 */ 102 102 struct options_table { 103 char mud_name[128]; /**< The name of the mush */104 int port; /**< The port to listen for connections */105 int ssl_port; /**< The port to listen for SSL connections */106 char input_db[256]; /**< Name of the input database file */107 char output_db[256]; /**< Name of the output database file */108 char crash_db[256]; /**< Name of the panic database file */109 char mail_db[256]; /**< Name of the mail database file */110 dbref player_start; /**< The room in which new players are created */111 dbref master_room; /**< The master room for global commands/exits */112 dbref ancestor_room; /**< The ultimate parent room */113 dbref ancestor_exit; /**< The ultimate parent exit */114 dbref ancestor_thing; /**< The ultimate parent thing */103 char mud_name[128]; /**< The name of the mush */ 104 int port; /**< The port to listen for connections */ 105 int ssl_port; /**< The port to listen for SSL connections */ 106 char input_db[256]; /**< Name of the input database file */ 107 char output_db[256]; /**< Name of the output database file */ 108 char crash_db[256]; /**< Name of the panic database file */ 109 char mail_db[256]; /**< Name of the mail database file */ 110 dbref player_start; /**< The room in which new players are created */ 111 dbref master_room; /**< The master room for global commands/exits */ 112 dbref ancestor_room; /**< The ultimate parent room */ 113 dbref ancestor_exit; /**< The ultimate parent exit */ 114 dbref ancestor_thing; /**< The ultimate parent thing */ 115 115 dbref ancestor_player; /**< The ultimate parent player */ 116 int idle_timeout; /**< Maximum idle time allowed, in minutes */117 int unconnected_idle_timeout; /**< Maximum idle time for connections without dbrefs, in minutes */116 int idle_timeout; /**< Maximum idle time allowed, in minutes */ 117 int unconnected_idle_timeout; /**< Maximum idle time for connections without dbrefs, in minutes */ 118 118 int keepalive_timeout; /**< Number of seconds between TCP keepalive pings */ 119 int dump_interval; /**< Interval between database dumps, in seconds */119 int dump_interval; /**< Interval between database dumps, in seconds */ 120 120 char dump_message[256]; /**< Message shown at start of nonforking dump */ 121 121 char dump_complete[256]; /**< Message shown at end of nonforking dump */ 122 time_t dump_counter; /**< Time since last dump */123 int ident_timeout; /**< Timeout for ident lookups */124 int max_logins; /**< Maximum total logins allowed at once */125 int max_guests; /**< Maximum guests logins allowed at once */126 int whisper_loudness; /**< % chance that a noisy whisper is overheard */127 int blind_page; /**< Does page default to page/blind? */128 int page_aliases; /**< Does page include aliases? */129 int paycheck; /**< Number of pennies awarded each day of connection */130 int guest_paycheck; /**< Paycheck for guest connections */131 int starting_money; /**< Number of pennies for newly created players */132 int starting_quota; /**< Object quota for newly created players */122 time_t dump_counter; /**< Time since last dump */ 123 int ident_timeout; /**< Timeout for ident lookups */ 124 int max_logins; /**< Maximum total logins allowed at once */ 125 int max_guests; /**< Maximum guests logins allowed at once */ 126 int whisper_loudness; /**< % chance that a noisy whisper is overheard */ 127 int blind_page; /**< Does page default to page/blind? */ 128 int page_aliases; /**< Does page include aliases? */ 129 int paycheck; /**< Number of pennies awarded each day of connection */ 130 int guest_paycheck; /**< Paycheck for guest connections */ 131 int starting_money; /**< Number of pennies for newly created players */ 132 int starting_quota; /**< Object quota for newly created players */ 133 133 int player_queue_limit; /**< Maximum commands a player can queue at once */ 134 int queue_chunk; /**< Number of commands run from queue when no input from sockets is waiting */135 int active_q_chunk; /**< Number of commands run from queue when input from sockets is waiting */136 int func_nest_lim; /**< Maximum function recursion depth */137 int func_invk_lim; /**< Maximum number of function invocations */138 int call_lim; /**< Maximum parser calls allowed in a queue cycle */139 char log_wipe_passwd[256]; /**< Password for logwipe command */140 char money_singular[32]; /**< Currency unit name, singular */141 char money_plural[32]; /**< Currency unit name, plural */142 char compressprog[256]; /**< Program to compress database dumps */143 char uncompressprog[256]; /**< Program to uncompress database dumps */144 char compresssuff[256]; /**< Suffix for compressed dump files */145 char chatdb[256]; /**< Name of the chat database file */146 int max_player_chans; /**< Number of channels a player can create */147 int max_channels; /**< Total maximum allowed channels */148 int chan_cost; /**< Cost to create a channel */149 char connect_file[2][256]; /**< Names of text and html connection files */150 char motd_file[2][256]; /**< Names of text and html motd files */151 char wizmotd_file[2][256]; /**< Names of text and html wizmotd files */152 char newuser_file[2][256]; /**< Names of text and html new user files */153 char register_file[2][256]; /**< Names of text and html registration files */154 char quit_file[2][256]; /**< Names of text and html disconnection files */155 char down_file[2][256]; /**< Names of text and html server down files */156 char full_file[2][256]; /**< Names of text and html server full files */157 char guest_file[2][256]; /**< Names of text and html guest files */158 int log_commands; /**< Should we log all commands? */159 int log_forces; /**< Should we log force commands? */160 int support_pueblo; /**< Should the MUSH send Pueblo tags? */161 int login_allow; /**< Are mortals allowed to log in? */162 int guest_allow; /**< Are guests allowed to log in? */163 int create_allow; /**< Can new players be created? */164 int reverse_shs; /**< Should the SHS routines assume little-endian byte order? */165 char player_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created players. */166 char room_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created rooms. */167 char exit_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created exits. */168 char thing_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created things. */169 char channel_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created channels. */170 int warn_interval; /**< Interval between warning checks */171 time_t warn_counter; /**< Time since last warning check */172
