Indent to space

pull/921/head
TimZ99 2020-05-17 21:03:42 +02:00
parent 7daab77f8d
commit c0e0b260d5
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
9 changed files with 117 additions and 117 deletions

View File

@ -182,7 +182,7 @@ class StatusUpdater
// Execute ping // Execute ping
$pingCommand = 'ping6'; $pingCommand = 'ping6';
$serverIp = $this->server['ip']; $serverIp = $this->server['ip'];
if (filter_var($serverIp,FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === false){ if (filter_var($serverIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === false) {
$pingCommand = 'ping'; $pingCommand = 'ping';
} }
$txt = exec($pingCommand . " -c " . $max_runs . " " . $serverIp . " 2>&1", $output); $txt = exec($pingCommand . " -c " . $max_runs . " " . $serverIp . " 2>&1", $output);
@ -197,7 +197,7 @@ class StatusUpdater
if (preg_match_all("/" . $re1 . $re2 . $re3 . $re4 . "/is", $txt, $matches)) { if (preg_match_all("/" . $re1 . $re2 . $re3 . $re4 . "/is", $txt, $matches)) {
$result = $matches[1][0]; $result = $matches[1][0];
} }
if (substr($output[0],0,4) == 'PING' && strpos($output[count($output)-2],'packets transmitted')){ if (substr($output[0], 0, 4) == 'PING' && strpos($output[count($output) - 2], 'packets transmitted')) {
$result = 0; $result = 0;
} }
if (!is_null($result)) { if (!is_null($result)) {
@ -233,7 +233,7 @@ class StatusUpdater
$starttime = microtime(true); $starttime = microtime(true);
$serverIp = $this->server['ip']; $serverIp = $this->server['ip'];
if (filter_var($serverIp,FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false){ if (filter_var($serverIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false) {
$serverIp = "[$serverIp]"; $serverIp = "[$serverIp]";
} }
$fp = @fsockopen($serverIp, $this->server['port'], $errno, $this->error, $timeout); $fp = @fsockopen($serverIp, $this->server['port'], $errno, $this->error, $timeout);