argument('file')); $f = new File($fs->path($rel_name)); $m = []; if ($this->argument('ftn')) { $a = Address::findFTN($this->argument('ftn')); } elseif (preg_match(sprintf('/^%s\.(.{3})$/',Packet::regex),$this->argument('file'),$m)) { $a = Address::findOrFail(hexdec($m[1])); } else { $this->error('Unable to determine sender FTN address'); exit(1); } foreach ($f as $packet) { foreach ($pkt = Packet::process($packet,$f->itemName(),$f->itemSize(),$a?->zone->domain) as $msg) { // @todo Quick check that the packet should be processed by us. $this->info(sprintf('Processing message from [%s] with msgid [%s] in (%s)',$msg->fboss,$msg->msgid,$f->pktName())); // Dispatch job. if ($this->option('dontqueue')) Job::dispatchSync($msg,$f->pktName(),$a,$pkt->fftn_o,Carbon::now(),$this->option('nobot')); else Job::dispatch($msg,$f->pktName(),$a,$pkt->fftn_o,Carbon::now(),$this->option('nobot')); } } } }