summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-09-05 16:26:30 +0200
committerTycho <work.tycho+git@gmail.com>2014-09-05 16:26:30 +0200
commitaa2495e3867e87ea37729b58b0df3f2ce940dbb6 (patch)
tree9f71b03f914cd7b077f6c13cd2b6ae2f691c5c66 /src/Root.cpp
parentMoved to passing pointers instead of passing by reference. (diff)
parentMerge pull request #1375 from mc-server/EntitiesInBox (diff)
downloadcuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.gz
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.bz2
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.lz
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.xz
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.zst
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.zip
Diffstat (limited to 'src/Root.cpp')
-rw-r--r--src/Root.cpp31
1 files changed, 4 insertions, 27 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index ee0d9b835..f04cbf08b 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -6,7 +6,6 @@
#include "World.h"
#include "WebAdmin.h"
#include "FurnaceRecipe.h"
-#include "GroupManager.h"
#include "CraftingRecipes.h"
#include "Bindings/PluginManager.h"
#include "MonsterConfig.h"
@@ -47,7 +46,6 @@ cRoot::cRoot(void) :
m_InputThread(NULL),
m_Server(NULL),
m_MonsterConfig(NULL),
- m_GroupManager(NULL),
m_CraftingRecipes(NULL),
m_FurnaceRecipe(NULL),
m_WebAdmin(NULL),
@@ -161,7 +159,7 @@ void cRoot::Start(void)
m_WebAdmin->Init();
LOGD("Loading settings...");
- m_GroupManager = new cGroupManager();
+ m_RankManager.Initialize(m_MojangAPI);
m_CraftingRecipes = new cCraftingRecipes;
m_FurnaceRecipe = new cFurnaceRecipe();
@@ -240,8 +238,6 @@ void cRoot::Start(void)
LOGD("Unloading recipes...");
delete m_FurnaceRecipe; m_FurnaceRecipe = NULL;
delete m_CraftingRecipes; m_CraftingRecipes = NULL;
- LOGD("Forgetting groups...");
- delete m_GroupManager; m_GroupManager = NULL;
LOGD("Unloading worlds...");
UnloadWorlds();
@@ -472,16 +468,6 @@ void cRoot::QueueExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCall
void cRoot::QueueExecuteConsoleCommand(const AString & a_Cmd)
{
- // Some commands are built-in:
- if (a_Cmd == "stop")
- {
- m_bStop = true;
- }
- else if (a_Cmd == "restart")
- {
- m_bRestart = true;
- }
-
// Put the command into a queue (Alleviates FS #363):
cCSLock Lock(m_CSPendingCommands);
m_PendingCommands.push_back(cCommand(a_Cmd, new cLogCommandDeleteSelfOutputCallback));
@@ -493,14 +479,16 @@ void cRoot::QueueExecuteConsoleCommand(const AString & a_Cmd)
void cRoot::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallback & a_Output)
{
- // Some commands are built-in:
+ // cRoot handles stopping and restarting due to our access to controlling variables
if (a_Cmd == "stop")
{
m_bStop = true;
+ return;
}
else if (a_Cmd == "restart")
{
m_bRestart = true;
+ return;
}
LOG("Executing console command: \"%s\"", a_Cmd.c_str());
@@ -555,17 +543,6 @@ void cRoot::SaveAllChunks(void)
-void cRoot::ReloadGroups(void)
-{
- LOG("Reload groups ...");
- m_GroupManager->LoadGroups();
- m_GroupManager->CheckUsers();
-}
-
-
-
-
-
void cRoot::BroadcastChat(const AString & a_Message, eMessageType a_ChatPrefix)
{
for (WorldMap::iterator itr = m_WorldsByName.begin(), end = m_WorldsByName.end(); itr != end; ++itr)