diff options
Diffstat (limited to 'Minecraft.Server/Console/commands/stop/CliCommandStop.cpp')
| -rw-r--r-- | Minecraft.Server/Console/commands/stop/CliCommandStop.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Minecraft.Server/Console/commands/stop/CliCommandStop.cpp b/Minecraft.Server/Console/commands/stop/CliCommandStop.cpp new file mode 100644 index 00000000..29e42cd9 --- /dev/null +++ b/Minecraft.Server/Console/commands/stop/CliCommandStop.cpp @@ -0,0 +1,32 @@ +#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; + } +} + |
