From dd00d3dbd4b53d23cee616dd3b8771d38d403cbd Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 21 Jun 2021 11:07:55 +0200 Subject: Made some changes to how mesh config works --- zenserver/config.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'zenserver/config.cpp') 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(GlobalOptions.IsDebug)->default_value("false")); @@ -81,6 +81,13 @@ ParseGlobalCliOptions(int argc, char* argv[], ZenServerOptions& GlobalOptions) cxxopts::value(GlobalOptions.BasePort)->default_value("1337"), ""); + options.add_option("network", + "m", + "mesh", + "Enable mesh network", + cxxopts::value(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"]; } } -- cgit v1.2.3