public function onEcho($internal, $public) { $call = explode(':', substr($internal, 1), 2); if (isset($call[1]) && $call[1] != $this->identifier) { return; } if (substr($internal, 0, 1) == '?') { switch ($call[0]) { case 'census': $this->connection->dedicatedEcho($this->identifier, '!census:' . $public); break; case 'stop': \ManiaLive\Application\Application::getInstance()->kill(); break; } } }
echo '-----------------------------------------------------' . PHP_EOL; echo 'PHP 5.3.1 or newer -> required -> ' . ($phpOk ? '[ Yes ] ' . phpversion() : '[ No ]') . PHP_EOL; echo 'Standard PHP Library -> required -> ' . ($splOk ? '[ Yes ]' : '[ No ]') . PHP_EOL; echo 'JSON -> required -> ' . ($jsonOk ? '[ Yes ]' : '[ No ]') . PHP_EOL; echo 'cURL with SSL -> required -> ' . ($curlOk ? $curlSslOk ? '[ Yes ] ' . $curlVersion['version'] . ' (with ' . $curlVersion['ssl_version'] . ')' : '[ No ] ' . $curlVersion['version'] . ' (without SSL)' : '[ No ]') . PHP_EOL; echo 'MySQL -> optional -> ' . ($mysqlOk ? '[ Yes ]' : '[ No ]') . PHP_EOL; echo 'SQLite3 -> optional -> ' . ($sqliteOk ? '[ Yes ]' : '[ No ]') . PHP_EOL; echo '-----------------------------------------------------' . PHP_EOL; if (!$curlOk) { echo 'You should install cURL PHP extension' . PHP_EOL; echo ' on debian/ubuntu : sudo apt-get install php5-curl' . PHP_EOL; } if (!$phpOk || !$curlOk || !$splOk || !$jsonOk) { echo 'Your system is not compatible, check your php configuration.' . PHP_EOL; exit; } // better checking if timezone is set if (!ini_get('date.timezone')) { $timezone = @date_default_timezone_get(); echo 'Timezone is not set in php.ini. Please edit it and change/set "date.timezone" appropriately. ' . 'Setting to default: \'' . $timezone . '\'' . PHP_EOL; date_default_timezone_set($timezone); } if (!$mysqlOk) { echo 'MySQL is disabled, threading will not work. ManiaLive may encounter some perfomance trouble.' . PHP_EOL; } // enable error reporting ini_set('display_errors', 1); error_reporting(E_ALL ^ E_DEPRECATED); gc_enable(); \ManiaLive\Application\Application::getInstance()->run();