Work with netmail creation

This commit is contained in:
Deon George
2019-05-11 11:17:56 +10:00
parent 188fd1a2cf
commit 9317f78a3a
6 changed files with 389 additions and 129 deletions

View File

@@ -13,7 +13,7 @@ class FtnPkt extends Command
*
* @var string
*/
protected $signature = 'ftn:pkt {file : Fidonet Packet File PKT} {--dump : Dump packet}';
protected $signature = 'ftn:pkt {file : Fidonet Packet File PKT} {--dump : Dump packet} {--detail : Dump Detail}';
/**
* The console command description.
@@ -51,21 +51,23 @@ class FtnPkt extends Command
foreach ($pkt->messages as $o)
{
$this->warn(sprintf('-- From: %s(%s)->%s(%s), Type: %s, Size: %d, FQFA: %s',
$this->warn(sprintf('-- From: %s(%s)->%s(%s), Type: %s, Size: %d',
$o->from,
$o->src,
$o->fqfa,
$o->to,
$o->dst,
$o->fqda,
$o->description(),
strlen($o->message),
$o->fqfa
strlen($o->message)
));
if ($o->unknown->count())
$this->error(sprintf('?? %s Unknown headers',$o->unknown->count()));
}
if ($this->option('detail'))
dd($o);
if ($this->option('dump'))
dump($o);
echo $pkt->dump();
}
}