Skip to content

Commit

Permalink
Fixing for new version of pYSFReflector
Browse files Browse the repository at this point in the history
  • Loading branch information
dg9vh committed Oct 15, 2021
1 parent 0a71bb7 commit 532ff6a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,11 @@ function getHeardList($logLines) {
}
$callsign2 = substr($logLine, strpos($logLine,"from") + 5, strpos($logLine,"to") - strpos($logLine,"from") - 6);
$callsign = trim($callsign2);
$target = substr($logLine, strpos($logLine, "to") + 3, strpos($logLine,"at") - strpos($logLine,"to") +6 );
$gateway = substr($logLine, strrpos($logLine,"at") + 3);
$target = substr($logLine, strpos($logLine, " to ") + 4, strpos($logLine," at ") - strpos($logLine, " to ") - 3);
$gateway = substr($logLine, strrpos($logLine," at ") + 4);
if (strpos($gateway, "FICH") == true) {
$gateway = substr($gateway, 0, strpos($gateway, "FICH"));
}
// Callsign or ID should be less than 11 chars long, otherwise it could be errorneous
if ( strlen($callsign) < 11 ) {
array_push($heardList, array(convertTimezone($timestamp), $callsign, $target, $gateway, $duration));
Expand Down

0 comments on commit 532ff6a

Please sign in to comment.