fix configfile
This commit is contained in:
+5
-2
@@ -34,6 +34,9 @@
|
||||
#include "server.h"
|
||||
#include "plugin.h"
|
||||
|
||||
#define DEFAULT_CONFIG "hlswmaster.conf"
|
||||
#define DEFAULT_LOGFILE "hlswmaster.log"
|
||||
|
||||
static struct option opts[] = {
|
||||
{"config", 1, 0, 'c'},
|
||||
{"user", 1, 0, 'u'},
|
||||
@@ -45,7 +48,7 @@ static struct option opts[] = {
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int arg = 0, code = 0, debug = 0;
|
||||
char *config = NULL, *user = NULL, *logfile;
|
||||
char *config = DEFAULT_CONFIG, *user = NULL, *logfile;
|
||||
|
||||
while (code != -1) {
|
||||
code = getopt_long(argc, argv, "c:u:dh", opts, &arg);
|
||||
@@ -102,7 +105,7 @@ int main(int argc, char *argv[])
|
||||
exit(-1);
|
||||
|
||||
/* check logfile */
|
||||
logfile = config_get_string("global", "logfile", "hlswmaster.log");
|
||||
logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
|
||||
if (logfile && !debug) {
|
||||
/* start logging */
|
||||
if (!log_init(logfile))
|
||||
|
||||
+7
-7
@@ -1,18 +1,18 @@
|
||||
[global]
|
||||
## broadcast scan source IP & PORT (udp)
|
||||
#scanner_src 0.0.0.0:7130
|
||||
scanner_src 0.0.0.0:7130
|
||||
|
||||
## broadcast scan every X seconds
|
||||
#scan_interval 60
|
||||
scan_interval 60
|
||||
|
||||
## serverlist rebuild every X seconds
|
||||
#serverlist_refresh 5
|
||||
serverlist_refresh 5
|
||||
|
||||
## server timeout after X seconds
|
||||
#serverlist_timeout 180
|
||||
serverlist_timeout 180
|
||||
|
||||
## master answers with this source IP
|
||||
#master_src 0.0.0.0:7140
|
||||
master_src 0.0.0.0:7140
|
||||
|
||||
plugin_dir plugins
|
||||
plugin d3engine.so
|
||||
@@ -25,11 +25,11 @@ plugin quake2.so
|
||||
plugin ut2k4.so
|
||||
|
||||
## logging
|
||||
#logfile hlswmaster.log
|
||||
logfile hlswmaster.log
|
||||
|
||||
[gamespy1]
|
||||
## internal fragment-list timeout
|
||||
#gc_timeout 90
|
||||
gc_timeout 90
|
||||
|
||||
[hlswproxy]
|
||||
## ask these hlswmasters
|
||||
|
||||
Reference in New Issue
Block a user