function remove($host, $port) { $service = new \DedicatedManager\Services\ServerService(); $service->delete($host, $port); $this->request->redirectArgList('/'); }
/** * @redirect */ function stop() { if (!$this->isAdmin) { $this->session->set('error', _('You need to be an admin to do this')); $this->request->redirectToReferer(); } $this->server->connection->stopServer(); $service = new \DedicatedManager\Services\ServerService(); $service->delete($this->server->rpcHost, $this->server->rpcPort); $this->session->set('success', _('Server has been stopped')); $this->request->redirectArgList('/'); }