diff --git a/Plugins/Core/stop.lua b/Plugins/Core/stop.lua new file mode 100644 index 00000000..0a06fc7d --- /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 f4816d79..9ab923d5 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