summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/Authenticator.cpp10
-rw-r--r--source/Authenticator.h5
-rw-r--r--source/PluginManager.cpp4
-rw-r--r--source/Root.cpp7
4 files changed, 19 insertions, 7 deletions
diff --git a/source/Authenticator.cpp b/source/Authenticator.cpp
index dcc63299e..a45617f93 100644
--- a/source/Authenticator.cpp
+++ b/source/Authenticator.cpp
@@ -100,6 +100,16 @@ void cAuthenticator::Authenticate(int a_ClientID, const AString & a_UserName, co
+void cAuthenticator::Start(void)
+{
+ m_ShouldTerminate = false;
+ super::Start();
+}
+
+
+
+
+
void cAuthenticator::Stop(void)
{
m_ShouldTerminate = true;
diff --git a/source/Authenticator.h b/source/Authenticator.h
index c9e647329..868476d80 100644
--- a/source/Authenticator.h
+++ b/source/Authenticator.h
@@ -42,7 +42,10 @@ public:
/// 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);
- // Stops the authenticator thread
+ /// Starts the authenticator thread. The thread may be started and stopped repeatedly
+ void Start(void);
+
+ /// Stops the authenticator thread. The thread may be started and stopped repeatedly
void Stop(void);
private:
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index eb347968a..a557bdc03 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -75,9 +75,9 @@ void cPluginManager::FindPlugins(void)
AStringList Files = GetDirectoryContents(PluginsPath.c_str());
for (AStringList::const_iterator itr = Files.begin(); itr != Files.end(); ++itr)
{
- if (!cFile::IsFolder(PluginsPath + *itr))
+ if ((*itr == ".") || (*itr == "..") || (!cFile::IsFolder(PluginsPath + *itr)))
{
- // We only want folders
+ // We only want folders, and don't want "." or ".."
continue;
}
diff --git a/source/Root.cpp b/source/Root.cpp
index c2b58bd71..26e6d347d 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -92,10 +92,6 @@ void cRoot::InputThread(void * a_Params)
void cRoot::Start(void)
{
- cTimer Time;
-
- long long mseconds = Time.GetNowTime();
-
cDeadlockDetect dd;
delete m_Log;
m_Log = new cMCLogger();
@@ -103,6 +99,9 @@ void cRoot::Start(void)
m_bStop = false;
while (!m_bStop)
{
+ cTimer Time;
+ long long mseconds = Time.GetNowTime();
+
m_bRestart = false;
LoadGlobalSettings();