Remove /restart command. Fixes #1454.

This commit is contained in:
Lucas Nicodemus 2017-12-11 15:45:42 -07:00
parent 4ea7d10482
commit 611fb6b418

View file

@ -366,10 +366,6 @@ namespace TShockAPI
{
HelpText = "Reloads the server configuration file."
});
add(new Command(Permissions.maintenance, Restart, "restart")
{
HelpText = "Restarts the server."
});
add(new Command(Permissions.cfgpassword, ServerPassword, "serverpassword")
{
HelpText = "Changes the server password."
@ -1902,25 +1898,6 @@ namespace TShockAPI
TShock.Utils.StopServer(true, reason);
}
private static void Restart(CommandArgs args)
{
if (TShock.NoRestart)
{
args.Player.SendErrorMessage("This command has been disabled.");
return;
}
if (ServerApi.RunningMono)
{
TShock.Log.ConsoleInfo("Sorry, this command has not yet been implemented in Mono.");
}
else
{
string reason = ((args.Parameters.Count > 0) ? "Server shutting down: " + String.Join(" ", args.Parameters) : "Server shutting down!");
TShock.Utils.RestartServer(true, reason);
}
}
private static void OffNoSave(CommandArgs args)
{
string reason = ((args.Parameters.Count > 0) ? "Server shutting down: " + String.Join(" ", args.Parameters) : "Server shutting down!");