From ee07c3f7cf638e854518d2cfcb9c11a64412cc72 Mon Sep 17 00:00:00 2001 From: proller Date: Fri, 22 Feb 2013 02:00:44 +0400 Subject: new auto masterserver --- src/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 968dc8d60..fd3643e60 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1095,6 +1095,7 @@ int main(int argc, char *argv[]) #else bool run_dedicated_server = cmd_args.getFlag("server"); #endif + g_settings->set("server_dedicated", run_dedicated_server ? "true" : "false"); if(run_dedicated_server) { DSTACK("Dedicated server branch"); @@ -1593,6 +1594,7 @@ int main(int argc, char *argv[]) g_settings->set("creative_mode", itos(menudata.creative_mode)); g_settings->set("enable_damage", itos(menudata.enable_damage)); + g_settings->set("server_announce", itos(menudata.enable_public)); g_settings->set("name", playername); g_settings->set("address", address); g_settings->set("port", itos(port)); @@ -1619,10 +1621,10 @@ int main(int argc, char *argv[]) else if (address != "") { ServerListSpec server; - server.name = menudata.servername; - server.address = wide_to_narrow(menudata.address); - server.port = wide_to_narrow(menudata.port); - server.description = menudata.serverdescription; + server["name"] = menudata.servername; + server["address"] = wide_to_narrow(menudata.address); + server["port"] = wide_to_narrow(menudata.port); + server["description"] = menudata.serverdescription; ServerList::insert(server); } -- cgit v1.2.3