diff --git a/include/functions.php b/include/functions.php index 77cbcbd..115cd18 100644 --- a/include/functions.php +++ b/include/functions.php @@ -441,6 +441,20 @@ function getActualLink($logLines, $mode) { } return "not linked"; break; + case "YSF": + +// 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122 +// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 +// M: 2016-09-25 16:08:05.811 Connect to 62829 has been requested by DG9VH + foreach($logLines as $logLine) { + $to = ""; + if (strpos($logLine,"Connect to")) { + $to = substr($logLine, 47, 5); + } + if ($to !== "") { + return $to; + } + } } return "something went wrong!"; } @@ -507,6 +521,14 @@ function getActiveYSFReflectors($logLines) { return $reflectorlist; } +function getYSFReflectorById($id, $reflectors) { + foreach($reflectors as $reflector) { + if ($reflector[2] === $id) { + return $reflector[0]; + } + } +} + function getName($callsign) { if (is_numeric($callsign)) { return "---"; diff --git a/include/init.php b/include/init.php index 9386210..e5d1718 100644 --- a/include/init.php +++ b/include/init.php @@ -10,5 +10,6 @@ if (defined("ENABLEYSFGATEWAY")) { $logLinesYSFGateway = getYSFGatewayLog(); $reverseLogLinesYSFGateway = $logLinesYSFGateway; array_multisort($reverseLogLinesYSFGateway,SORT_DESC); + $activeYSFReflectors = getActiveYSFReflectors($reverseLogLinesYSFGateway); } ?> diff --git a/include/repeaterinfo.php b/include/repeaterinfo.php index c5b7e97..0f4979b 100644 --- a/include/repeaterinfo.php +++ b/include/repeaterinfo.php @@ -7,6 +7,7 @@
Location | diff --git a/include/ysfgatewayinfo.php b/include/ysfgatewayinfo.php index 00ebd93..fee6e85 100644 --- a/include/ysfgatewayinfo.php +++ b/include/ysfgatewayinfo.php @@ -27,7 +27,6 @@ 0) { ?>
---|