_id = $id; $this->_ip = $ip; $this->_port = $port; } function isOnline() { require_once(ABSOLUTEPATH . "plugins/plugin_hl/plugin_hl_query.inc"); $server_query = new plugin_hl_query($this->_ip, $this->_port); if ($server_query->ping()) return true; else return false; } function getInfo() { global $phpUA; require_once(ABSOLUTEPATH . "plugins/plugin_hl/plugin_hl_query.inc"); $server_query = new plugin_hl_query($this->_ip, $this->_port); if (!$info = $server_query->info()) return false; if ($info["mod_name"] == "Half-Life") $info["mod_name"] = "Deathmatch"; return array("name"=>$info["hostname"], "desc"=>$info["mod_name"] .": " . $info["cur_players"] . "/" . $info["max_players"] . " " . $phpUA["LANGUAGE"]["on"] . " " . $info["map"]); } } ?>