/** * @author João Reis * @Year 2016 * @param $retornaStatus boolean * @return boolean, array */ function _paraModulo($retornaStatus = false) { global $_ip, $_portaQuery, $_objQuery; if ($retornaStatus) { return _getStatus(); } return true; }
/** * @author João Reis * Atualiza os dados apartir da api do servidor. * @return boolean */ function getFullStatus() { if ($this->Status) { @(include "modulos/modulos.conf.php"); @(include "../modulos/modulos.conf.php"); $existe = false; $index = 1; $i = 0; if (isset($Vmodulos)) { $modulos = array(); $modulos = $Vmodulos; foreach ($modulos as $modulo) { $i++; if ($modulo['tipoServidor'] == $this->getTipoServidor()) { $existe = true; $index = $i; break; } } if ($existe) { #@call_user_func("csgo_teste"); /* VER ISTO PARA CHAMAR FUNCOES DOS MODULOS */ if (!function_exists("_iniciaModulo")) { @(include $modulos[$index]['dir']); @(include "../" . $modulos[$index]['dir']); } if (isset($modulos)) { #print_r($modulos[$index]); _iniciaModulo($this->Ip, $this->PortaQuery, false); $Info = _getStatus(); _paraModulo(false); #print_r($Info); $this->MapaAtual = $Info['Map']; $this->SlotsUsados = $Info['Players']; $this->MaxSlots = $Info['MaxPlayers']; $this->Versao = $Info['Versao']; $this->Jogadores = $Info['Playerlist']; $this->Plugins = $Info['Plugins']; return array("Map" => $Info['Map'], "Players" => $Info['Players'], "MaxPlayers" => $Info['MaxPlayers'], "Playerlist" => $Info['Playerlist'], "Plugins" => $Info['Plugins']); return $info; } return false; } else { #echo "nao"; return false; } } return false; } return false; }