 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
42 static void help(
void);
65 { NULL, NULL,
false, NULL, NULL }
72 LOG(
llevInfo,
"Initializing modules, stage %d\n", stage);
73 for (
int module = 0;
modules[module].
name != NULL; module++) {
93 for (
int module = 0;
modules[module].
name != NULL; module++) {
107 for (
int module = 0;
modules[module].
name != NULL; module++) {
238 int facility = atoi(arg);
239 openlog(
"crossfire-server", LOG_NDELAY, facility << 3);
240 setlogmask(LOG_UPTO(LOG_DEBUG));
242 LOG(
llevError,
"syslog is not available in this build\n");
291 int port = atoi(val);
292 if (port <= 0 || port > 65535) {
293 LOG(
llevError,
"%d is an invalid csport number, must be between 1 and 65535.\n", port);
315 for (
int module = 0;
modules[module].
name; module++) {
473 while (on_arg < argc) {
502 fprintf(stderr,
"Unknown option: %s\n", argv[on_arg]);
503 fprintf(stderr,
"Type '%s -h' for usage.\n", argv[0]);
542 char *
buf, *cp, *next;
555 if (!strncmp(cp,
"name", 4)) {
563 LOG(
llevError,
"%s:%d: fields must come after a name line\n", filename,
line);
567 if (!strncmp(cp,
"description", 11)) {
569 }
else if (sscanf(cp,
"material %d", &value)) {
571 }
else if (!strncmp(cp,
"saves", 5)) {
572 cp = strchr(cp,
' ')+1;
578 if ((next = strchr(cp,
',')) != NULL)
580 sscanf(cp,
"%d", &value);
581 mt->
save[i] = (int8_t)value;
584 }
else if (!strncmp(cp,
"mods", 4)) {
585 cp = strchr(cp,
' ')+1;
591 if ((next = strchr(cp,
',')) != NULL)
593 sscanf(cp,
"%d", &value);
594 mt->
mod[i] = (int8_t)value;
630 if ((fp = fopen(
buf,
"r")) == NULL) {
638 if ((cp = strrchr(
buf,
'\n')) != NULL)
648 if ((cp = strchr(
buf,
' ')) != NULL) {
663 LOG(
llevError,
"load_settings: Unknown value for metaserver_notification: %s\n", cp);
669 LOG(
llevError,
"load_settings: metaserver_server must have a value.\n");
675 LOG(
llevError,
"load_settings: motd must have a value.\n");
680 LOG(
llevError,
"load_settings: metaserver_host must have a value.\n");
686 if (port < 1 || port > 65535)
687 LOG(
llevError,
"load_settings: metaserver_port must be between 1 and 65535, %d is invalid\n", port);
696 LOG(
llevError,
"load_settings: worldmapstartx must be at least 0, %d is invalid\n", size);
703 LOG(
llevError,
"load_settings: worldmapstarty must be at least 0, %d is invalid\n", size);
710 LOG(
llevError,
"load_settings: worldmaptilesx must be greater than 1, %d is invalid\n", size);
717 LOG(
llevError,
"load_settings: worldmaptilesy must be greater than 1, %d is invalid\n", size);
724 LOG(
llevError,
"load_settings: fastclock must be at least 0, %d is invalid\n", lev);
733 LOG(
llevError,
"load_settings: Unknown value for not_permadeth: %s\n", cp);
741 LOG(
llevError,
"load_settings: Unknown value for resurrection: %s\n", cp);
749 LOG(
llevError,
"load_settings: Unknown value for set_title: %s\n", cp);
757 LOG(
llevError,
"load_settings: Unknown value for search_items: %s\n", cp);
765 LOG(
llevError,
"load_settings: Unknown value for spell_encumbrance: %s\n", cp);
773 LOG(
llevError,
"load_settings: Unknown value for spell_failure_effects: %s\n", cp);
781 LOG(
llevError,
"load_settings: Unknown value for casting_time: %s\n", cp);
789 LOG(
llevError,
"load_settings: Unknown value for real_wiz: %s\n", cp);
797 LOG(
llevError,
"load_settings: Unknown value for recycle_tmp_maps: %s\n", cp);
807 LOG(
llevError,
"load_settings: Unknown value for always_show_hp: %s\n", cp);
824 LOG(
llevError,
"load_settings: Unknown value for spellpoint_level_depend: %s\n", cp);
832 LOG(
llevError,
"load_settings: Unknown value for stat_loss_on_death: %s\n", cp);
835 LOG(
llevError,
"use_permanent_experience is deprecated, usepermenent_experience_percentage instead\n");
836 }
else if (!
strcasecmp(
buf,
"permanent_experience_percentage")) {
838 if (val < 0 || val > 100)
839 LOG(
llevError,
"load_settings: permenent_experience_percentage must be between 0 and 100, %d is invalid\n", val);
844 if (val < 0 || val > 100)
845 LOG(
llevError,
"load_settings: death_penalty_percentage must be between 0 and 100, %d is invalid\n", val);
850 if (val < 0 || val > 255)
851 LOG(
llevError,
"load_settings: death_penalty_levels can not be negative, %d is invalid\n", val);
860 LOG(
llevError,
"load_settings: Unknown value for balanced_stat_loss: %s\n", cp);
868 LOG(
llevError,
"load_settings: Unknown value for simple_exp: %s\n", cp);
871 float tmp = atof(cp);
873 LOG(
llevError,
"load_settings: item_power_factor must be a positive number (%f < 0)\n", tmp);
877 int16_t val = atoi(cp);
879 if (val < -100 || val > 100)
880 LOG(
llevError,
"load_settings: pk_luck_penalty must be between -100 and 100, %d is invalid\n", val);
886 if (val < 1 || val > 100)
887 LOG(
llevError,
"load_settings: set_friendly_fire must be between 1 an 100, %d is invalid\n", val);
891 int max_e = atoi(cp);
893 LOG(
llevError,
"load_settings: armor_max_enchant is %d\n", max_e);
899 LOG(
llevError,
"load_settings: armor_weight_reduction is %d\n", wr);
908 LOG(
llevError,
"load_settings: unknown value for armor_weight_linear: %s\n", cp);
913 LOG(
llevError,
"load_settings: armor_speed_improvement is %d\n", wr);
922 LOG(
llevError,
"load_settings: unknown value for armor_speed_linear: %s\n", cp);
930 LOG(
llevError,
"load_settings: unknown value for no_player_stealing: %s\n", cp);
934 #ifdef TRY_BROKEN_TOWN_PORTALS
937 LOG(
llevError,
"load_settings: create_home_portals is currently broken. It results in town portals that prematurely reset when the apartment is swapped.\n");
942 LOG(
llevError,
"load_settings: unknown value for create_home_portals: %s\n", cp);
950 LOG(
llevError,
"load_settings: unknown value for personalized_blessings: %s\n", cp);
953 int64_t pkme = atoll(cp);
958 int pkmep = atoi(cp);
960 LOG(
llevError,
"load_settings: pk_max_experience_percent should be positive or zero (was \"%s\")\n", cp);
963 }
else if (!
strcasecmp(
buf,
"allow_denied_spells_writing")) {
969 LOG(
llevError,
"load_settings: unknown value for allow_denied_spells_writing: %s\n", cp);
977 LOG(
llevError,
"load_settings: unknown value for allow_broken_converters: %s\n", cp);
985 LOG(
llevError,
"load_settings: unknown value for log_timestamp: %s\n", cp);
994 LOG(
llevError,
"load_settings: starting_stat_min (%d) need to be within %d-%d (%d)\n",
1002 LOG(
llevError,
"load_settings: starting_stat_max (%d) need to be within %d-%d (%d)\n",
1011 LOG(
llevError,
"load_settings: starting_stat_points (%d) need to be within %d-%d\n",
1023 if (val < NUM_STATS * 3 || val >
NUM_STATS * 18)
1024 LOG(
llevError,
"load_settings: roll_stat_points need to be within %d-%d\n",
1034 LOG(
llevError,
"load_settings: unknown value for special_break_map: %s\n", cp);
1036 }
else if (!
strcasecmp(
buf,
"ignore_plugin_compatibility")) {
1042 LOG(
llevError,
"load_settings: unknown value for ignore_plugin_compatibility: %s\n", cp);
1050 LOG(
llevError,
"load_settings: unknown value for account_block_create: %s\n", cp);
1057 if (val != 0 && val != 1) {
1058 LOG(
llevError,
"load_settings: crypt_mode must be 0 or 1\n");
1066 LOG(
llevError,
"load_settings: min_name (%d) need to be within %d-%d\n",
1103 auto dirs = {
"",
"account/",
"maps/",
"players/",
"unique-items/"};
1105 for (
auto dir : dirs) {
1107 LOG(
llevError,
"Could not create server save directories in %s (%s). Some server state may fail to save.\n",
1121 #ifdef HAVE_SYSLOG_H
1160 LOG(
llevInfo,
"Running server in test mode (no sockets).\n");
1182 printf(
"Usage: crossfire-server [options]\n\n");
1184 printf(
"Options:\n");
1185 printf(
" -conf Set the directory to find configuration files.\n");
1186 printf(
" -d Turn on extra debugging messages.\n");
1187 printf(
" -data Set the data (share/) directory (archetypes, treasures, etc).\n");
1188 printf(
" -disable-module\n"
1189 " Disable specified module, by its name\n"
1190 " Can be specified multiple times. 'All' disables all modules.\n");
1191 printf(
" -enable-module\n"
1192 " Enable specified module, by its name\n"
1193 " Can be specified multiple times. 'All' enables all modules.\n");
1194 printf(
" -disable-plugin\n"
1195 " Disables specified plugin. Use the name without the extension.\n"
1196 " Can be specified multiple times. 'All' disables all plugins.\n");
1197 printf(
" -dump-anims Dump animations.\n");
1198 printf(
" -h Print this help message.\n");
1199 printf(
" -ignore-assets-errors\n");
1200 printf(
" Allow going on even if there are errors in assets.\n");
1201 printf(
" Warning: this may lead to strange behaviour.\n");
1202 printf(
" -list-modules\n"
1203 " List built-in modules and exit.\n");
1204 printf(
" -local Set the local data (var/) directory.\n");
1205 printf(
" -log <file> Write logging information to the given file.\n");
1206 printf(
" -m List suggested experience for all monsters.\n");
1207 printf(
" -m2 Dump monster abilities.\n");
1208 printf(
" -m3 Dump artifact information.\n");
1209 printf(
" -m4 Dump spell information.\n");
1210 printf(
" -m5 Dump skill information.\n");
1211 printf(
" -m6 Dump race information.\n");
1212 printf(
" -m7 Dump alchemy information.\n");
1213 printf(
" -m8 Dump gods information.\n");
1214 printf(
" -m9 Dump more alchemy information (formula checking).\n");
1215 printf(
" -maps Set the map directory.\n");
1216 printf(
" -mexp Dump the experience table.\n");
1217 printf(
" -mon Turn on monster debugging.\n");
1218 printf(
" -mq Dump the quest list.\n");
1219 printf(
" -mt <name> Dump a list of treasures for a monster.\n");
1220 printf(
" -n Turn off debugging messages if on by default.\n");
1221 printf(
" -p <port> Specifies the port to listen on for incoming connections.\n");
1222 printf(
" -pack-assets <type> <filename>\n");
1223 printf(
" Packs specified assets type to the specified filename.\n");
1224 printf(
" Valid assets type are: archs, treasures, faces, messages, facesets, artifacts, formulae, images, quests.\n");
1225 printf(
" The file format will be tar ('images') or text (everything else).\n");
1226 printf(
" It is possible to combine multiple assets by using '+', for instance 'faces+messages+artifacts'.\n");
1227 printf(
" In this case the file will be in tar format.\n");
1228 printf(
" -playerdir Set the player files directory.\n");
1229 printf(
" -regions Set the region file.\n");
1230 printf(
" -syslog <no> Log to syslog with the given facility number (e.g. 16 for LOCAL0)\n");
1231 printf(
" -templatedir Set the template map directory.\n");
1232 printf(
" -tmpdir Set the directory for temporary files (mostly maps.)\n");
1233 printf(
" -uniquedir Set the unique items/maps directory.\n");
1234 printf(
" -v Print version information.\n");
1307 #ifdef SHUTDOWN_FILE
1312 if ((fp = fopen(
buf,
"r")) != NULL) {
1359 struct sigaction sa;
1361 sa.sa_sigaction = NULL;
1362 sigemptyset(&sa.sa_mask);
1365 sigaction(SIGHUP, &sa, NULL);
1368 signal(SIGPIPE, SIG_IGN);
uint8_t casting_time
It takes awhile to cast a spell.
uint8_t special_break_map
If set, then submaps in random maps can break the walls.
char meta_comment[MAX_BUF]
Comment we send to the metaserver.
One command line option definition.
const char * mapdir
Where the map files are.
char meta_server[MAX_BUF]
Hostname/ip addr of the metaserver.
struct Settings settings
Global settings.
uint8_t simple_exp
If true, use the simple experience system.
static struct Command_Line_Options options[]
Actual valid command line options.
uint8_t recycle_tmp_maps
Re-use tmp maps.
void init(int argc, char **argv)
This is the main server initialization function.
@ llevError
Problems requiring server admin to fix.
static void init_beforeplay(void)
Called before the server starts listening to connections, processes various dump-related options.
const char * regions
Name of the regions file - libdir is prepended.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
int allow_broken_converters
If set, converters will work even if price of generated item is higher than the price of converted it...
char * log_timestamp_format
Format for timestap, if log_timestamp is set.
uint8_t armor_speed_linear
If 1, speed improvement is linear, else exponantiel.
int8_t mod[NROFATTACKS]
Modification to resistances.
uint8_t resurrection
Ressurection possible w/ permadeth on.
ServerSettings serverSettings
uint8_t set_title
Players can set thier title.
void dump_alchemy_costs(void)
Dumps to output all costs of recipes.
same as sound ncom command like but with extra the client want tick commands so it knows animation timing the client wants to be informed of pickup mode changes Mode will be sent when the player successfully logs and afterward any time the value is but over time
std::vector< std::string > disabled_plugins
List of disabled plugins, 'All' means all.
in that case they will be relative to whatever the PWD of the crossfire server process is You probably shouldn though Notes on Specific motd
uint8_t ignore_plugin_compatibility
If set, don't check plugin version.
uint8_t not_permadeth
If true, death is non-permament.
uint8_t permanent_exp_ratio
How much exp should be 'permenant' and unable to be lost.
uint8_t crypt_mode
0 for legacy behavior, 1 for always Traditional
static void set_datadir(const char *path)
Command line option: set data path.
uint8_t dumpvalues
Set to dump various values/tables.
const char * datadir
Read only data files.
static void load_materials(BufferReader *reader, const char *filename)
Loads the materials.
void init_modules(StartupStage stage)
Init all modules which are not disabled.
static void set_mapdir(const char *path)
Command line option: set map path.
void cleanup(void)
Clean up everything and exit.
static void set_dumpmon7(void)
Command line option: dump alchemy.
void dump_faces(void)
Dump all faces to stderr, for debugging purposes.
@ STARTUP_STAGE_COLLECT_HOOKS
Called when adding collect hooks, before assets loading.
uint32_t worldmaptilesy
Number of tiles high the worldmap is.
#define SHUTDOWN_FILE
If you want to take the game down while installing new versions, or for other reasons,...
static void rec_sighup(int i)
SIGHUP handler.
uint8_t min_name
Minimum characters for an account or player name.
uint32_t worldmapstartx
Starting x tile for the worldmap.
static void list_modules()
List all modules, then exit.
static materialtype_t * get_empty_mat(void)
Creates an empty materialtype_t structure.
static void set_dumpmont(const char *name)
Command line option: dump monster treasures.
void init_ob_methods(void)
Initializes the ob_method system.
static void set_dumpmon6(void)
Command line option: dump races.
uint8_t starting_stat_min
Minimum value of a starting stat.
void citylife_init(Settings *settings, ServerSettings *serverSettings, StartupStage stage)
void read_map_log(void)
Reads temporary maps information from disk.
uint8_t roll_stat_points
How many stat points legacy (rolled) chars start with.
int16_t pk_luck_penalty
Amount by which player luck is reduced if they PK.
#define FREE_AND_COPY_IF(sv, nv)
static void set_mondebug(void)
Command line option: monster debug flag.
@ llevMonster
Many many details.
static void server_dump_animations(void)
Dump all animations, then exit.
static void set_playerdir(const char *path)
Command line option: set player path.
static void signal_shutdown(int signum)
Signal handler that begins a normal server shutdown.
void dump_gods(void)
Prints all gods to stderr.
uint16_t csport
Port for new client/server.
std::vector< materialtype_t * > materials
int ignore_assets_errors
If set then go on running even if there are errors in assets.
the server will also quite happily load unpacked files as long as they have the right file which is convenient if you want to edit your maps and archetypes live It also contains a few like which have hard coded names and are not identified by extension localdir Usually var crossfire Modern systems probably want var lib crossfire instead Contains data that the server does need to live apartment high the contents of player edited etc mapdir Usually maps Always relative to datadir or localdir
void load_races(BufferReader *reader, const char *filename)
Reads the races file in the lib/ directory, then overwrites old 'race' entries.
void init_server(void)
This sets up the listening socket.
static void set_dumpmon2(void)
Command line option: dump abilities.
uint8_t num_args
Number or args it takes.
char meta_host[MAX_BUF]
Hostname of this host.
static void set_dumpmon4(void)
Command line option: dump spells.
int forbid_play(void)
Checks if server should be started.
Plugin animator file specs[Config] name
uint32_t worldmaptilesx
Number of tiles wide the worldmap is.
void dump_races(void)
Dumps all race information to stderr.
int64_t pk_max_experience
Maximum experience one can get for PKing.
const char * cmd_option
How it is called on the command line.
static void server_dump_faces(void)
Dump all faces, then exit.
void init_signals(void)
Setup our signal handlers.
static void parse_args(int argc, char *argv[], int pass)
Parse command line arguments.
uint8_t spell_encumbrance
Encumbrance effects spells.
void init_gods(void)
This takes a look at all of the archetypes to find the objects which correspond to the GODS (type GOD...
int material
What basic type(s) it is linked to.
void dump_experience(void)
Dump the experience table, then calls exit() - useful in terms of debugging to make sure the format o...
uint16_t meta_port
Port number to use for updates.
static module_information modules[]
All built modules.
uint8_t balanced_stat_loss
If true, Death stat depletion based on level etc.
LogLevel debug
Default debugging level.
void init_archetype_pointers(void)
Initialize global archtype pointers:
int pk_max_experience_percent
Percentage of experience of victim the killer gets.
sstring add_refcount(sstring str)
Like add_string(), but the string is already a shared string.
uint8_t death_penalty_ratio
Hhow much exp should be lost at death.
static void set_dumpmon3(void)
Command line option: dump artifacts.
void assets_add_collector_hook(const char *name, collectorHook hook)
void cftimer_init(void)
Initialize timers.
void random_house_generator_close()
Close the module.
void free_races(void)
Frees all race-related information.
uint16_t set_friendly_fire
Percent of damage done by peaceful player vs player damage.
uint8_t account_block_create
const char * motd
Name of the motd file.
const char * logfilename
Logfile to use.
uint32_t worldmapstarty
Starting y tile for the worldmap.
sstring add_string(const char *str)
Share a string.
void free_quest(void)
Free all quest status structures.
void init_readable(void)
Initialize linked lists utilized by message functions in tailor_readable_ob()
static void set_enable_module(const char *name)
Enable a module.
const char * name
Name of the material.
static void set_dumpmon1(void)
Command line option: dump monsters.
int metaserver2_init(void)
Initialize metaserver reporting.
spell prayer lvl t sp speed range duration short description
int armor_weight_reduction
Weight reduction per enchantment.
void random_house_generator_init(Settings *settings, ServerSettings *serverSettings, StartupStage stage)
Module initialisation.
uint8_t stat_loss_on_death
If true, chars lose a random stat when they die.
float item_power_factor
See note in setings file.
static void set_logfile(char *val)
Command line option: set logfile name.
void service_unregister()
const char * dumparg
Additional argument for some dump functions.
void assets_finish_archetypes_for_play()
void dump_spells(void)
Dumps all the spells - now also dumps skill associated with the spell.
const char * confdir
Configuration files.
FILE * logfile
Used by server/daemon.c.
static void set_tmpdir(const char *path)
Command line option: set temporary file path.
void dump_abilities(void)
Dump to standard out the abilities of all monsters.
static void set_uniquedir(const char *path)
Command line option: set unique path.
@ STARTUP_STAGE_BEFORE_SERVER
Called when everything is loaded but before the sockets are opened.
int8_t save[NROFATTACKS]
Save chances for the attacks.
uint8_t death_penalty_level
How many levels worth of exp may be lost on one death.
void fatal(enum fatal_error err)
fatal() is meant to be called whenever a fatal signal is intercepted.
void accounts_load(void)
This loads all the account entries into memory.
static void set_dumpmon9(void)
Command line option: dump alchemy costs.
#define MAX_BUF
Used for all kinds of things.
static void set_confdir(const char *path)
Command line option: set configuration path.
void(* cmdlinefunc_args2)(const char *arg1, const char *arg2)
static void set_dumpmon8(void)
Command line option: dump gods.
const char * playerdir
Where the player files are.
void init_skills(void)
This just sets up the skill_names table above.
uint8_t spell_failure_effects
Nasty backlash to spell failures.
uint8_t starting_stat_points
How many stat points character starts with.
unsigned int meta_on
True if we should send updates.
int allow_denied_spells_writing
If set, players can write spells they can't cast.
void hiscore_init(void)
Initializes the module.
static void set_regions(const char *path)
Command line option: set regions file name.
static int should_exit
If set after command line argument parsing, then the server will exit.
void init_library(void)
It is vital that init_library() is called by any functions using this library.
char who_wiz_format[MAX_BUF]
The format that the who command should use when called by a dm.
void commands_init(void)
Init standard commands.
uint8_t spellpoint_level_depend
Spell costs go up with level.
void dump_quests(void)
Dump all of the quests, then calls exit() - useful in terms of debugging to make sure that quests are...
uint8_t fastclock
If true, clock goes warp 9.
void(* cmdlinefunc_args1)(const char *arg1)
static void mklocaldirs()
Create empty directories in localdir that the server expects to exist (and writes to without checking...
static void free_materials(void)
Frees all memory allocated to materials.
uint8_t personalized_blessings
If 1, blessed weapons get an owner and a willpower value.
void print_monsters(void)
As dump_abilities(), but with an alternative way of output.
static void unset_debug(void)
Command line option: unset debug flag.
void dump_alchemy(void)
Dumps alchemy recipes to output.
bool make_path_to_file(const char *filename)
Recursively creates missing directories in the path to filename until the last directory separator '/...
static void help(void)
Display the command line options and exits.
uint8_t max_stat
Maximum stat value - 255 should be sufficient.
void(* cmdlinefunc_args0)(void)
Typedefs used when calling option handlers.
const char * description
Description, unused.
static void set_debug(void)
Command line option: debug flag.
void load_settings(void)
This loads the settings file.
void close_modules()
Clean up all modules which are not disabled.
void reset_sleep(void)
Initialise all variables used in the timing routines.
int armor_max_enchant
Maximum number of times an armor can be enchanted.
static void set_ignore_assets_errors()
Command line option: ignore assets errors.
void dump_monster_treasure(const char *name)
For debugging purposes.
void dump_animations(void)
Dump all animations to stderr, for debugging purposes.
void add_server_collect_hooks()
uint8_t armor_weight_linear
If 1, weight reduction is linear, else exponantiel.
static void set_dumpmon5(void)
Command line option: ?
int strcasecmp(const char *s1, const char *s2)
static void call_version(void)
Command line option: show version.
static void set_csport(const char *val)
Change the server's port.
uint8_t real_wiz
Use mud-like wizards.
static void init_startup(void)
Checks if starting the server is allowed.
static void set_disable_plugin(const char *name)
Disable a plugin.
static void set_localdir(const char *path)
Command line option: set local path.
void assets_pack(const char *what, const char *filename)
Pack the specified assets in a file.
static void set_disable_module(const char *name)
Disable a module.
void free_server(void)
Frees all memory allocated around here:
uint8_t no_player_stealing
If 1, can not steal from other players.
char * account_trusted_host
Block account creation for untrusted hosts.
uint8_t search_items
Search_items command.
const char * tmpdir
Directory to use for temporary files.
void dump_artifacts(void)
For debugging purposes.
uint8_t always_show_hp
'probe' spell HP bars for all living things (0, 1, or 2)
uint8_t create_home_portals
If 1, can create portals in unique maps (apartments)
static void server_dump_bonuses()
Dump all bonuses (from the stat_bonus file) then exit.
uint8_t pass
What pass this should be processed on.
static void set_syslog(const char *arg)
void cfweather_init(Settings *settings, ServerSettings *serverSettings, StartupStage stage)
Weather module initialisation.
int armor_speed_improvement
Speed improvement.
@ NUM_STATS
Number of statistics.
int log_timestamp
If set, log will comport a timestamp.
char who_format[MAX_BUF]
The format that the who command should use.
static void server_pack_assets(const char *assets, const char *filename)
@ STARTUP_STAGE_FIRST
Dummy stage, don't change, used for logging.
void(* func)()
function to call when we match this.
volatile sig_atomic_t shutdown_flag
@ llevDebug
Only for debugging purposes.
static void do_module(const char *name, bool enabled)
Change the 'enabled' flag of a module.
void cfcitybell_init(Settings *settings, ServerSettings *serverSettings, StartupStage stage)
Citybells module initialisation.
uint8_t starting_stat_max
Maximum value of a starting stat.
const char * uniquedir
Directory for the unique items.
char * bufferreader_next_line(BufferReader *br)
Return the next line in the buffer, as separated by a newline.
const char * localdir
Read/write data files.