Merge branch 'master' into PreventNewWarnings
Conflicts: src/Blocks/BlockLeaves.h
This commit is contained in:
@@ -40,11 +40,11 @@ cAuthenticator::~cAuthenticator()
|
||||
|
||||
|
||||
|
||||
void cAuthenticator::ReadINI(cIniFile & IniFile)
|
||||
void cAuthenticator::ReadSettings(cSettingsRepositoryInterface & a_Settings)
|
||||
{
|
||||
m_Server = IniFile.GetValueSet ("Authentication", "Server", DEFAULT_AUTH_SERVER);
|
||||
m_Address = IniFile.GetValueSet ("Authentication", "Address", DEFAULT_AUTH_ADDRESS);
|
||||
m_ShouldAuthenticate = IniFile.GetValueSetB("Authentication", "Authenticate", true);
|
||||
m_Server = a_Settings.GetValueSet ("Authentication", "Server", DEFAULT_AUTH_SERVER);
|
||||
m_Address = a_Settings.GetValueSet ("Authentication", "Address", DEFAULT_AUTH_ADDRESS);
|
||||
m_ShouldAuthenticate = a_Settings.GetValueSetB("Authentication", "Authenticate", true);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,9 +69,9 @@ void cAuthenticator::Authenticate(int a_ClientID, const AString & a_UserName, co
|
||||
|
||||
|
||||
|
||||
void cAuthenticator::Start(cIniFile & IniFile)
|
||||
void cAuthenticator::Start(cSettingsRepositoryInterface & a_Settings)
|
||||
{
|
||||
ReadINI(IniFile);
|
||||
ReadSettings(a_Settings);
|
||||
m_ShouldTerminate = false;
|
||||
super::Start();
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "../OSSupport/IsThread.h"
|
||||
|
||||
|
||||
class cSettingsRepositoryInterface;
|
||||
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ public:
|
||||
~cAuthenticator();
|
||||
|
||||
/** (Re-)read server and address from INI: */
|
||||
void ReadINI(cIniFile & IniFile);
|
||||
void ReadSettings(cSettingsRepositoryInterface & a_Settings);
|
||||
|
||||
/** Queues a request for authenticating a user. If the auth fails, the user will be kicked */
|
||||
void Authenticate(int a_ClientID, const AString & a_UserName, const AString & a_ServerHash);
|
||||
|
||||
/** Starts the authenticator thread. The thread may be started and stopped repeatedly */
|
||||
void Start(cIniFile & IniFile);
|
||||
void Start(cSettingsRepositoryInterface & a_Settings);
|
||||
|
||||
/** Stops the authenticator thread. The thread may be started and stopped repeatedly */
|
||||
void Stop(void);
|
||||
|
||||
@@ -226,12 +226,12 @@ cMojangAPI::~cMojangAPI()
|
||||
|
||||
|
||||
|
||||
void cMojangAPI::Start(cIniFile & a_SettingsIni, bool a_ShouldAuth)
|
||||
void cMojangAPI::Start(cSettingsRepositoryInterface & a_Settings, 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);
|
||||
m_NameToUUIDServer = a_Settings.GetValueSet("MojangAPI", "NameToUUIDServer", DEFAULT_NAME_TO_UUID_SERVER);
|
||||
m_NameToUUIDAddress = a_Settings.GetValueSet("MojangAPI", "NameToUUIDAddress", DEFAULT_NAME_TO_UUID_ADDRESS);
|
||||
m_UUIDToProfileServer = a_Settings.GetValueSet("MojangAPI", "UUIDToProfileServer", DEFAULT_UUID_TO_PROFILE_SERVER);
|
||||
m_UUIDToProfileAddress = a_Settings.GetValueSet("MojangAPI", "UUIDToProfileAddress", DEFAULT_UUID_TO_PROFILE_ADDRESS);
|
||||
LoadCachesFromDisk();
|
||||
if (a_ShouldAuth)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Json
|
||||
|
||||
|
||||
|
||||
|
||||
class cSettingsRepositoryInterface;
|
||||
|
||||
// tolua_begin
|
||||
class cMojangAPI
|
||||
@@ -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, bool a_ShouldAuth);
|
||||
void Start(cSettingsRepositoryInterface & a_Settings, 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.
|
||||
|
||||
Reference in New Issue
Block a user