]> git.lizzy.rs Git - minetest.git/blobdiff - src/serverlist.cpp
Drop luaentity_common.h which is not included anywhere
[minetest.git] / src / serverlist.cpp
index a3353340eeb232e1eb9d8f241e9386d773f7b94b..6e79b55a4daa3d043a646134f9b650a14266b45d 100644 (file)
@@ -17,12 +17,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
+#include <fstream>
 #include <iostream>
 #include <sstream>
 #include <algorithm>
 
 #include "version.h"
-#include "main.h" // for g_settings
 #include "settings.h"
 #include "serverlist.h"
 #include "filesys.h"
@@ -165,7 +165,7 @@ const std::string serialize(const std::vector<ServerListSpec> &serverlist)
        std::string liststring;
        for (std::vector<ServerListSpec>::const_iterator it = serverlist.begin();
                        it != serverlist.end();
-                       it++) {
+                       ++it) {
                liststring += "[server]\n";
                liststring += (*it)["name"].asString() + '\n';
                liststring += (*it)["address"].asString() + '\n';
@@ -182,7 +182,7 @@ const std::string serializeJson(const std::vector<ServerListSpec> &serverlist)
        Json::Value list(Json::arrayValue);
        for (std::vector<ServerListSpec>::const_iterator it = serverlist.begin();
                        it != serverlist.end();
-                       it++) {
+                       ++it) {
                list.append(*it);
        }
        root["list"] = list;
@@ -212,7 +212,7 @@ void sendAnnounce(const std::string &action,
                bool strict_checking = g_settings->getBool("strict_protocol_version_checking");
                server["name"]         = g_settings->get("server_name");
                server["description"]  = g_settings->get("server_description");
-               server["version"]      = minetest_version_simple;
+               server["version"]      = g_version_string;
                server["proto_min"]    = strict_checking ? LATEST_PROTOCOL_VERSION : SERVER_PROTOCOL_VERSION_MIN;
                server["proto_max"]    = strict_checking ? LATEST_PROTOCOL_VERSION : SERVER_PROTOCOL_VERSION_MAX;
                server["url"]          = g_settings->get("server_url");