summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Plugins/Core/stop.lua6
-rw-r--r--source/cRoot.cpp2
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