first commit
This commit is contained in:
parent
e852d3880f
commit
9a4787b7c2
1 changed files with 38 additions and 4 deletions
40
config.php
40
config.php
|
@ -41,6 +41,8 @@
|
||||||
} else {
|
} else {
|
||||||
$mods = "";
|
$mods = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// librarie SQ - info serv game
|
// librarie SQ - info serv game
|
||||||
require 'SQ_/bootstrap.php';
|
require 'SQ_/bootstrap.php';
|
||||||
use xPaw\SourceQuery\SourceQuery;
|
use xPaw\SourceQuery\SourceQuery;
|
||||||
|
@ -71,11 +73,10 @@
|
||||||
|
|
||||||
|
|
||||||
// DEBUG
|
// DEBUG
|
||||||
/*
|
/* print_r($Info); */
|
||||||
print_r($Info);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
|
|
||||||
$HostName = $Info['HostName'] ;
|
$HostName = $Info['HostName'] ;
|
||||||
$Game = $Info['ModDesc'] ;
|
$Game = $Info['ModDesc'] ;
|
||||||
$Version = $Info['Version'] ;
|
$Version = $Info['Version'] ;
|
||||||
|
@ -89,5 +90,38 @@
|
||||||
$ping = "666";
|
$ping = "666";
|
||||||
// $mods = "0";
|
// $mods = "0";
|
||||||
|
|
||||||
|
// REGEX de la mort.
|
||||||
|
|
||||||
|
// time server
|
||||||
|
$regtimsev = "/[0-9]{1,2}[:][0-9]{1,2}/";
|
||||||
|
$result = preg_grep($regtimsev, explode(",", $InfoGT));
|
||||||
|
foreach ($result as $key => $val) { $timeserver = $val; }
|
||||||
|
|
||||||
|
// speedtime dayz
|
||||||
|
$regtimeacc = "/etm[0-9]{1,2}[.][0-9]{1}/";
|
||||||
|
$result = preg_grep($regtimeacc, explode(",", $InfoGT));
|
||||||
|
foreach ($result as $key => $val) { $timespeed = trim($val,"entm.0"); }
|
||||||
|
|
||||||
|
// speedtime night
|
||||||
|
$regtimeacn = "/entm[0-9]{1,2}[.][0-9]{1}/";
|
||||||
|
$result = preg_grep($regtimeacn, explode(",", $InfoGT));
|
||||||
|
foreach ($result as $key => $val) { $timespeedn = trim($val,"entm.0"); }
|
||||||
|
|
||||||
|
// HIVE
|
||||||
|
$reghive = '/[^,]...(Hive)/';
|
||||||
|
$result = preg_grep($reghive, explode(",", $InfoGT));
|
||||||
|
foreach ($result as $key => $val) { $hive = $val; }
|
||||||
|
|
||||||
|
// battleye
|
||||||
|
$regbattle = "/(battleye)/";
|
||||||
|
$result = preg_grep($regbattle, explode(",", $InfoGT));
|
||||||
|
foreach ($result as $key => $val) { $battleye = $val; }
|
||||||
|
|
||||||
|
// mod
|
||||||
|
$regmod = "/(mod)/";
|
||||||
|
$result = preg_grep($regmod, explode(",", $InfoGT));
|
||||||
|
foreach ($result as $key => $val) { $mods = $val; }
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue