diff options
author | Samuel Barney <samjbarney@gmail.com> | 2013-10-28 23:40:13 +0100 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2013-10-28 23:40:13 +0100 |
commit | d7a490a99205d69abce52c77854fafee52b4e82b (patch) | |
tree | 92e68ff622fc89bd94e11c7ed7fc548ed3129047 /source/Authenticator.cpp | |
parent | Got spiders and other mobs respecting night and day for spawning (diff) | |
parent | ProtoProxy: Implemented 1.7.2 status request / response / ping. (diff) | |
download | cuberite-d7a490a99205d69abce52c77854fafee52b4e82b.tar cuberite-d7a490a99205d69abce52c77854fafee52b4e82b.tar.gz cuberite-d7a490a99205d69abce52c77854fafee52b4e82b.tar.bz2 cuberite-d7a490a99205d69abce52c77854fafee52b4e82b.tar.lz cuberite-d7a490a99205d69abce52c77854fafee52b4e82b.tar.xz cuberite-d7a490a99205d69abce52c77854fafee52b4e82b.tar.zst cuberite-d7a490a99205d69abce52c77854fafee52b4e82b.zip |
Diffstat (limited to 'source/Authenticator.cpp')
-rw-r--r-- | source/Authenticator.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/source/Authenticator.cpp b/source/Authenticator.cpp index a45617f93..e09fd0871 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); @@ -74,7 +67,6 @@ void cAuthenticator::ReadINI(void) if (bSave) { IniFile.SetValueB("Authentication", "Authenticate", m_ShouldAuthenticate); - IniFile.WriteFile(); } } @@ -100,8 +92,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(); } |