Enable duplicates to update seen-by's before being discarded
This commit is contained in:
@@ -6,7 +6,7 @@ use Illuminate\Console\Command;
|
||||
use Symfony\Component\HttpFoundation\File\File;
|
||||
|
||||
use App\Classes\FTN\Packet;
|
||||
use App\Models\Zone;
|
||||
use App\Models\System;
|
||||
|
||||
class PacketInfo extends Command
|
||||
{
|
||||
@@ -17,7 +17,7 @@ class PacketInfo extends Command
|
||||
*/
|
||||
protected $signature = 'packet:info'
|
||||
.' {pkt : Packet to process}'
|
||||
.' {zone? : Zone the packet is from}';
|
||||
.' {system? : Zone the packet is from}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -35,9 +35,9 @@ class PacketInfo extends Command
|
||||
public function handle()
|
||||
{
|
||||
$f = new File($this->argument('pkt'));
|
||||
$z = $this->argument('zone') ? Zone::where('zone_id',$this->argument('zone'))->singleOrFail() : NULL;
|
||||
$s = $this->argument('system') ? System::where('name',$this->argument('zone'))->singleOrFail() : NULL;
|
||||
|
||||
$pkt = Packet::open($f,$z);
|
||||
$pkt = Packet::open($f,$s);
|
||||
|
||||
$this->info(sprintf('Packet Type: %s',$pkt->type));
|
||||
$this->info(sprintf('From: %s to %s',$pkt->fftn,$pkt->tftn));
|
||||
|
@@ -19,7 +19,7 @@ class PacketProcess extends Command
|
||||
protected $signature = 'packet:process'
|
||||
.' {pkt : Packet to process}'
|
||||
.' {--N|nobot : Dont process bots}'
|
||||
.' {zone? : Zone the packet is from}';
|
||||
.' {system? : Zone the packet is from}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -37,9 +37,9 @@ class PacketProcess extends Command
|
||||
public function handle()
|
||||
{
|
||||
$f = new File($this->argument('pkt'));
|
||||
$z = $this->argument('zone') ? Zone::where('zone_id',$this->argument('zone'))->singleOrFail() : NULL;
|
||||
$s = $this->argument('system') ? Zone::where('name',$this->argument('system'))->singleOrFail() : NULL;
|
||||
|
||||
foreach (Packet::open($f,$z) as $msg) {
|
||||
foreach (Packet::open($f,$s) as $msg) {
|
||||
// @todo Quick check that the packet should be processed by us.
|
||||
// @todo validate that the packet's zone is in the domain.
|
||||
|
||||
|
Reference in New Issue
Block a user