| 1 | /* conf.h */ |
|---|
| 2 | #ifndef __PENNCONF_H |
|---|
| 3 | #define __PENNCONF_H |
|---|
| 4 | |
|---|
| 5 | #include "copyrite.h" |
|---|
| 6 | #ifdef I_SYS_TIME |
|---|
| 7 | #include <sys/time.h> |
|---|
| 8 | #ifdef TIME_WITH_SYS_TIME |
|---|
| 9 | #include <time.h> |
|---|
| 10 | #endif |
|---|
| 11 | #else |
|---|
| 12 | #include <time.h> |
|---|
| 13 | #endif |
|---|
| 14 | #include "options.h" |
|---|
| 15 | #include "mushtype.h" |
|---|
| 16 | #include "htab.h" |
|---|
| 17 | |
|---|
| 18 | /* limit on player name length */ |
|---|
| 19 | #define PLAYER_NAME_LIMIT (options.player_name_len) |
|---|
| 20 | /* limit on object name length */ |
|---|
| 21 | #define OBJECT_NAME_LIMIT 256 |
|---|
| 22 | /* Limit on attribute name length */ |
|---|
| 23 | #define ATTRIBUTE_NAME_LIMIT 1024 |
|---|
| 24 | /* Loose limit on command/function name length */ |
|---|
| 25 | #define COMMAND_NAME_LIMIT 64 |
|---|
| 26 | |
|---|
| 27 | /* magic cookies */ |
|---|
| 28 | #define LOOKUP_TOKEN '*' |
|---|
| 29 | #define NUMBER_TOKEN '#' |
|---|
| 30 | #define ARG_DELIMITER '=' |
|---|
| 31 | |
|---|
| 32 | /* magic command cookies */ |
|---|
| 33 | #define SAY_TOKEN '"' |
|---|
| 34 | #define POSE_TOKEN ':' |
|---|
| 35 | #define SEMI_POSE_TOKEN ';' |
|---|
| 36 | #define EMIT_TOKEN '\\' |
|---|
| 37 | #define CHAT_TOKEN '+' |
|---|
| 38 | #define NOEVAL_TOKEN ']' |
|---|
| 39 | |
|---|
| 40 | /* delimiter for lists of exit aliases */ |
|---|
| 41 | #define EXIT_DELIMITER ';' |
|---|
| 42 | /* delimiter for lists of player name aliases */ |
|---|
| 43 | #define ALIAS_DELIMITER ';' |
|---|
| 44 | |
|---|
| 45 | #define QUIT_COMMAND "QUIT" |
|---|
| 46 | #define WHO_COMMAND "WHO" |
|---|
| 47 | #define LOGOUT_COMMAND "LOGOUT" |
|---|
| 48 | #define INFO_COMMAND "INFO" |
|---|
| 49 | #define INFO_VERSION "1.1" |
|---|
| 50 | #define DOING_COMMAND "DOING" |
|---|
| 51 | #define SESSION_COMMAND "SESSION" |
|---|
| 52 | #define IDLE_COMMAND "IDLE" |
|---|
| 53 | |
|---|
| 54 | #define PREFIX_COMMAND "OUTPUTPREFIX" |
|---|
| 55 | #define SUFFIX_COMMAND "OUTPUTSUFFIX" |
|---|
| 56 | #define PUEBLO_COMMAND "PUEBLOCLIENT " |
|---|
| 57 | |
|---|
| 58 | /* These CAN be modified, but it's heavily NOT suggested */ |
|---|
| 59 | #define PUEBLO_SEND "</xch_mudtext><img xch_mode=purehtml><xch_page clear=text>\n" |
|---|
| 60 | #define PUEBLO_HELLO "This world is Pueblo 1.10 Enhanced.\r\n" |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | #define MAX_OUTPUT 16384 |
|---|
| 64 | /* How much output buffer space must be left before we flush the |
|---|
| 65 | * buffer? Reportedly, using '0' fixes problems with Win32 port, |
|---|
| 66 | * and may be more efficient in network use. Using (MAX_OUTPUT / 2) |
|---|
| 67 | * is how it's been done in the past. You get to pick. |
|---|
| 68 | */ |
|---|
| 69 | #define SPILLOVER_THRESHOLD 0 |
|---|
| 70 | /* #define SPILLOVER_THRESHOLD (MAX_OUTPUT / 2) */ |
|---|
| 71 | #define COMMAND_TIME_MSEC 1000 /* time slice length in milliseconds */ |
|---|
| 72 | #define COMMAND_BURST_SIZE 100 /* commands allowed per user in a burst */ |
|---|
| 73 | #define COMMANDS_PER_TIME 1 /* commands per time slice after burst */ |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | /* Set this somewhere near the recursion limit */ |
|---|
| 77 | #define MAX_ITERS 100 |
|---|
| 78 | |
|---|
| 79 | /* From conf.c */ |
|---|
| 80 | extern void do_config_list(dbref player, const char *type, int lc); |
|---|
| 81 | |
|---|
| 82 | typedef struct options_table OPTTAB; |
|---|
| 83 | |
|---|
| 84 | typedef int (*config_func) (const char *opt, const char *val, void *loc, |
|---|
| 85 | int maxval, int source); |
|---|
| 86 | |
|---|
| 87 | /** Runtime configuration parameter. |
|---|
| 88 | * This structure represents a runtime configuration option. |
|---|
| 89 | */ |
|---|
| 90 | typedef struct confparm { |
|---|
| 91 | const char *name; /**< name of option. */ |
|---|
| 92 | /** the function handler. */ |
|---|
| 93 | config_func handler; |
|---|
| 94 | void *loc; /**< place to put this option. */ |
|---|
| 95 | int max; /**< max: string length, integer value. */ |
|---|
| 96 | int overridden; /**< Has the default been overridden? */ |
|---|
| 97 | const char *group; /**< The option's group name */ |
|---|
| 98 | } PENNCONF; |
|---|
| 99 | |
|---|
| 100 | /** Runtime configuration options. |
|---|
| 101 | * This large structure stores all of the runtime configuration options |
|---|
| 102 | * that are typically set in mush.cnf. |
|---|
| 103 | */ |
|---|
| 104 | struct options_table { |
|---|
| 105 | char mud_name[128]; /**< The name of the mush */ |
|---|
| 106 | int port; /**< The port to listen for connections */ |
|---|
| 107 | int ssl_port; /**< The port to listen for SSL connections */ |
|---|
| 108 | char input_db[256]; /**< Name of the input database file */ |
|---|
| 109 | char output_db[256]; /**< Name of the output database file */ |
|---|
| 110 | char crash_db[256]; /**< Name of the panic database file */ |
|---|
| 111 | char mail_db[256]; /**< Name of the mail database file */ |
|---|
| 112 | dbref player_start; /**< The room in which new players are created */ |
|---|
| 113 | dbref master_room; /**< The master room for global commands/exits */ |
|---|
| 114 | dbref ancestor_room; /**< The ultimate parent room */ |
|---|
| 115 | dbref ancestor_exit; /**< The ultimate parent exit */ |
|---|
| 116 | dbref ancestor_thing; /**< The ultimate parent thing */ |
|---|
| 117 | dbref ancestor_player; /**< The ultimate parent player */ |
|---|
| 118 | int idle_timeout; /**< Maximum idle time allowed, in minutes */ |
|---|
| 119 | int unconnected_idle_timeout; /**< Maximum idle time for connections without dbrefs, in minutes */ |
|---|
| 120 | int keepalive_timeout; /**< Number of seconds between TCP keepalive pings */ |
|---|
| 121 | int dump_interval; /**< Interval between database dumps, in seconds */ |
|---|
| 122 | char dump_message[256]; /**< Message shown at start of nonforking dump */ |
|---|
| 123 | char dump_complete[256]; /**< Message shown at end of nonforking dump */ |
|---|
| 124 | time_t dump_counter; /**< Time since last dump */ |
|---|
| 125 | int ident_timeout; /**< Timeout for ident lookups */ |
|---|
| 126 | int max_logins; /**< Maximum total logins allowed at once */ |
|---|
| 127 | int max_guests; /**< Maximum guests logins allowed at once */ |
|---|
| 128 | int whisper_loudness; /**< % chance that a noisy whisper is overheard */ |
|---|
| 129 | int blind_page; /**< Does page default to page/blind? */ |
|---|
| 130 | int page_aliases; /**< Does page include aliases? */ |
|---|
| 131 | int paycheck; /**< Number of pennies awarded each day of connection */ |
|---|
| 132 | int guest_paycheck; /**< Paycheck for guest connections */ |
|---|
| 133 | int starting_money; /**< Number of pennies for newly created players */ |
|---|
| 134 | int starting_quota; /**< Object quota for newly created players */ |
|---|
| 135 | int player_queue_limit; /**< Maximum commands a player can queue at once */ |
|---|
| 136 | int queue_chunk; /**< Number of commands run from queue when no input from sockets is waiting */ |
|---|
| 137 | int active_q_chunk; /**< Number of commands run from queue when input from sockets is waiting */ |
|---|
| 138 | int func_nest_lim; /**< Maximum function recursion depth */ |
|---|
| 139 | int func_invk_lim; /**< Maximum number of function invocations */ |
|---|
| 140 | int call_lim; /**< Maximum parser calls allowed in a queue cycle */ |
|---|
| 141 | char log_wipe_passwd[256]; /**< Password for logwipe command */ |
|---|
| 142 | char money_singular[32]; /**< Currency unit name, singular */ |
|---|
| 143 | char money_plural[32]; /**< Currency unit name, plural */ |
|---|
| 144 | char compressprog[256]; /**< Program to compress database dumps */ |
|---|
| 145 | char uncompressprog[256]; /**< Program to uncompress database dumps */ |
|---|
| 146 | char compresssuff[256]; /**< Suffix for compressed dump files */ |
|---|
| 147 | char chatdb[256]; /**< Name of the chat database file */ |
|---|
| 148 | int max_player_chans; /**< Number of channels a player can create */ |
|---|
| 149 | int max_channels; /**< Total maximum allowed channels */ |
|---|
| 150 | int chan_cost; /**< Cost to create a channel */ |
|---|
| 151 | int noisy_cemit; /**< Is @cemit noisy by default? */ |
|---|
| 152 | char connect_file[2][256]; /**< Names of text and html connection files */ |
|---|
| 153 | char motd_file[2][256]; /**< Names of text and html motd files */ |
|---|
| 154 | char wizmotd_file[2][256]; /**< Names of text and html wizmotd files */ |
|---|
| 155 | char newuser_file[2][256]; /**< Names of text and html new user files */ |
|---|
| 156 | char register_file[2][256]; /**< Names of text and html registration files */ |
|---|
| 157 | char quit_file[2][256]; /**< Names of text and html disconnection files */ |
|---|
| 158 | char down_file[2][256]; /**< Names of text and html server down files */ |
|---|
| 159 | char full_file[2][256]; /**< Names of text and html server full files */ |
|---|
| 160 | char guest_file[2][256]; /**< Names of text and html guest files */ |
|---|
| 161 | int log_commands; /**< Should we log all commands? */ |
|---|
| 162 | int log_forces; /**< Should we log force commands? */ |
|---|
| 163 | int support_pueblo; /**< Should the MUSH send Pueblo tags? */ |
|---|
| 164 | int login_allow; /**< Are mortals allowed to log in? */ |
|---|
| 165 | int guest_allow; /**< Are guests allowed to log in? */ |
|---|
| 166 | int create_allow; /**< Can new players be created? */ |
|---|
| 167 | int reverse_shs; /**< Should the SHS routines assume little-endian byte order? */ |
|---|
| 168 | char player_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created players. */ |
|---|
| 169 | char room_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created rooms. */ |
|---|
| 170 | char exit_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created exits. */ |
|---|
| 171 | char thing_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created things. */ |
|---|
| 172 | char channel_flags[BUFFER_LEN]; /**< Space-separated list of flags to set on newly created channels. */ |
|---|
| 173 | int warn_interval; /**< Interval between warning checks */ |
|---|
| 174 | time_t warn_counter; /**< Time since last warning check */ |
|---|
| 175 | dbref base_room; /**< Room which floating checks consider as the base */ |
|---|
| 176 | dbref default_home; /**< Home for the homeless */ |
|---|
| 177 | int use_dns; /**< Should we use DNS lookups? */ |
|---|
| 178 | int safer_ufun; /**< Should we require security for ufun calls? */ |
|---|
| 179 | char dump_warning_1min[256]; /**< 1 minute nonforking dump warning message */ |
|---|
| 180 | char dump_warning_5min[256]; /**< 5 minute nonforking dump warning message */ |
|---|
| 181 | int noisy_whisper; /**< Does whisper default to whisper/noisy? */ |
|---|
| 182 | int possessive_get; /**< Can possessive get be used? */ |
|---|
| 183 | int possessive_get_d; /**< Can possessive get be used on disconnected players? */ |
|---|
| 184 | int really_safe; /**< Does the SAFE flag protect objects from nuke */ |
|---|
| 185 | int destroy_possessions; /**< Are the possessions of a nuked player nuked? */ |
|---|
| 186 | int null_eq_zero; /**< Is null string treated as 0 in math functions? */ |
|---|
| 187 | int tiny_booleans; /**< Do strings and db#'s evaluate as false, like TinyMUSH? */ |
|---|
| 188 | int tiny_trim_fun; /**< Does the trim function take arguments in TinyMUSH order? */ |
|---|
| 189 | int tiny_math; /**< Can you use strings in math functions, like TinyMUSH? */ |
|---|
| 190 | int adestroy; /**< Is the adestroy attribute available? */ |
|---|
| 191 | int amail; /**< Is the amail attribute available? */ |
|---|
| 192 | int mail_limit; /**< Maximum number of mail messages per player */ |
|---|
| 193 | int player_listen; /**< Does listen work on players? */ |
|---|
| 194 | int player_ahear; /**< Does ahear work on players? */ |
|---|
| 195 | int startups; /**< Is startup run on startups? */ |
|---|
| 196 | int room_connects; /**< Do players trigger aconnect/adisconnect on their location? */ |
|---|
| 197 | int ansi_names; /**< Are object names shown in bold? */ |
|---|
| 198 | int comma_exit_list; /**< Should exit lists be itemized? */ |
|---|
| 199 | int count_all; /**< Are hidden players included in total player counts? */ |
|---|
| 200 | int exits_connect_rooms; /**< Does the presence of an exit make a room connected? */ |
|---|
| 201 | int zone_control; /**< Are only ZMPs allowed to determine zone-based control? */ |
|---|
| 202 | int link_to_object; /**< Can exits be linked to objects? */ |
|---|
| 203 | int owner_queues; /**< Are queues tracked by owner or individual object? */ |
|---|
| 204 | int wiz_noaenter; /**< Do DARK wizards trigger aenters? */ |
|---|
| 205 | int use_ident; /**< Should we do ident checks on connections? */ |
|---|
| 206 | char ip_addr[64]; /**< What ip address should the server bind to? */ |
|---|
| 207 | char ssl_ip_addr[64]; /**< What ip address should the server bind to? */ |
|---|
| 208 | int player_name_spaces; /**< Can players have multiword names? */ |
|---|
| 209 | int max_aliases; /**< Maximum allowed aliases per player */ |
|---|
| 210 | int forking_dump; /**< Should we fork to dump? */ |
|---|
| 211 | int restrict_building; /**< Is the builder power required to build? */ |
|---|
| 212 | int free_objects; /**< If builder power is required, can you create without it? */ |
|---|
| 213 | int flags_on_examine; /**< Are object flags shown when it's examined? */ |
|---|
| 214 | int ex_public_attribs; /**< Are visual attributes shown on examine? */ |
|---|
| 215 | int full_invis; /**< Are DARK wizards anonymous? */ |
|---|
| 216 | int silent_pemit; /**< Does pemit default to pemit/silent? */ |
|---|
| 217 | dbref max_dbref; /**< Maximum allowable database size */ |
|---|
| 218 | int chat_strip_quote; /**< Should we strip initial quotes in chat? */ |
|---|
| 219 | char wizwall_prefix[256]; /**< Prefix for wizwall announcements */ |
|---|
| 220 | char rwall_prefix[256]; /**< Prefix for rwall announcements */ |
|---|
| 221 | char wall_prefix[256]; /**< Prefix for wall announcements */ |
|---|
| 222 | int announce_connects; /**< Should dis/connects be announced? */ |
|---|
| 223 | char access_file[256]; /**< Name of file of access control rules */ |
|---|
| 224 | char names_file[256]; /**< Name of file of forbidden player names */ |
|---|
| 225 | int object_cost; /**< Cost to create an object */ |
|---|
| 226 | int exit_cost; /**< Cost to create an exit */ |
|---|
| 227 | int link_cost; /**< Cost to link an exit */ |
|---|
| 228 | int room_cost; /**< Cost to dig a room */ |
|---|
| 229 | int queue_cost; /**< Deposit to queue a command */ |
|---|
| 230 | int quota_cost; /**< Number of objects per quota unit */ |
|---|
| 231 | int find_cost; /**< Cost to create an object */ |
|---|
| 232 | int page_cost; /**< Cost to create an object */ |
|---|
| 233 | int kill_default_cost; /**< Default cost to use 'kill' */ |
|---|
| 234 | int kill_min_cost; /**< Minimum cost to use 'kill' */ |
|---|
| 235 | int kill_bonus; /**< Percentage of cost paid to victim of 'kill' */ |
|---|
| 236 | int queue_loss; /**< 1/queue_loss chance of a command costing a penny */ |
|---|
| 237 | int max_pennies; /**< Maximum pennies a player can have */ |
|---|
| 238 | int max_guest_pennies; /**< Maximum pennies a guest can have */ |
|---|
| 239 | int max_depth; /**< Maximum container depth */ |
|---|
| 240 | int max_parents; /**< Maximum parent depth */ |
|---|
| 241 | int purge_interval; /**< Time between automatic purges */ |
|---|
| 242 | time_t purge_counter; /**< Time since last automatic purge */ |
|---|
| 243 | int dbck_interval; /**< Time between automatic dbcks */ |
|---|
| 244 | time_t dbck_counter; /**< Time since last automatic dbck */ |
|---|
| 245 | int max_attrcount; /**< Maximum number of attributes per object */ |
|---|
| 246 | int float_precision; /**< Precision of floating point display */ |
|---|
| 247 | int newline_one_char; /**< Should a newline be counted as 1 character or 2? */ |
|---|
| 248 | int player_name_len; /**< Maximum length of player names */ |
|---|
| 249 | int queue_entry_cpu_time; /**< Maximum cpu time allowed per queue entry */ |
|---|
| 250 | int ascii_names; /**< Are object names restricted to ascii characters? */ |
|---|
| 251 | int max_global_fns; /**< Maximum number of functions */ |
|---|
| 252 | char chunk_swap_file[256]; /**< Name of the attribute swap file */ |
|---|
| 253 | int chunk_cache_memory; /**< Memory to use for the attribute cache */ |
|---|
| 254 | int chunk_migrate_amount; /**< Number of attrs to migrate each second */ |
|---|
| 255 | int read_remote_desc; /**< Can players read DESCRIBE attribute remotely? */ |
|---|
| 256 | #ifdef HAS_OPENSSL |
|---|
| 257 | char ssl_private_key_file[256]; /**< File to load the server's cert from */ |
|---|
| 258 | char ssl_ca_file[256]; /**< File to load the CA certs from */ |
|---|
| 259 | int ssl_require_client_cert; /**< Are clients required to present certs? */ |
|---|
| 260 | #endif |
|---|
| 261 | int mem_check; /**< Turn on the memory allocation checker? */ |
|---|
| 262 | int use_quota; /**< Are quotas enabled? */ |
|---|
| 263 | int empty_attrs; /**< Are empty attributes preserved? */ |
|---|
| 264 | int function_side_effects; /**< Turn on side effect functions? */ |
|---|
| 265 | char error_log[256]; /**< File to log connections */ |
|---|
| 266 | char connect_log[256]; /**< File to log connections */ |
|---|
| 267 | char wizard_log[256]; /**< File to log wizard commands */ |
|---|
| 268 | char command_log[256]; /**< File to log suspect commands */ |
|---|
| 269 | char trace_log[256]; /**< File to log trace data */ |
|---|
| 270 | char checkpt_log[256]; /**< File to log checkpoint data */ |
|---|
| 271 | char sql_platform[256]; /**< Type of SQL server, or "disabled" */ |
|---|
| 272 | char sql_host[256]; /**< Hostname of sql server */ |
|---|
| 273 | char sql_username[256]; /**< Username for sql */ |
|---|
| 274 | char sql_password[256]; /**< Password for sql */ |
|---|
| 275 | char sql_database[256]; /**< Database for sql */ |
|---|
| 276 | }; |
|---|
| 277 | |
|---|
| 278 | extern OPTTAB options; |
|---|
| 279 | extern HASHTAB local_options; |
|---|
| 280 | |
|---|
| 281 | extern PENNCONF *add_config(const char *name, config_func handler, void *loc, |
|---|
| 282 | int max, const char *group); |
|---|
| 283 | extern PENNCONF *new_config(void); |
|---|
| 284 | extern PENNCONF *get_config(const char *name); |
|---|
| 285 | extern void validate_config(void); |
|---|
| 286 | |
|---|
| 287 | |
|---|
| 288 | int cf_bool(const char *opt, const char *val, void *loc, int maxval, |
|---|
| 289 | int from_cmd); |
|---|
| 290 | int cf_str(const char *opt, const char *val, void *loc, int maxval, |
|---|
| 291 | int from_cmd); |
|---|
| 292 | int cf_int(const char *opt, const char *val, void *loc, int maxval, |
|---|
| 293 | int from_cmd); |
|---|
| 294 | int cf_dbref(const char *opt, const char *val, void *loc, int maxval, |
|---|
| 295 | int from_cmd); |
|---|
| 296 | int cf_flag(const char *opt, const char *val, void *loc, int maxval, |
|---|
| 297 | int from_cmd); |
|---|
| 298 | int cf_time(const char *opt, const char *val, void *loc, int maxval, |
|---|
| 299 | int from_cmd); |
|---|
| 300 | |
|---|
| 301 | |
|---|
| 302 | #define NUMQ 36 |
|---|
| 303 | |
|---|
| 304 | /* Config group viewing permissions */ |
|---|
| 305 | #define CGP_GOD 0x1 |
|---|
| 306 | #define CGP_WIZARD 0x3 |
|---|
| 307 | #define CGP_ADMIN 0x7 |
|---|
| 308 | #define Can_View_Config_Group(p,g) \ |
|---|
| 309 | (!(g->viewperms) || (God(p) && (g->viewperms & CGP_GOD)) || \ |
|---|
| 310 | (Wizard(p) && (g->viewperms & CGP_WIZARD)) || \ |
|---|
| 311 | (Hasprivs(p) && (g->viewperms & CGP_ADMIN))) |
|---|
| 312 | |
|---|
| 313 | |
|---|
| 314 | #define DUMP_INTERVAL (options.dump_interval) |
|---|
| 315 | #define DUMP_NOFORK_MESSAGE (options.dump_message) |
|---|
| 316 | #define DUMP_NOFORK_COMPLETE (options.dump_complete) |
|---|
| 317 | #define INACTIVITY_LIMIT (options.idle_timeout) |
|---|
| 318 | #define UNCONNECTED_LIMIT (options.unconnected_idle_timeout) |
|---|
| 319 | |
|---|
| 320 | #define MAX_LOGINS (options.max_logins) |
|---|
| 321 | #define MAX_GUESTS (options.max_guests) |
|---|
| 322 | |
|---|
| 323 | /* dbrefs are in the conf file */ |
|---|
| 324 | |
|---|
| 325 | #define TINYPORT (options.port) |
|---|
| 326 | #define SSLPORT (options.ssl_port) |
|---|
| 327 | #define PLAYER_START (options.player_start) |
|---|
| 328 | #define MASTER_ROOM (options.master_room) |
|---|
| 329 | #define ANCESTOR_ROOM (options.ancestor_room) |
|---|
| 330 | #define ANCESTOR_EXIT (options.ancestor_exit) |
|---|
| 331 | #define ANCESTOR_THING (options.ancestor_thing) |
|---|
| 332 | #define ANCESTOR_PLAYER (options.ancestor_player) |
|---|
| 333 | #define MONEY (options.money_singular) |
|---|
| 334 | #define MONIES (options.money_plural) |
|---|
| 335 | #define WHISPER_LOUDNESS (options.whisper_loudness) |
|---|
| 336 | #define BLIND_PAGE (options.blind_page) |
|---|
| 337 | #define PAGE_ALIASES (options.page_aliases) |
|---|
| 338 | |
|---|
| 339 | #define START_BONUS (options.starting_money) |
|---|
| 340 | #define PAY_CHECK (options.paycheck) |
|---|
| 341 | #define GUEST_PAY_CHECK (options.guest_paycheck) |
|---|
| 342 | #define START_QUOTA (options.starting_quota) |
|---|
| 343 | #define LOG_WIPE_PASSWD (options.log_wipe_passwd) |
|---|
| 344 | #define SUPPORT_PUEBLO (options.support_pueblo) |
|---|
| 345 | |
|---|
| 346 | #define QUEUE_QUOTA (options.player_queue_limit) |
|---|
| 347 | |
|---|
| 348 | #define MUDNAME (options.mud_name) |
|---|
| 349 | #define DEF_DB_IN (options.input_db) |
|---|
| 350 | #define DEF_DB_OUT (options.output_db) |
|---|
| 351 | |
|---|
| 352 | #define BASE_ROOM (options.base_room) |
|---|
| 353 | #define DEFAULT_HOME (options.default_home) |
|---|
| 354 | |
|---|
| 355 | #define PURGE_INTERVAL (options.purge_interval) |
|---|
| 356 | #define DBCK_INTERVAL (options.dbck_interval) |
|---|
| 357 | #define MAX_PARENTS (options.max_parents) |
|---|
| 358 | #define MAX_ZONES (30) |
|---|
| 359 | #define MAX_DEPTH (options.max_depth) |
|---|
| 360 | #define MAX_PENNIES (options.max_pennies) |
|---|
| 361 | #define MAX_GUEST_PENNIES (options.max_guest_pennies) |
|---|
| 362 | #define DBTOP_MAX (options.max_dbref) |
|---|
| 363 | #define QUEUE_LOSS (options.queue_loss) |
|---|
| 364 | #define KILL_BONUS (options.kill_bonus) |
|---|
| 365 | #define KILL_MIN_COST (options.kill_min_cost) |
|---|
| 366 | #define KILL_BASE_COST (options.kill_default_cost) |
|---|
| 367 | #define FIND_COST (options.find_cost) |
|---|
| 368 | #define PAGE_COST (options.page_cost) |
|---|
| 369 | #define QUOTA_COST (options.quota_cost) |
|---|
| 370 | #define QUEUE_COST (options.queue_cost) |
|---|
| 371 | #define ROOM_COST (options.room_cost) |
|---|
| 372 | #define LINK_COST (options.link_cost) |
|---|
| 373 | #define EXIT_COST (options.exit_cost) |
|---|
| 374 | #define OBJECT_COST (options.object_cost) |
|---|
| 375 | #define GOD ((dbref) 1) |
|---|
| 376 | #define ANNOUNCE_CONNECTS (options.announce_connects) |
|---|
| 377 | #define ACCESS_FILE (options.access_file) |
|---|
| 378 | #define NAMES_FILE (options.names_file) |
|---|
| 379 | #define SILENT_PEMIT (options.silent_pemit) |
|---|
| 380 | #define PLAYER_LISTEN (options.player_listen) |
|---|
| 381 | #define PLAYER_AHEAR (options.player_ahear) |
|---|
| 382 | #define STARTUPS (options.startups) |
|---|
| 383 | #define FULL_INVIS (options.full_invis) |
|---|
| 384 | #define EX_PUBLIC_ATTRIBS (options.ex_public_attribs) |
|---|
| 385 | #define FLAGS_ON_EXAMINE (options.flags_on_examine) |
|---|
| 386 | #define FREE_OBJECTS (options.free_objects) |
|---|
| 387 | #define RESTRICTED_BUILDING (options.restrict_building) |
|---|
| 388 | #define NO_FORK (!options.forking_dump) |
|---|
| 389 | #define PLAYER_NAME_SPACES (options.player_name_spaces) |
|---|
| 390 | #define MAX_ALIASES (options.max_aliases) |
|---|
| 391 | #define SAFER_UFUN (options.safer_ufun) |
|---|
| 392 | #define NOISY_WHISPER (options.noisy_whisper) |
|---|
| 393 | #define POSSESSIVE_GET (options.possessive_get) |
|---|
| 394 | #define POSSGET_ON_DISCONNECTED (options.possessive_get_d) |
|---|
| 395 | #define REALLY_SAFE (options.really_safe) |
|---|
| 396 | #define DESTROY_POSSESSIONS (options.destroy_possessions) |
|---|
| 397 | #define NULL_EQ_ZERO (options.null_eq_zero) |
|---|
| 398 | #define TINY_BOOLEANS (options.tiny_booleans) |
|---|
| 399 | #define TINY_TRIM_FUN (options.tiny_trim_fun) |
|---|
| 400 | #define ADESTROY_ATTR (options.adestroy) |
|---|
| 401 | #define AMAIL_ATTR (options.amail) |
|---|
| 402 | #define MAIL_LIMIT (options.mail_limit) |
|---|
| 403 | #define ROOM_CONNECTS (options.room_connects) |
|---|
| 404 | #define ANSI_NAMES (options.ansi_names) |
|---|
| 405 | #define COMMA_EXIT_LIST (options.comma_exit_list) |
|---|
| 406 | #define COUNT_ALL (options.count_all) |
|---|
| 407 | #define EXITS_CONNECT_ROOMS (options.exits_connect_rooms) |
|---|
| 408 | #define ZONE_CONTROL_ZMP (options.zone_control) |
|---|
| 409 | #define WIZWALL_PREFIX (options.wizwall_prefix) |
|---|
| 410 | #define RWALL_PREFIX (options.rwall_prefix) |
|---|
| 411 | #define CHAT_STRIP_QUOTE (options.chat_strip_quote) |
|---|
| 412 | #define WALL_PREFIX (options.wall_prefix) |
|---|
| 413 | #define NO_LINK_TO_OBJECT (!options.link_to_object) |
|---|
| 414 | #define QUEUE_PER_OWNER (options.owner_queues) |
|---|
| 415 | #define WIZ_NOAENTER (options.wiz_noaenter) |
|---|
| 416 | #define USE_IDENT (options.use_ident) |
|---|
| 417 | #define IDENT_TIMEOUT (options.ident_timeout) |
|---|
| 418 | #define USE_DNS (options.use_dns) |
|---|
| 419 | #define MUSH_IP_ADDR (options.ip_addr) |
|---|
| 420 | #define SSL_IP_ADDR (options.ssl_ip_addr) |
|---|
| 421 | #define MAX_ATTRCOUNT (options.max_attrcount) |
|---|
| 422 | #define HARD_MAX_ATTRCOUNT 1000000 |
|---|
| 423 | #define FLOAT_PRECISION (options.float_precision) |
|---|
| 424 | #define RECURSION_LIMIT (options.func_nest_lim) |
|---|
| 425 | #define FUNCTION_LIMIT (options.func_invk_lim) |
|---|
| 426 | #define CALL_LIMIT (options.call_lim) |
|---|
| 427 | #define TINY_MATH (options.tiny_math) |
|---|
| 428 | #define NEWLINE_ONE_CHAR (options.newline_one_char) |
|---|
| 429 | #define ONLY_ASCII_NAMES (options.ascii_names) |
|---|
| 430 | #define MAX_GLOBAL_FNS (options.max_global_fns) |
|---|
| 431 | #define USE_QUOTA (options.use_quota) |
|---|
| 432 | #define EMPTY_ATTRS (options.empty_attrs) |
|---|
| 433 | #define FUNCTION_SIDE_EFFECTS (options.function_side_effects) |
|---|
| 434 | #define ERRLOG (options.error_log) |
|---|
| 435 | #define CONNLOG (options.connect_log) |
|---|
| 436 | #define WIZLOG (options.wizard_log) |
|---|
| 437 | #define CMDLOG (options.command_log) |
|---|
| 438 | #define TRACELOG (options.trace_log) |
|---|
| 439 | #define CHECKLOG (options.checkpt_log) |
|---|
| 440 | #define SQL_PLATFORM (options.sql_platform) |
|---|
| 441 | #define SQL_HOST (options.sql_host) |
|---|
| 442 | #define SQL_DB (options.sql_database) |
|---|
| 443 | #define SQL_USER (options.sql_username) |
|---|
| 444 | #define SQL_PASS (options.sql_password) |
|---|
| 445 | |
|---|
| 446 | #define CHUNK_SWAP_FILE (options.chunk_swap_file) |
|---|
| 447 | #define CHUNK_CACHE_MEMORY (options.chunk_cache_memory) |
|---|
| 448 | #define CHUNK_MIGRATE_AMOUNT (options.chunk_migrate_amount) |
|---|
| 449 | |
|---|
| 450 | #define READ_REMOTE_DESC (options.read_remote_desc) |
|---|
| 451 | |
|---|
| 452 | typedef struct globals_table GLOBALTAB; |
|---|
| 453 | |
|---|
| 454 | struct globals_table { |
|---|
| 455 | int database_loaded; /**< True after the database has been read. */ |
|---|
| 456 | char dumpfile[200]; /**< File name to dump database to */ |
|---|
| 457 | time_t start_time; /**< MUSH start time (since process exec'd) */ |
|---|
| 458 | time_t first_start_time; /**< MUSH start time (since last shutdown) */ |
|---|
| 459 | time_t last_dump_time; /**< Time of last successful db save */ |
|---|
| 460 | int reboot_count; /**< Number of reboots so far */ |
|---|
| 461 | int paranoid_dump; /**< if paranoid, scan before dumping */ |
|---|
| 462 | int paranoid_checkpt; /**< write out an okay message every x objs */ |
|---|
| 463 | long indb_flags; /**< flags set in the input database */ |
|---|
| 464 | int on_second; /**< is it time for per-second processes? */ |
|---|
| 465 | }; |
|---|
| 466 | |
|---|
| 467 | extern GLOBALTAB globals; |
|---|
| 468 | |
|---|
| 469 | #endif /* __PENN_CONF_H */ |
|---|