aboutsummaryrefslogtreecommitdiff
path: root/zenserver/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/config.cpp')
-rw-r--r--zenserver/config.cpp10
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"];
}
}