summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-08 10:57:57 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-08 10:57:57 +0100
commited97946bb946bae2caf8f7dd963a75dceddfcc86 (patch)
tree6df0a1f27e4db9f9a790d1105246ba658be6b571 /src/Root.cpp
parentMerge pull request #2953 from LogicParrot/worldRebuild (diff)
parentPrevent server from starting if there's bad world linkage (diff)
downloadcuberite-ed97946bb946bae2caf8f7dd963a75dceddfcc86.tar
cuberite-ed97946bb946bae2caf8f7dd963a75dceddfcc86.tar.gz
cuberite-ed97946bb946bae2caf8f7dd963a75dceddfcc86.tar.bz2
cuberite-ed97946bb946bae2caf8f7dd963a75dceddfcc86.tar.lz
cuberite-ed97946bb946bae2caf8f7dd963a75dceddfcc86.tar.xz
cuberite-ed97946bb946bae2caf8f7dd963a75dceddfcc86.tar.zst
cuberite-ed97946bb946bae2caf8f7dd963a75dceddfcc86.zip
Diffstat (limited to '')
-rw-r--r--src/Root.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 07b7ddb60..1a39b09a5 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -327,6 +327,17 @@ void cRoot::Start(std::unique_ptr<cSettingsRepositoryInterface> a_OverridesRepo)
+void cRoot::StopServer()
+{
+ m_TerminateEventRaised = true;
+ m_StopEvent.Set();
+ m_InputThreadRunFlag.clear();
+}
+
+
+
+
+
void cRoot::LoadGlobalSettings()
{
// Nothing needed yet
@@ -655,9 +666,7 @@ void cRoot::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallback
// Some commands are built-in:
if (a_Cmd == "stop")
{
- m_TerminateEventRaised = true;
- m_StopEvent.Set();
- m_InputThreadRunFlag.clear();
+ StopServer();
return;
}
else if (a_Cmd == "restart")