Servers.cfg: Difference between revisions
Created page with " <nowiki>DBServer 127.0.0.1 ShardName SCRUBBED UseFakeAuth 1 #AuthServer 127.0.0.1 DefaultAccessLevel 255 NoStats 1 LocalIP 127.0.0.1 MaxPlayers 300 AssertMode Fulldump UseQ..." |
Documented some directives. |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:servers.cfg}} | |||
servers.cfg is the main configuration file for the [[dbserver]]. Other components load the file as well, including the [[launcher]], [[arenaserver]], [[raidserver]], and [[statserver]]. | |||
The directives in the file are used to populate the global ServerCfg configuration. Directive names are also case-insensitive. Lines with a leading {{ms|#}} are ignored. | |||
== Configuration directives == | |||
{{CommandLineTable| | |||
{{CLArg|DBServer <ip>|The IP address of the dbserver. This is used by other components to determine where to connect. ''Can this be a domain?''}} | |||
{{CLArg|DBServer<n> <ip>|Auxiliary dbservers. Launchers can connect to multiple dbservers; more servers are specified as {{ms|DBServer2}}, {{ms|DBServer3}}, etc.}} | |||
{{CLArg|UseFakeAuth <0/1>|Enable fake auth. This lets clients log in directly to the dbserver (with any account) instead of going via an authserver.}} | |||
{{CLArg|AuthServer <ip> <port>|The IP address and port to use when connecting to the authserver.}} | |||
{{CLArg|LocalIp <ips...>|Local IP addresses. If an address matches the top two octets of any address specified here, the dbserver considers it local. ''What is this actually for?''}} | |||
{{CLArg|SqlDbProvider <prov>|The SQL database type. The supported configurations are {{ms|mssql}} and {{ms|postgresql}}, but only MSSQL is properly tested on proper i24.}} | |||
{{CLArg|SqlDbName <db>|The name of the dbserver database. Most common name is {{ms|cohdb}}.}} | |||
{{CLArg|SqlLogin "<connstring>"|The connection string for the database connection. Example: | |||
<pre>"DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YourL33TPASS!;" | |||
</pre>}} | |||
{{CLArg|SqlInit "<query>"|An SQL query to initialize the dbserver database for the first time. If {{ms|SqlDbName}} is {{ms|cohdb}}, this could be: | |||
<pre>"CREATE DATABASE cohdb;"</pre>}} | |||
{{CLArg|SqlAllowDDL <1/0>|Enable or disable the use of DDL for manipulating the database. This is the master switch for all of the related SQL directives. DDL must be enabled in order to perform many operations for altering the database schema. If a required DDL command is not allowed, the server will exit.}} | |||
{{CLArg|SqlAllowAllDDL <1/0>|Same as {{ms|SqlAllowDDL}}.}} | |||
{{CLArg|SqlAddAttributes <1/0>|Allow the {{ms|SqlAddAttributes}} DDL command.}} | |||
{{CLArg|SqlAddColumnOrTable <1/0>|Allow the {{ms|SqlAddColumnOrTable}} DDL command.}} | |||
{{CLArg|SqlDeleteColumnOrTable <1/0>|Allow the {{ms|SqlDeleteColumnOrTable}} DDL command.}} | |||
{{CLArg|SqlRebuildTable <1/0>|Allow the {{ms|SqlRebuildTable}} DDL command. This has the same effect as setting {{ms|SqlAllowDDL}}.}} | |||
{{CLArg|SqlAlterColumn <1/0>|Allow the {{ms|SqlAlterColumn}} DDL command.}} | |||
{{CLArg|DefaultAccessLevel <n>|Set the access level of new characters. This should be 0 for any production system.}} | |||
{{CLArg|LogDir <dir>|Set the log file directory. ''Default?''}} | |||
{{CLArg|AssertMode "<modes>"|Set the behavior of assertion failures. Multiple modes can be specified if the argument is wrapped in quotes. Possible modes are: | |||
{{CommandLineTable| | |||
{{CLArg|Minidump|Create minidumps (.mdmp) on failure.}} | |||
{{CLArg|Fulldump|Create full dumps (.dmp) on failure.}} | |||
{{CLArg|Exit|Exit on failure.}} | |||
{{CLArg|NoTimestamp|Don't name dump files with timestamps.}} | |||
{{CLArg|NoDate|Same as {{ms|NoTimestamp}}.}} | |||
{{CLArg|Zip|Zip the dump files.}} | |||
{{CLArg|Ignore|Enable the ignore button on assertions.}} | |||
}}}} | |||
{{CLArg|MaxPlayers <num>|The maximum number of players that can be connected at any time. The maximum value is AUTH_SIZE_MAX (8191): | |||
<pre> | |||
#define AUTH_SIZE_MAX (((1<<14)/2)-1) //so Auth server treats any number (1<<14) or bigger as being zero. So we're saying that you | |||
//can't have a max size > 1<<13-1 so that you can have 1<<13 available for the queue.</pre>}} | |||
{{CLArg|LoginsPerMinute <num>|''Unsure what this is. It's only used in one place, queueservercomm, so it doesn't actually seem to be a server-side login attempt limiter.''}} | |||
{{CLArg|MinPlayers <num>|''Unsure about this. It's only ever sent to authserver when it queries how many are online, but that code is dead: | |||
<pre> | |||
if (server_cfg.min_players && 0 /*sqlFifoNearFull()*/) | |||
authPutU16(pak,server_cfg.min_players); | |||
else | |||
authPutU16(pak,AUTH_SIZE_MAX+server_cfg.max_players); | |||
</pre>}} | |||
}} | |||
== Example == | |||
<nowiki>DBServer 127.0.0.1 | <nowiki>DBServer 127.0.0.1 | ||
ShardName SCRUBBED | ShardName SCRUBBED |
Revision as of 10:34, 4 May 2019
servers.cfg is the main configuration file for the dbserver. Other components load the file as well, including the launcher, arenaserver, raidserver, and statserver.
The directives in the file are used to populate the global ServerCfg configuration. Directive names are also case-insensitive. Lines with a leading #
are ignored.
Configuration directives
|
The IP address of the dbserver. This is used by other components to determine where to connect. Can this be a domain? | ||||||||||||||
|
Auxiliary dbservers. Launchers can connect to multiple dbservers; more servers are specified as | ||||||||||||||
|
Enable fake auth. This lets clients log in directly to the dbserver (with any account) instead of going via an authserver. | ||||||||||||||
|
The IP address and port to use when connecting to the authserver. | ||||||||||||||
|
Local IP addresses. If an address matches the top two octets of any address specified here, the dbserver considers it local. What is this actually for? | ||||||||||||||
|
The SQL database type. The supported configurations are | ||||||||||||||
|
The name of the dbserver database. Most common name is | ||||||||||||||
|
The connection string for the database connection. Example: "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YourL33TPASS!;" | ||||||||||||||
|
An SQL query to initialize the dbserver database for the first time. If "CREATE DATABASE cohdb;" | ||||||||||||||
|
Enable or disable the use of DDL for manipulating the database. This is the master switch for all of the related SQL directives. DDL must be enabled in order to perform many operations for altering the database schema. If a required DDL command is not allowed, the server will exit. | ||||||||||||||
|
Same as | ||||||||||||||
|
Allow the | ||||||||||||||
|
Allow the | ||||||||||||||
|
Allow the | ||||||||||||||
|
Allow the | ||||||||||||||
|
Allow the | ||||||||||||||
|
Set the access level of new characters. This should be 0 for any production system. | ||||||||||||||
|
Set the log file directory. Default? | ||||||||||||||
|
Set the behavior of assertion failures. Multiple modes can be specified if the argument is wrapped in quotes. Possible modes are:
| ||||||||||||||
|
The maximum number of players that can be connected at any time. The maximum value is AUTH_SIZE_MAX (8191): #define AUTH_SIZE_MAX (((1<<14)/2)-1) //so Auth server treats any number (1<<14) or bigger as being zero. So we're saying that you //can't have a max size > 1<<13-1 so that you can have 1<<13 available for the queue. | ||||||||||||||
|
Unsure what this is. It's only used in one place, queueservercomm, so it doesn't actually seem to be a server-side login attempt limiter. | ||||||||||||||
|
Unsure about this. It's only ever sent to authserver when it queries how many are online, but that code is dead: if (server_cfg.min_players && 0 /*sqlFifoNearFull()*/) authPutU16(pak,server_cfg.min_players); else authPutU16(pak,AUTH_SIZE_MAX+server_cfg.max_players); |
Example
DBServer 127.0.0.1 ShardName SCRUBBED UseFakeAuth 1 #AuthServer 127.0.0.1 DefaultAccessLevel 255 NoStats 1 LocalIP 127.0.0.1 MaxPlayers 300 AssertMode Fulldump UseQueueServer 0 UseLogServer 0 OverrideAuthBit RogueAccess ChatServer 127.0.0.1 KarmaEventHistoryDays 30 MapserverIdleUpkeep 20 MapserverIdleExit 20 FastStart 1 MaxPlayerSlots 1000 MaxDualSlots 1000 AuctionInvMaxLastLoginDays 1000 // BeaconMasterServer 192.168.0.1 RequestBeaconServerCount 0 BeaconRequestCacheDir "c:\beaconrequestcache" DoNotLaunchBeaconClients 1 DoNotLaunchMapserverTSRs 0 AuthnameLimiterEnabled 0 AuthnameLimiterAccessLevel 20 SetLogLevel "Auction" -2 SetLogLevel "Chat" 1 SetLogLevel "Admin" -2 SetLogLevel "Bug" -2 SetLogLevel "CharSlotApply" -2 SetLogLevel "Debug" -2 SetLogLevel "Delete" -2 SetLogLevel "deletion" -2 SetLogLevel "entity" -2 SetLogLevel "Error" -2 SetLogLevel "cheaters" -2 SetLogLevel "MARTY" -2 SetLogLevel "Offline" -2 SetLogLevel "Powers" -2 SetLogLevel "Rewards" -2 SetLogLevel "SuperGroup" -2 SetLogLevel "SystemSpecs" 1 SetLogLevel "sze_rewards" -2 SetLogLevel "turnstile" -2 SetLogLevel "cmds" -2 SetLogLevel "internalcmds" 1 SqlDbProvider mssql SqlDbName coh SqlAllowDDL 1 SqlLogin "Driver={SQL Server Native Client 11.0};server=localhost;database=coh;trusted_connection=Yes;" SqlInit 1