private function handleQuitCommand($attributes) { if (!isset($attributes['port']) || $attributes['port'] < 1 || $attributes['port'] > 65535) { $this->sendError("Wrong port for quit"); } else { $srvinfo = ServerList::getServer($this->ip, $attributes['port']); if (isset($srvinfo)) { socket_write($this->_socket, "\\final\\"); ServerList::removeServer($this->ip, $attributes['port']); } } $this->removeme = true; }