forked from cafeberry/cafeberry
feat: add smartcmd dedicated server
major bug: when connecting to the server a second time, it gets softlocked and keeps repeating ticking connection A\n in debug logs until it times out.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "CliCommandStop.h"
|
||||
|
||||
#include "../../ServerCliEngine.h"
|
||||
#include "../../ServerCliParser.h"
|
||||
|
||||
namespace ServerRuntime
|
||||
{
|
||||
const char *CliCommandStop::Name() const
|
||||
{
|
||||
return "stop";
|
||||
}
|
||||
|
||||
const char *CliCommandStop::Usage() const
|
||||
{
|
||||
return "stop";
|
||||
}
|
||||
|
||||
const char *CliCommandStop::Description() const
|
||||
{
|
||||
return "Stop the dedicated server.";
|
||||
}
|
||||
|
||||
bool CliCommandStop::Execute(const ServerCliParsedLine &line, ServerCliEngine *engine)
|
||||
{
|
||||
(void)line;
|
||||
engine->LogInfo("Stopping server...");
|
||||
engine->RequestShutdown();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user