summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-04 15:06:37 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-05 14:34:16 +0100
commitd8861da5990315c415cd250c9d2a8a4f2b9d122b (patch)
treeffc94dd94cbb5029b66bf6cf2555bb825392d77f /src/Root.cpp
parentMerge pull request #2960 from LogicParrot/interspecies (diff)
downloadcuberite-d8861da5990315c415cd250c9d2a8a4f2b9d122b.tar
cuberite-d8861da5990315c415cd250c9d2a8a4f2b9d122b.tar.gz
cuberite-d8861da5990315c415cd250c9d2a8a4f2b9d122b.tar.bz2
cuberite-d8861da5990315c415cd250c9d2a8a4f2b9d122b.tar.lz
cuberite-d8861da5990315c415cd250c9d2a8a4f2b9d122b.tar.xz
cuberite-d8861da5990315c415cd250c9d2a8a4f2b9d122b.tar.zst
cuberite-d8861da5990315c415cd250c9d2a8a4f2b9d122b.zip
Diffstat (limited to 'src/Root.cpp')
-rw-r--r--src/Root.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 737d350ff..e022de588 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
@@ -597,9 +608,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")