summaryrefslogtreecommitdiffstats
path: root/source/Authenticator.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-10-26 17:08:28 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2013-10-26 17:08:28 +0200
commit77661f4c594190ff93de4924d62aaac9e112e8a2 (patch)
treec33b45332ea90dd706d13ca9b1daf847a56c22e6 /source/Authenticator.cpp
parentAPIDump: Documented cMonster. (diff)
downloadcuberite-77661f4c594190ff93de4924d62aaac9e112e8a2.tar
cuberite-77661f4c594190ff93de4924d62aaac9e112e8a2.tar.gz
cuberite-77661f4c594190ff93de4924d62aaac9e112e8a2.tar.bz2
cuberite-77661f4c594190ff93de4924d62aaac9e112e8a2.tar.lz
cuberite-77661f4c594190ff93de4924d62aaac9e112e8a2.tar.xz
cuberite-77661f4c594190ff93de4924d62aaac9e112e8a2.tar.zst
cuberite-77661f4c594190ff93de4924d62aaac9e112e8a2.zip
Diffstat (limited to '')
-rw-r--r--source/Authenticator.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/Authenticator.cpp b/source/Authenticator.cpp
index a45617f93..a8aad524f 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("settings.ini");
- if (!IniFile.ReadFile())
- {
- 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();
}