public override bool doProcess(string[] args) { if (!hasPermission()) { permissionError(); return(false); } StarryboundServer.changeState(ServerState.GracefulShutdown, "Command::Shutdown", "Shutdown requested by " + this.player.name); return(true); }
public override bool doProcess(string[] args) { if (!hasPermission()) { permissionError(); return(false); } if (StarryboundServer.restartTime != 0) { StarryboundServer.sendGlobalMessage("^#f75d5d;The server restart has been aborted by " + this.player.name); StarryboundServer.logWarn("The server restart has been aborted."); StarryboundServer.changeState(ServerState.Running, "Command::Restart"); StarryboundServer.restartTime = 0; } else { StarryboundServer.sendGlobalMessage("^#f75d5d;The server will restart in 30 seconds. We will be back shortly."); StarryboundServer.logWarn("The server will restart in 30 seconds."); StarryboundServer.restartTime = Utils.getTimestamp() + 30; } return(true); }