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/Server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Server.cpp') diff --git a/src/Server.cpp b/src/Server.cpp index 62f6ba35a..8e5755a75 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -196,7 +196,7 @@ void cServer::PlayerDestroying(const cPlayer * a_Player) -bool cServer::InitServer(cIniFile & a_SettingsIni) +bool cServer::InitServer(cIniFile & a_SettingsIni, bool a_ShouldAuth) { m_Description = a_SettingsIni.GetValueSet("Server", "Description", "MCServer - in C++!"); m_MaxPlayers = a_SettingsIni.GetValueSetI("Server", "MaxPlayers", 100); @@ -247,7 +247,7 @@ bool cServer::InitServer(cIniFile & a_SettingsIni) m_bIsConnected = true; m_ServerID = "-"; - m_ShouldAuthenticate = a_SettingsIni.GetValueSetB("Authentication", "Authenticate", true); + m_ShouldAuthenticate = a_ShouldAuth; if (m_ShouldAuthenticate) { MTRand mtrand1; -- cgit v1.2.3