This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
server:running_the_server:etc_crossfire_configuration_files [2018/03/01 16:11] karl created |
server:running_the_server:etc_crossfire_configuration_files [2018/03/05 14:36] (current) karl [settings] Add more general information about the entries in the etc/settings file |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== /etc/crossfire Configuration Files Directory ===== | ====== /etc/crossfire Configuration Files Directory ===== | ||
+ | List of files found in the {prefix}/etc/crossfire configuration directory, alphabetically ordered; except for the [[#settings]] file, which is to be found at the bottom due to it's many entries.\\ | ||
+ | FIXME: These config files ought to have some //.CFG// or //.CONF// file_name.extension on day ... :?: | ||
===== ban_file ===== | ===== ban_file ===== | ||
List of client IPs and user names to ban. Probably only useful if the user owns and deploys a dedicated IP. | List of client IPs and user names to ban. Probably only useful if the user owns and deploys a dedicated IP. | ||
+ | Read also about the DM command [[:dm_commands#banish]] . | ||
===== dm_file ===== | ===== dm_file ===== | ||
- | List of NAMES : PASSWORDS : HOSTS for Dungeon Masters. | + | List of NAMES : PASSWORDS : HOSTS for Dungeon Masters. \\ |
+ | Each field accepts the wildcard (*) as __single__ char. \\ | ||
+ | ''*:*:*'' should allow everyone from everywhere to gain [[server:hosting#DM]] status using any password. \\ | ||
+ | The HOST field seems to be a full IPv4 address like ''127.0.0.1'' . | ||
+ | Entries that do __not__ work : | ||
+ | * ''*:*:127*'' to allow anyone from IPv4 address 127.* ( localhost ) | ||
+ | * ''*:*:127.*'' | ||
+ | * ''*:*:127.0.0.*'' | ||
+ | * ''*:*:127.*.*.*'' | ||
+ | * ''*:*:local*'' | ||
+ | * ''*:*:localhost'' | ||
+ | |||
+ | * ''*:*A:*'' to allow anyone from anywhere with a password that matches 'A' at the end | ||
+ | * ''*:A*:*'' to allow anyone from anywhere with a password that matches 'A' at the start | ||
+ | * ''*:A*A:*'' to allow anyone from anywhere with a password that matches 'A' at the start and at the end | ||
+ | |||
+ | * ''A*:*:*'' to allow every user whose player name starts with an 'A' with any passwort from everywhere | ||
+ | * ''*A:*:*'' to allow every user whose player name ends with an 'A' with any passwort from everywhere | ||
+ | * ''A*A:*:*'' to allow every user whose player name ends with an 'A' with any passwort from everywhere | ||
+ | |||
+ | :!: Not sure, when it comes to IPv6 addresses, which are not separated by a dot but by a colon ... | ||
===== exp_table ===== | ===== exp_table ===== | ||
Large comma separated list of numbers to reach levels. The default ends at level 115. Just add some more numbers, and there will be higher levels :?: or delete some zeros at the end of thy numbers, and become a hero very fast. \\ | Large comma separated list of numbers to reach levels. The default ends at level 115. Just add some more numbers, and there will be higher levels :?: or delete some zeros at the end of thy numbers, and become a hero very fast. \\ | ||
Line 12: | Line 35: | ||
===== forbid ===== | ===== forbid ===== | ||
- | Is it a new version of the ban_file ? - NO ! it should be named closing_hours ! \\ | + | :!: This is a very misleading file. It says: |
- | Syntax : ''DAY_NAME HOUR-HOUR'' \\ | + | ># This file lets you limit playing time. Example: |
- | Example : Sat 22-24 \\ | + | >Mon 8-12 |
- | Seems to accept single numbers without the need for HH like '07' . Not sure about midnight ... :?: | + | >msg |
+ | >Playing is forbidden during working hours. | ||
+ | Which would suggest, that players are getting a forced log out and new connections or login requests are denied with a message //msg// . \\ | ||
+ | But instead the [[:server]] will refuse to start if started in times of these entries. Exitcode would be -1 . | ||
+ | In //static void init_startup(void)// in //server/server/init.c// : | ||
+ | <code c> | ||
+ | if (forbid_play()) { /* Maybe showing highscore should be allowed? */ | ||
+ | LOG(llevError, "CrossFire: Playing not allowed.\n"); | ||
+ | exit(-1); | ||
+ | </code> | ||
+ | The function //forbid_play// is to be found in //server/server/server.c// : | ||
+ | <code c> | ||
+ | int forbid_play(void) | ||
+ | #if !defined(_IBMR2) && !defined(___IBMR2) && defined(PERM_FILE) | ||
+ | |||
+ | if (!strncmp (buf, "msg", 3)) { | ||
+ | if (forbit) | ||
+ | while (fgets (buf, MAX_BUF, fp)) /* print message */ | ||
+ | fputs (buf, logfile); | ||
+ | break; | ||
+ | |||
+ | } else if (sscanf (buf, "%s %d%*c%d\n", day, &start, &stop) != 3) { | ||
+ | LOG(llevDebug, "Warning: Incomplete line in permission file ignored.\n"); | ||
+ | continue; | ||
+ | } | ||
+ | |||
+ | for (i=0; i< 7; i++) { | ||
+ | if (!strncmp (buf, days[i], 3) && (tm->tm_wday == i) && | ||
+ | (tm->tm_hour >= start) && (tm->tm_hour < stop)) | ||
+ | forbit = 1; | ||
+ | return forbit; | ||
+ | #else | ||
+ | return 0; | ||
+ | #endif | ||
+ | </code> | ||
+ | This //forbid// file is defined in //server/include/config.h// : #define PERM_FILE "forbid" . \\ | ||
+ | In opposite to the [[:arch:]] and [[:maps:]] files, it does not need an //endmsg// entry. | ||
+ | |||
+ | This forbid file would make "slightly sense" , when playing on a local machine by a script, that launches the [[:server]] and afterwards the [[:client]] to auto-connect to each other (with metaserver-support disabled at compile time) . In that way, parents could hinder their children at least to start-up the server at certain times. It does not interrupt a running server. \\ | ||
+ | FIXME: The server should re-read the //forbid// file each hour like it does for the help files or the [[#dm_file]] when help or the [[:player commands#dm]] commands are invoked. | ||
+ | ===== shutdown ===== | ||
+ | Similar as for the [[#forbid]] file : When the [[:server]] at it's initial start finds that file in it's config folder, then it exits with an exitcode 1 , printing the content of that file . | ||
+ | |||
+ | The code for processing the //shutdown// file is also found in | ||
+ | //init_startup// in //server/server/init.c// : | ||
+ | <code c> | ||
+ | #ifdef SHUTDOWN_FILE | ||
+ | sprintf(buf,"%s/%s",settings.confdir,SHUTDOWN_FILE); | ||
+ | if ((fp = open_and_uncompress(buf, 0, &comp)) != NULL) { | ||
+ | while (fgets(buf, MAX_BUF-1, fp) != NULL) | ||
+ | printf("%s", buf); | ||
+ | close_and_delete(fp, comp); | ||
+ | exit(1); | ||
+ | } | ||
+ | #endif | ||
+ | </code> | ||
+ | The //SHUTDOWN_FILE// variable is by default defined in //server/include/config.h// : #ifndef SHUTDOWN_FILE #define SHUTDOWN_FILE "shutdown" . \\ | ||
+ | It could probably make sense to manually disable the SHUTDOWN_FILE definition before [[:server:server compiling]] . | ||
+ | |||
+ | Example "shutdown" file message : | ||
+ | >Shutdown File for Crossfire 1.10.0 | ||
+ | >Farewell, and have a nice time. | ||
+ | >Bye Bye ... | ||
+ | |||
+ | :!: Here is some kind of abuse possible, by people on a shared machine might just create such a shutdown file, to confuse, anger or trouble other users, who are playing Crossfire regularly on that machine. | ||
===== Informational Files ===== | ===== Informational Files ===== | ||
Send to the client, when the client connects to the server. \\ | Send to the client, when the client connects to the server. \\ | ||
Line 31: | Line 118: | ||
===== settings ===== | ===== settings ===== | ||
- | Large file with around 40 possible entries; probably would need it's own page here on the wiki : [[settings]] . | + | Large file with around 40 possible entries; now has it it's own page here on the wiki : [[settings]] . |
- | - balanced_stat_loss true | + | |
- | - casting_time false | + | Known setting variable names, listed in alphabetical order . |
- | - create_home_portals TRUE | + | //True// and //False// entries are case insensitive read by [[https://linux.die.net/man/3/strcasecmp|strcasecmp]] \\ and may be replaced by their counterparts //On// and //Off// . \\ |
- | - death_penalty_levels 1 | + | Function that processes those : //load_settings// in //server/server/init.c// . \\ |
- | - death_penalty_percentage 10 | + | ''if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false"))'' \\ |
- | - dm_mail monster@monstermail.monster | + | ''if (!strcasecmp(cp,"on") || !strcasecmp(cp,"true"))'' \\ |
- | - dynamiclevel 5 | + | - [[settings#balanced_stat_loss]] TRUE | FALSE |
- | - explore_mode false | + | - [[settings#casting_time]] TRUE | FALSE |
- | - fastclock 0 | + | - [[settings#create_home_portals]] TRUE | FALSE |
- | - item_power_factor 1.0 | + | - [[settings#death_penalty_levels]] Integer 0 - 255 |
- | - log_timestamp TRUE | + | - [[settings#death_penalty_percentage]] Integer 0 - 100 |
- | - log_timestamp_format %y-%m-%d %H:%M:%S | + | - [[settings#dm_mail]] monster@monstermail.master |
- | - metaserver_comment Test server port 11100 | + | - [[settings#dynamiclevel]] Integer 0 | >= 1 ( old : 0 | lesser equal 5 , see [[dev:weather]] ) |
- | - metaserver_host 1.2.3.4 | + | - [[settings#explore_mode]] TRUE | FALSE |
- | - metaserver_notification on | + | - [[settings#fastclock]] Zero (0) or positive integer (1) |
- | - metaserver_port 13326 | + | - [[settings#item_power_factor]] FLOAT >= 0 |
- | - metaserver_server crossfire.real-time.com | + | - [[settings#log_timestamp]] TRUE | FALSE |
- | - motd motd | + | - [[settings#log_timestamp_format]] Default: %y/%m/%d %H:%M:%S Year/Month/Day Hour:Minute:Second |
- | - no_player_stealing TRUE | + | - [[settings#metaserver_comment]] Your comment, ex //Test server port 11111// |
- | - permanent_experience_percentage 96 | + | - [[settings#metaserver_host]] Your.Hostname.Where or your IP |
- | - pk_luck_penalty 10 | + | - [[settings#metaserver_notification]] On | Off |
- | - port 11100 | + | - [[settings#metaserver_port]] Integer 1 - 65535, default 13326 |
- | - real_wiz true | + | - [[settings#metaserver_server]] crossfire.real-time.com |
- | - recycle_tmp_maps false | + | - [[settings#motd]] FILENAME, relative path, of the [[#MOTD|Motto-of-the-Day]] file |
- | - resurrection false | + | - [[settings#no_player_stealing]] TRUE | FALSE |
- | - search_items true | + | - [[settings#permanent_experience_percentage]] Integer 0 - 100 |
- | - set_friendly_fire 5 | + | - [[settings#pk_luck_penalty]] sint16 -100 - 100 |
- | - set_title true | + | - [[settings#port]] Your Port Number, Integer 1 - 65535, since incl. v1.11.0, until at least v1.12 1 - 32765, with a check if user root and below 1024 |
- | - spell_encumbrance true | + | - [[settings#real_wiz]] TRUE | FALSE |
- | - spell_failure_effects true | + | - [[settings#recycle_tmp_maps]] TRUE | FALSE |
- | - spellpoint_level_depend true | + | - [[settings#resurrection]] TRUE | FALSE |
- | - stat_loss_on_death false | + | - [[settings#search_items]] TRUE | FALSE |
- | - who_format %N %T%t%n Level %l Flags %h%d%a%b%n <%M> | + | - [[settings# set_friendly_fire]] Integer 1 - 100 |
- | - who_wiz_format %N %T%t%h%d%b%nLevel %l <%m>(@%i)(%c) | + | - [[settings#set_title]] True | FALSE |
- | - worldmapstartx 100 | + | - [[settings#spell_encumbrance]] TRUE | FALSE |
- | - worldmapstarty 100 | + | - [[settings#spell_failure_effects]] TRUE | FALSE |
- | - worldmaptilesizex 50 | + | - [[settings#spellpoint_level_depend]] TRUE | FALSE |
- | - worldmaptilesizey 50 | + | - [[settings#stat_loss_on_death]] TRUE | FALSE |
- | - worldmaptilesx 30 | + | - [[settings#who_format]] String to print for the player command [[:player_commands#who]] , ex. %N %T%t%n Level %l Flags %h%d%a%b%n <%M> |
- | - worldmaptilesy 30 | + | - [[settings#who_wiz_format]] String to print for the [[:dm_commands|DM]] command [[:player_commands#who]] %N %T%t%h%d%b%nLevel %l <%m>(@%i)(%c) |
+ | - [[settings# worldmapstartx]] Integer >= 0 | ||
+ | - [[settings#worldmapstarty]] Integer >= 0 | ||
+ | - [[settings#worldmaptilesizex]] Integer >= 1 | ||
+ | - [[settings# worldmaptilesizey]] Integer >= 1 | ||
+ | - [[settings#worldmaptilesx]] Integer >= 1 | ||
+ | - [[settings#worldmaptilesy]] Integer >= 1 | ||