mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
- Integrated linenoise library for line editing and completion in the server console. - Updated ServerLogger to handle external writes safely during logging. - Modified ServerMain to initialize and manage the ServerCli for command input. - The implementation is separate from everything else, so it doesn't affect anything else. - The command input section and execution section are separated into threads.
32 lines
532 B
C++
32 lines
532 B
C++
#include "stdafx.h"
|
|
|
|
#include "CliCommandStop.h"
|
|
|
|
#include "..\ServerCliEngine.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;
|
|
}
|
|
}
|