summaryrefslogtreecommitdiff
path: root/src/server/authserver/Main.cpp
diff options
context:
space:
mode:
authorYehonal <hw.2@hotmail.it>2016-07-30 18:14:38 +0200
committerYehonal <yehonal.azeroth@gmail.com>2016-08-07 12:24:19 +0200
commit2ca258e179ca9ff65d0fc28b16e28b1eb72e5a86 (patch)
tree1d357a5df49494737080c9b7295be102e5edc8ca /src/server/authserver/Main.cpp
parent648163a2e04fa29aeb8230a801760dede250d5b8 (diff)
[CORE] implemented multiple configuration files loading
currently it's used to load the default [auth|world]server.conf.dist but you can use sConfigMgr->LoadMore to load your custom config in your modules to add/overwrite properties
Diffstat (limited to 'src/server/authserver/Main.cpp')
-rw-r--r--src/server/authserver/Main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index ae0fcc9f95..7cd3f00a27 100644
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
@@ -104,7 +104,15 @@ extern int main(int argc, char** argv)
++count;
}
- if (!sConfigMgr->LoadInitial(configFile))
+ std::string cfg_def_file=_TRINITY_REALM_CONFIG;
+ cfg_def_file += ".dist";
+
+ if (!sConfigMgr->LoadInitial(cfg_def_file.c_str())) {
+ printf("Invalid or missing default configuration file : %s\n", cfg_def_file.c_str());
+ return 1;
+ }
+
+ if (!sConfigMgr->LoadMore(configFile))
{
printf("Invalid or missing configuration file : %s\n", configFile);
printf("Verify that the file exists and has \'[authserver]\' written in the top of the file!\n");