Initialize world before creating BanManager and RollbackManager
authorShadowNinja <shadowninja@minetest.net>
Mon, 30 Dec 2013 19:29:33 +0000 (14:29 -0500)
committerShadowNinja <shadowninja@minetest.net>
Mon, 30 Dec 2013 19:29:33 +0000 (14:29 -0500)
src/server.cpp

index c1cedf0f39297f41dc0114916a7f5eec08d36fc6..09c2ca6634c5e92d3558e21a11f904f7bfc44f78 100644 (file)
@@ -703,6 +703,10 @@ Server::Server(
        // Create emerge manager
        m_emerge = new EmergeManager(this);
 
+       // Create world if it doesn't exist
+       if(!initializeWorld(m_path_world, m_gamespec.id))
+               throw ServerError("Failed to initialize world");
+
        // Create ban manager
        std::string ban_path = m_path_world+DIR_DELIM+"ipban.txt";
        m_banmanager = new BanManager(ban_path);
@@ -711,10 +715,6 @@ Server::Server(
        std::string rollback_path = m_path_world+DIR_DELIM+"rollback.txt";
        m_rollback = createRollbackManager(rollback_path, this);
 
-       // Create world if it doesn't exist
-       if(!initializeWorld(m_path_world, m_gamespec.id))
-               throw ServerError("Failed to initialize world");
-
        ModConfiguration modconf(m_path_world);
        m_mods = modconf.getMods();
        std::vector<ModSpec> unsatisfied_mods = modconf.getUnsatisfiedMods();