diff --git a/app/Console/Commands/PacketInfo.php b/app/Console/Commands/PacketInfo.php index 8da8c76..5ce504e 100644 --- a/app/Console/Commands/PacketInfo.php +++ b/app/Console/Commands/PacketInfo.php @@ -3,7 +3,6 @@ namespace App\Console\Commands; use Illuminate\Console\Command; -use Illuminate\Support\Arr; use App\Classes\File; use App\Classes\FTN\Packet; @@ -18,7 +17,7 @@ class PacketInfo extends Command */ protected $signature = 'packet:info' .' {file : Packet to process}' - .' {system? : Zone the packet is from}'; + .' {system? : System the packet is from}'; /** * The console command description. @@ -36,7 +35,7 @@ class PacketInfo extends Command public function handle() { $f = new File($this->argument('file')); - $s = $this->argument('system') ? System::where('name',$this->argument('zone'))->singleOrFail() : NULL; + $s = $this->argument('system') ? System::where('name',$this->argument('system'))->singleOrFail() : NULL; foreach ($f as $packet) { $pkt = Packet::process($packet,$x=$f->itemName(),$f->itemSize(),$s); diff --git a/app/Models/Echomail.php b/app/Models/Echomail.php index f6ec250..773457f 100644 --- a/app/Models/Echomail.php +++ b/app/Models/Echomail.php @@ -75,7 +75,7 @@ final class Echomail extends Model implements Packet // Our address $ftns = Setup::findOrFail(config('app.id')) ->system - ->match($model->fftn->zone,Address::NODE_ACTIVE|Address::NODE_PVT|Address::NODE_HOLD); + ->match($model->fftn->zone); // Add our address to the seenby; $model->set_seenby = $model->set_seenby->merge($ftns->pluck('id'))->unique(); diff --git a/app/Models/System.php b/app/Models/System.php index ffc3094..8a52847 100644 --- a/app/Models/System.php +++ b/app/Models/System.php @@ -170,7 +170,7 @@ class System extends Model * @param int $type * @return Collection */ - public function match(Zone $o,int $type=(Address::NODE_HC|Address::NODE_ACTIVE|Address::NODE_PVT|Address::NODE_POINT)): Collection + public function match(Zone $o,int $type=(Address::NODE_NC|Address::NODE_HC|Address::NODE_ACTIVE|Address::NODE_PVT|Address::NODE_POINT)): Collection { return $this->addresses ->where('zone_id',$o->id)