summaryrefslogtreecommitdiffstats
path: root/source/cRoot.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/cRoot.h')
-rw-r--r--source/cRoot.h42
1 files changed, 32 insertions, 10 deletions
diff --git a/source/cRoot.h b/source/cRoot.h
index 86b6ac28a..3179d72b0 100644
--- a/source/cRoot.h
+++ b/source/cRoot.h
@@ -1,5 +1,15 @@
+
#pragma once
+
+
+
+#include "cAuthenticator.h"
+
+
+
+
+
class cThread;
class cMonsterConfig;
class cMCLogger;
@@ -10,6 +20,7 @@ class cWebAdmin;
class cPluginManager;
class cServer;
class cWorld;
+
class cRoot //tolua_export
{ //tolua_export
public:
@@ -31,24 +42,31 @@ public:
cFurnaceRecipe* GetFurnaceRecipe() { return m_FurnaceRecipe; } //tolua_export
cWebAdmin* GetWebAdmin() { return m_WebAdmin; } //tolua_export
cPluginManager* GetPluginManager() { return m_PluginManager; } //tolua_export
+ cAuthenticator & GetAuthenticator() {return m_Authenticator; }
- void ServerCommand( const char* a_Cmd ); //tolua_export
+ void ServerCommand(const char* a_Cmd ); //tolua_export
+
+ void KickUser(const AString & iUserName, const AString & iReason); // Kicks the user, no matter in what world they are. Used from cAuthenticator
+ void AuthenticateUser(const AString & iUserName); // Called by cAuthenticator to auth the specified user
void TickWorlds( float a_Dt );
+
private:
+
void LoadWorlds();
void UnloadWorlds();
- cServer* m_Server;
- cMonsterConfig *m_MonsterConfig;
+ cServer * m_Server;
+ cMonsterConfig * m_MonsterConfig;
- cGroupManager* m_GroupManager;
- cRecipeChecker* m_RecipeChecker;
- cFurnaceRecipe* m_FurnaceRecipe;
- cWebAdmin* m_WebAdmin;
- cPluginManager* m_PluginManager;
+ cGroupManager * m_GroupManager;
+ cRecipeChecker * m_RecipeChecker;
+ cFurnaceRecipe * m_FurnaceRecipe;
+ cWebAdmin * m_WebAdmin;
+ cPluginManager * m_PluginManager;
+ cAuthenticator m_Authenticator;
- cMCLogger* m_Log;
+ cMCLogger * m_Log;
bool m_bStop;
bool m_bRestart;
@@ -60,4 +78,8 @@ private:
static void InputThread(void* a_Params);
static cRoot* s_Root;
-}; //tolua_export \ No newline at end of file
+}; //tolua_export
+
+
+
+