From: ShadowNinja Date: Mon, 30 Dec 2013 19:29:33 +0000 (-0500) Subject: Initialize world before creating BanManager and RollbackManager X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=2902a29c2d5cc54f1a5623613e91ddecc7fee2a2;p=zefram%2Fminetest%2Fminetest_engine.git Initialize world before creating BanManager and RollbackManager --- diff --git a/src/server.cpp b/src/server.cpp index c1cedf0f..09c2ca66 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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 unsatisfied_mods = modconf.getUnsatisfiedMods();