From 687752241f97599c932ab30da449d7b9dec632c4 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 17 Oct 2014 13:57:18 +0200 Subject: cMojangAPI: Don't update data if server is in offline mode. --- src/Root.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Root.cpp') diff --git a/src/Root.cpp b/src/Root.cpp index aa3d43cba..2d08c2c70 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -142,8 +142,9 @@ void cRoot::Start(void) } LOG("Starting server..."); - m_MojangAPI.Start(IniFile); // Mojang API needs to be started before plugins, so that plugins may use it for DB upgrades on server init - if (!m_Server->InitServer(IniFile)) + bool ShouldAuthenticate = IniFile.GetValueSetB("Authentication", "Authenticate", true); + m_MojangAPI.Start(IniFile, ShouldAuthenticate); // Mojang API needs to be started before plugins, so that plugins may use it for DB upgrades on server init + if (!m_Server->InitServer(IniFile, ShouldAuthenticate)) { IniFile.WriteFile("settings.ini"); LOGERROR("Failure starting server, aborting..."); -- cgit v1.2.3 From eb821ff240fabab6666705bd767e334c5220027a Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 18 Oct 2014 19:55:01 +0100 Subject: Fixed failure for cRankManager to restart --- src/Root.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Root.cpp') diff --git a/src/Root.cpp b/src/Root.cpp index aa3d43cba..b866e2369 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -154,7 +154,8 @@ void cRoot::Start(void) m_WebAdmin->Init(); LOGD("Loading settings..."); - m_RankManager.Initialize(m_MojangAPI); + m_RankManager = new cRankManager(); + m_RankManager->Initialize(m_MojangAPI); m_CraftingRecipes = new cCraftingRecipes; m_FurnaceRecipe = new cFurnaceRecipe(); -- cgit v1.2.3