From c9d5afac8447795fc222f18b7220d2f553d6a7ea Mon Sep 17 00:00:00 2001 From: dg9vh Date: Sat, 29 Apr 2017 18:39:02 +0000 Subject: [PATCH] fixed startup reflector detection on ysf --- include/functions.php | 8 ++++---- version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/functions.php b/include/functions.php index 380af97..d0cf4b5 100644 --- a/include/functions.php +++ b/include/functions.php @@ -210,7 +210,7 @@ function getYSFGatewayLog() { // Open Logfile and copy loglines into LogLines-Array() $logPath = YSFGATEWAYLOGPATH."/".YSFGATEWAYLOGPREFIX."-".date("Y-m-d").".log"; //$logLines = explode("\n", `egrep -h "D:|M:" $logPath`); - $logLines = explode("\n", `egrep -h "Starting|Disconnect|Connect|Automatic|Disconnecting" $logPath`); + $logLines = explode("\n", `egrep -h "repeater|Starting|Disconnect|Connect|Automatic|Disconnecting" $logPath`); return $logLines; } @@ -682,12 +682,12 @@ function getActualLink($logLines, $mode) { if (strpos($logLine,"Connect to")) { $to = substr($logLine, 38, 5); } + if (strpos($logLine,"The ID of this repeater is")) { + $to = -1; + } if (strpos($logLine,"Automatic connection to")) { $to = substr($logLine, 51, 5); } - if (strpos($logLine,"Starting YSFGateway")) { - $to = -1; - } if ($to !== "") { return $to; } diff --git a/version.php b/version.php index def6262..a9c90bc 100644 --- a/version.php +++ b/version.php @@ -1,3 +1,3 @@