summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-10-26 19:47:12 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2013-10-26 19:47:12 +0200
commitcb06f35cb80c2162c3b1e9e329fc81b5d8b417da (patch)
treec0722d1541aa82e59f59d5c4f74ba9f5d2584b95
parentBoth the LoadWorlds() function and cAuthenticator now use the cIniFile object from the Root::Start() function. (diff)
downloadcuberite-cb06f35cb80c2162c3b1e9e329fc81b5d8b417da.tar
cuberite-cb06f35cb80c2162c3b1e9e329fc81b5d8b417da.tar.gz
cuberite-cb06f35cb80c2162c3b1e9e329fc81b5d8b417da.tar.bz2
cuberite-cb06f35cb80c2162c3b1e9e329fc81b5d8b417da.tar.lz
cuberite-cb06f35cb80c2162c3b1e9e329fc81b5d8b417da.tar.xz
cuberite-cb06f35cb80c2162c3b1e9e329fc81b5d8b417da.tar.zst
cuberite-cb06f35cb80c2162c3b1e9e329fc81b5d8b417da.zip
-rw-r--r--source/Authenticator.cpp4
-rw-r--r--source/Authenticator.h4
-rw-r--r--source/Root.cpp2
-rw-r--r--source/Root.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/source/Authenticator.cpp b/source/Authenticator.cpp
index a8aad524f..368431010 100644
--- a/source/Authenticator.cpp
+++ b/source/Authenticator.cpp
@@ -44,7 +44,7 @@ cAuthenticator::~cAuthenticator()
/// Read custom values from INI
-void cAuthenticator::ReadINI(cIniFile IniFile)
+void cAuthenticator::ReadINI(cIniFile & IniFile)
{
m_Server = IniFile.GetValue("Authentication", "Server");
m_Address = IniFile.GetValue("Authentication", "Address");
@@ -93,7 +93,7 @@ void cAuthenticator::Authenticate(int a_ClientID, const AString & a_UserName, co
-void cAuthenticator::Start(cIniFile IniFile)
+void cAuthenticator::Start(cIniFile & IniFile)
{
ReadINI(IniFile);
m_ShouldTerminate = false;
diff --git a/source/Authenticator.h b/source/Authenticator.h
index 9c7c57e6d..02cd6f4c5 100644
--- a/source/Authenticator.h
+++ b/source/Authenticator.h
@@ -37,13 +37,13 @@ public:
~cAuthenticator();
/// (Re-)read server and address from INI:
- void ReadINI(cIniFile IniFile);
+ void ReadINI(cIniFile & IniFile);
/// Queues a request for authenticating a user. If the auth fails, the user is 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(cIniFile & IniFile);
/// Stops the authenticator thread. The thread may be started and stopped repeatedly
void Stop(void);
diff --git a/source/Root.cpp b/source/Root.cpp
index df98c3537..346bb2c9f 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -245,7 +245,7 @@ void cRoot::LoadGlobalSettings()
-void cRoot::LoadWorlds(cIniFile IniFile)
+void cRoot::LoadWorlds(cIniFile & IniFile)
{
// First get the default world
AString DefaultWorldName = IniFile.GetValueSet("Worlds", "DefaultWorld", "world");
diff --git a/source/Root.h b/source/Root.h
index 6bd8217d9..175084c53 100644
--- a/source/Root.h
+++ b/source/Root.h
@@ -162,7 +162,7 @@ private:
void LoadGlobalSettings();
/// Loads the worlds from settings.ini, creates the worldmap
- void LoadWorlds(cIniFile IniFile);
+ void LoadWorlds(cIniFile & IniFile);
/// Starts each world's life
void StartWorlds(void);