summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-17 13:57:18 +0200
committerMattes D <github@xoft.cz>2014-10-17 13:57:18 +0200
commit687752241f97599c932ab30da449d7b9dec632c4 (patch)
tree253843f8f45b7e3719324ed72dd31977984d663f /src/Protocol
parentLuaChunkStay: Fixed a crash on unused callback. (diff)
downloadcuberite-687752241f97599c932ab30da449d7b9dec632c4.tar
cuberite-687752241f97599c932ab30da449d7b9dec632c4.tar.gz
cuberite-687752241f97599c932ab30da449d7b9dec632c4.tar.bz2
cuberite-687752241f97599c932ab30da449d7b9dec632c4.tar.lz
cuberite-687752241f97599c932ab30da449d7b9dec632c4.tar.xz
cuberite-687752241f97599c932ab30da449d7b9dec632c4.tar.zst
cuberite-687752241f97599c932ab30da449d7b9dec632c4.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/MojangAPI.cpp7
-rw-r--r--src/Protocol/MojangAPI.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/Protocol/MojangAPI.cpp b/src/Protocol/MojangAPI.cpp
index 0a6716e6f..a4b4dbd3b 100644
--- a/src/Protocol/MojangAPI.cpp
+++ b/src/Protocol/MojangAPI.cpp
@@ -214,14 +214,17 @@ cMojangAPI::~cMojangAPI()
-void cMojangAPI::Start(cIniFile & a_SettingsIni)
+void cMojangAPI::Start(cIniFile & a_SettingsIni, bool a_ShouldAuth)
{
m_NameToUUIDServer = a_SettingsIni.GetValueSet("MojangAPI", "NameToUUIDServer", DEFAULT_NAME_TO_UUID_SERVER);
m_NameToUUIDAddress = a_SettingsIni.GetValueSet("MojangAPI", "NameToUUIDAddress", DEFAULT_NAME_TO_UUID_ADDRESS);
m_UUIDToProfileServer = a_SettingsIni.GetValueSet("MojangAPI", "UUIDToProfileServer", DEFAULT_UUID_TO_PROFILE_SERVER);
m_UUIDToProfileAddress = a_SettingsIni.GetValueSet("MojangAPI", "UUIDToProfileAddress", DEFAULT_UUID_TO_PROFILE_ADDRESS);
LoadCachesFromDisk();
- m_UpdateThread->Start();
+ if (a_ShouldAuth)
+ {
+ m_UpdateThread->Start();
+ }
}
diff --git a/src/Protocol/MojangAPI.h b/src/Protocol/MojangAPI.h
index fa4c16e4e..393fd4baa 100644
--- a/src/Protocol/MojangAPI.h
+++ b/src/Protocol/MojangAPI.h
@@ -38,7 +38,7 @@ public:
/** Initializes the API; reads the settings from the specified ini file.
Loads cached results from disk. */
- void Start(cIniFile & a_SettingsIni);
+ void Start(cIniFile & a_SettingsIni, bool a_ShouldAuth);
/** Connects to the specified server using SSL, sends the given request and receives the response.
Checks Mojang certificates using the hard-coded Starfield root CA certificate.