Files
cafeberry/Minecraft.Server/Console/commands/stop/CliCommandStop.cpp
T
pieeebot 4b962fcb21 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.
2026-08-29 14:01:24 +03:00

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;
}
}