diff options
author | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-12 20:11:28 +0200 |
---|---|---|
committer | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-12 20:11:28 +0200 |
commit | 2f3dc0300534b8ca3fa4bf8d57bfa886b1df4c2f (patch) | |
tree | 74497073dedfdb457e1f49c682c9270668aec349 | |
parent | http://www.mc-server.org/support/index.php?do=details&task_id=153 (diff) | |
download | cuberite-2f3dc0300534b8ca3fa4bf8d57bfa886b1df4c2f.tar cuberite-2f3dc0300534b8ca3fa4bf8d57bfa886b1df4c2f.tar.gz cuberite-2f3dc0300534b8ca3fa4bf8d57bfa886b1df4c2f.tar.bz2 cuberite-2f3dc0300534b8ca3fa4bf8d57bfa886b1df4c2f.tar.lz cuberite-2f3dc0300534b8ca3fa4bf8d57bfa886b1df4c2f.tar.xz cuberite-2f3dc0300534b8ca3fa4bf8d57bfa886b1df4c2f.tar.zst cuberite-2f3dc0300534b8ca3fa4bf8d57bfa886b1df4c2f.zip |
-rw-r--r-- | Plugins/Core/stop.lua | 6 | ||||
-rw-r--r-- | source/cRoot.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Plugins/Core/stop.lua b/Plugins/Core/stop.lua new file mode 100644 index 000000000..0a06fc7d3 --- /dev/null +++ b/Plugins/Core/stop.lua @@ -0,0 +1,6 @@ +function HandleStopCommand( Split, Player )
+ Server = cRoot:Get():GetServer()
+ Server:SendMessage( cChatColor.Green .. "Stopping the server..." )
+ cRoot:Get():ServerCommand("stop")
+ return true
+end
\ No newline at end of file diff --git a/source/cRoot.cpp b/source/cRoot.cpp index f4816d79c..9ab923d50 100644 --- a/source/cRoot.cpp +++ b/source/cRoot.cpp @@ -149,7 +149,7 @@ void cRoot::Start() LOG("Starting InputThread..."); m_InputThread = new cThread( InputThread, this, "cRoot::InputThread" ); - m_InputThread->Start( true ); + m_InputThread->Start( false ); //we should NOT wait? Otherwise we canīt stop the server from other threads than the input thread LOG("Initialization done, server running now."); while( !m_bStop && !m_bRestart ) // These are modified by external threads |