diff --git a/lgsl_files/lgsl_class.php b/lgsl_files/lgsl_class.php index 90c81cf..93f03db 100644 --- a/lgsl_files/lgsl_class.php +++ b/lgsl_files/lgsl_class.php @@ -263,14 +263,14 @@ function lgsl_query_cached($type, $ip, $c_port, $q_port, $s_port, $request, $id if(time() - $item['time'] < 60 * 60 * 24) // NOT OLDER THAN 1 DAY array_push($live['s']['history'], $item); } - } - $last = ($cache['s']['history'] ? end($cache['s']['history']) : null); - if(!$last or time() - $last['time'] >= 60 * 15 ) { // RECORD IF 15 MINS IS PASSED - array_push($live['s']['history'], array( - "status" => (int) $live['b']['status'], - "time" => $live['s']['cache_time'], - "players" => (int) $live['s']['players'] - )); + $last = ($cache['s']['history'] ? end($cache['s']['history']) : null); + if(!$last or time() - $last['time'] >= 60 * 15 ) { // RECORD IF 15 MINS IS PASSED + array_push($live['s']['history'], array( + "status" => (int) $live['b']['status'], + "time" => $live['s']['cache_time'], + "players" => (int) $live['s']['players'] + )); + } } }