diff options
| author | Yehonal <hw.2@hotmail.it> | 2016-07-30 18:14:38 +0200 |
|---|---|---|
| committer | Yehonal <yehonal.azeroth@gmail.com> | 2016-08-07 12:24:19 +0200 |
| commit | 2ca258e179ca9ff65d0fc28b16e28b1eb72e5a86 (patch) | |
| tree | 1d357a5df49494737080c9b7295be102e5edc8ca /src/server/worldserver/Main.cpp | |
| parent | 648163a2e04fa29aeb8230a801760dede250d5b8 (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/worldserver/Main.cpp')
| -rw-r--r-- | src/server/worldserver/Main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 0a00f1d1b7..2ce34822f9 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -125,12 +125,21 @@ extern int main(int argc, char** argv) ++c; } - if (!sConfigMgr->LoadInitial(cfg_file)) + std::string cfg_def_file=_TRINITY_CORE_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(cfg_file)) { printf("Invalid or missing configuration file : %s\n", cfg_file); printf("Verify that the file exists and has \'[worldserver]' written in the top of the file!\n"); return 1; } + sLog->outString("Using configuration file %s.", cfg_file); sLog->outString("Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); |
