Skip to content

Commit c62ebf6

Browse files
jackpozfunjoker
authored andcommitted
Core/Misc: Add console option to update databases only
Add "--update-databases-only" console argument to stop worldserver execution after having updated all databases (if specified in config file) (cherry picked from commit 92bf5b1)
1 parent e428623 commit c62ebf6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/server/worldserver/Main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ extern int main(int argc, char** argv)
221221
if (!StartDB())
222222
return 1;
223223

224+
if (vm.count("update-databases-only"))
225+
return 0;
226+
224227
std::shared_ptr<void> dbHandle(nullptr, [](void*) { StopDB(); });
225228

226229
// Set server offline (not connectable)
@@ -641,6 +644,7 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile, s
641644
("version,v", "print version build info")
642645
("config,c", value<fs::path>(&configFile)->default_value(fs::absolute(_TRINITY_CORE_CONFIG)),
643646
"use <arg> as configuration file")
647+
("update-databases-only,u", "updates databases only")
644648
;
645649
#ifdef _WIN32
646650
options_description win("Windows platform specific options");

0 commit comments

Comments
 (0)