diff options
| author | Stefan Boberg <[email protected]> | 2021-06-21 11:07:55 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-06-21 11:07:55 +0200 |
| commit | dd00d3dbd4b53d23cee616dd3b8771d38d403cbd (patch) | |
| tree | 6ba8313d867efd278d0dc786d6af5567ba39fb71 /zenserver/config.cpp | |
| parent | clang-format only (diff) | |
| download | zen-dd00d3dbd4b53d23cee616dd3b8771d38d403cbd.tar.xz zen-dd00d3dbd4b53d23cee616dd3b8771d38d403cbd.zip | |
Made some changes to how mesh config works
Diffstat (limited to 'zenserver/config.cpp')
| -rw-r--r-- | zenserver/config.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp index 027427528..588f3ddd1 100644 --- a/zenserver/config.cpp +++ b/zenserver/config.cpp @@ -56,7 +56,7 @@ PickDefaultStateDirectory() #endif void -ParseGlobalCliOptions(int argc, char* argv[], ZenServerOptions& GlobalOptions) +ParseGlobalCliOptions(int argc, char* argv[], ZenServerOptions& GlobalOptions, ZenServiceConfig& ServiceConfig) { cxxopts::Options options("zenserver", "Zen Server"); options.add_options()("d, debug", "Enable debugging", cxxopts::value<bool>(GlobalOptions.IsDebug)->default_value("false")); @@ -81,6 +81,13 @@ ParseGlobalCliOptions(int argc, char* argv[], ZenServerOptions& GlobalOptions) cxxopts::value<int>(GlobalOptions.BasePort)->default_value("1337"), "<port number>"); + options.add_option("network", + "m", + "mesh", + "Enable mesh network", + cxxopts::value<bool>(ServiceConfig.MeshEnabled)->default_value("true"), + ""); + try { auto result = options.parse(argc, argv); @@ -153,5 +160,6 @@ ParseServiceConfig(const std::filesystem::path& DataRoot, ZenServiceConfig& Serv ServiceConfig.LegacyCacheEnabled = lua["legacycache"]["enable"]; const std::string path = lua["legacycache"]["readpath"]; ServiceConfig.StructuredCacheEnabled = lua["structuredcache"]["enable"]; + ServiceConfig.MeshEnabled = lua["mesh"]["enable"]; } } |