_id = $id; $this->_ip = $ip; $this->_port = $port; } function isOnline() { require_once(ABSOLUTEPATH . "plugins/shared/plugin_gs_query.inc"); $server_query = new plugin_gs_query($this->_ip, $this->_port + 10); if (!$this->info = $server_query->info()) return false; if (empty($this->info["hostname"])) return false; return true; } function getInfo() { global $phpUA; require_once(ABSOLUTEPATH . "plugins/shared/plugin_gs_query.inc"); return array("name"=>$this->info["hostname"], "desc"=>$this->info["gametype"] . ": " . $this->info["numplayers"] . "/" . $this->info["maxplayers"] . " " . $phpUA["LANGUAGE"]["on"] . " " . $this->info["mapname"]); } } ?>