mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
Ark queries and so on
This commit is contained in:
parent
8e81e5acbc
commit
eed7da81ce
@ -257,7 +257,22 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
|
||||
print "GameQ v2 support for {$row2['shorten']} {$row2['serverip']}:{$row2['port']}\r\n";
|
||||
|
||||
$serverBatchV2Array[] = array('id' => $row2['id'], 'type' => $row2['gameq'], 'host' => $row2['serverip'] . ':' . $row2['port'], 'options' => array('query_port' => $queryPort));
|
||||
$checkAtIPPort = $row2['serverip'] . ':';
|
||||
|
||||
if ($row2['useQueryPort'] == 5) {
|
||||
$checkAtIPPort .= $row2['port5'];
|
||||
} else if ($row2['useQueryPort'] == 4) {
|
||||
$checkAtIPPort .= $row2['port4'];
|
||||
} else if ($row2['useQueryPort'] == 3) {
|
||||
$checkAtIPPort .= $row2['port3'];
|
||||
} else if ($row2['useQueryPort'] == 2) {
|
||||
$checkAtIPPort .= $row2['port2'];
|
||||
} else {
|
||||
$checkAtIPPort .= $row2['port'];
|
||||
}
|
||||
|
||||
$serverBatchV2Array[] = array('id' => $row2['id'], 'type' => $row2['gameq'], 'host' => $checkAtIPPort);
|
||||
|
||||
$iV2++;
|
||||
|
||||
if ($iV2 == 5) {
|
||||
@ -285,6 +300,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
|
||||
print "Checking $totalV3Count server(s) with GameQ v3 query\r\n";
|
||||
foreach ($allServersV3Array as $servers) {
|
||||
if (count($servers) > 0) {
|
||||
|
||||
$gq = new \GameQ\GameQ();
|
||||
$gq->addServers($servers);
|
||||
@ -301,9 +317,11 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
$serverReplies[$switchID] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "Checking $totalV2Count server(s) with GameQ v2 query\r\n";
|
||||
foreach ($allServersV2Array as $servers) {
|
||||
if (count($servers) > 0) {
|
||||
|
||||
$gq = new GameQ();
|
||||
$gq->setOption('timeout', 60);
|
||||
@ -319,6 +337,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
$serverReplies[$switchID] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($gq);
|
||||
|
||||
foreach($serverReplies as $switchID => $v) {
|
||||
|
@ -32,7 +32,7 @@ class Arkse extends Source
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
protected $name = 'ark: survival evolved';
|
||||
protected $name = 'arkse';
|
||||
|
||||
/**
|
||||
* Longer string name of this protocol class
|
||||
|
Loading…
x
Reference in New Issue
Block a user