diff options
author | Kahrl <kahrl@gmx.net> | 2014-11-10 22:06:24 +0100 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2014-11-10 22:27:10 +0100 |
commit | 0adadba2182e416f768c83804401e2c177307f0a (patch) | |
tree | 087b6256f75331e7dbeb8a32fd42bbd440c25380 /src | |
parent | a1e9732407494edb9cef3ada45cc2781a34ed60c (diff) | |
download | minetest-0adadba2182e416f768c83804401e2c177307f0a.tar.gz minetest-0adadba2182e416f768c83804401e2c177307f0a.tar.bz2 minetest-0adadba2182e416f768c83804401e2c177307f0a.zip |
Serverlist: announce mg_name from map_meta.txt instead of minetest.conf
Diffstat (limited to 'src')
-rw-r--r-- | src/server.cpp | 1 | ||||
-rw-r--r-- | src/serverlist.cpp | 3 | ||||
-rw-r--r-- | src/serverlist.h | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp index 7be1f5860..2694f1bbe 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -687,6 +687,7 @@ void Server::AsyncRunStep(bool initial_step) m_env->getGameTime(), m_lag, m_gamespec.id, + m_emerge->params.mg_name, m_mods); counter = 0.01; } diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 4d770a1c2..65c75fec2 100644 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -194,6 +194,7 @@ void sendAnnounce(const std::string &action, const u32 game_time, const float lag, const std::string &gameid, + const std::string &mg_name, const std::vector<ModSpec> &mods) { Json::Value server; @@ -227,7 +228,7 @@ void sendAnnounce(const std::string &action, if (action == "start") { server["dedicated"] = g_settings->getBool("server_dedicated"); server["rollback"] = g_settings->getBool("enable_rollback_recording"); - server["mapgen"] = g_settings->get("mg_name"); + server["mapgen"] = mg_name; server["privs"] = g_settings->get("default_privs"); server["can_see_far_names"] = g_settings->getS16("player_transfer_distance") <= 0; server["mods"] = Json::Value(Json::arrayValue); diff --git a/src/serverlist.h b/src/serverlist.h index aa3f1d610..7a7461ebd 100644 --- a/src/serverlist.h +++ b/src/serverlist.h @@ -42,6 +42,7 @@ namespace ServerList const std::vector<std::string> &clients_names = std::vector<std::string>(), const double uptime = 0, const u32 game_time = 0, const float lag = 0, const std::string &gameid = "", + const std::string &mg_name = "", const std::vector<ModSpec> &mods = std::vector<ModSpec>()); #endif } // ServerList namespace |