summaryrefslogtreecommitdiffstats
path: root/source/Authenticator.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-27 09:04:39 +0100
committermadmaxoft <github@xoft.cz>2013-10-27 09:04:39 +0100
commitf032a2ff742f408a0400b4267ab67d6dae86ead2 (patch)
treee1e6d9233fa8354d4ef0dc4666f4e4ddc90d3880 /source/Authenticator.cpp
parentAPIDump: Documented cPickup. (diff)
parentChanged "cIniFile IniFile" to cIniFile & IniFile" (diff)
downloadcuberite-f032a2ff742f408a0400b4267ab67d6dae86ead2.tar
cuberite-f032a2ff742f408a0400b4267ab67d6dae86ead2.tar.gz
cuberite-f032a2ff742f408a0400b4267ab67d6dae86ead2.tar.bz2
cuberite-f032a2ff742f408a0400b4267ab67d6dae86ead2.tar.lz
cuberite-f032a2ff742f408a0400b4267ab67d6dae86ead2.tar.xz
cuberite-f032a2ff742f408a0400b4267ab67d6dae86ead2.tar.zst
cuberite-f032a2ff742f408a0400b4267ab67d6dae86ead2.zip
Diffstat (limited to 'source/Authenticator.cpp')
-rw-r--r--source/Authenticator.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/Authenticator.cpp b/source/Authenticator.cpp
index d7e05b4c2..a32e9ce8f 100644
--- a/source/Authenticator.cpp
+++ b/source/Authenticator.cpp
@@ -28,7 +28,6 @@ cAuthenticator::cAuthenticator(void) :
m_Address(DEFAULT_AUTH_ADDRESS),
m_ShouldAuthenticate(true)
{
- ReadINI();
}
@@ -45,14 +44,8 @@ cAuthenticator::~cAuthenticator()
/// Read custom values from INI
-void cAuthenticator::ReadINI(void)
+void cAuthenticator::ReadINI(cIniFile & IniFile)
{
- cIniFile IniFile;
- if (!IniFile.ReadFile("settings.ini"))
- {
- return;
- }
-
m_Server = IniFile.GetValue("Authentication", "Server");
m_Address = IniFile.GetValue("Authentication", "Address");
m_ShouldAuthenticate = IniFile.GetValueB("Authentication", "Authenticate", true);
@@ -100,8 +93,9 @@ void cAuthenticator::Authenticate(int a_ClientID, const AString & a_UserName, co
-void cAuthenticator::Start(void)
+void cAuthenticator::Start(cIniFile & IniFile)
{
+ ReadINI(IniFile);
m_ShouldTerminate = false;
super::Start();
}