forked from cafeberry/cafeberry
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.
34 lines
571 B
C++
34 lines
571 B
C++
#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;
|
|
}
|
|
}
|
|
|