Added filefix %LIST
This commit is contained in:
39
app/Classes/FTN/Process/Netmail/Robot/Filefix/AreaList.php
Normal file
39
app/Classes/FTN/Process/Netmail/Robot/Filefix/AreaList.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\FTN\Process\Netmail\Robot\Filefix;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
|
||||
use App\Classes\FTN\Process\Netmail\Robot\Areafix\Base;
|
||||
use App\Notifications\Netmails\Filefix\AreaList as AreaListNotification;
|
||||
|
||||
// LIST - List echoareas in a domain
|
||||
class AreaList extends Base
|
||||
{
|
||||
private const LOGKEY = 'AFS';
|
||||
private const command = '%LIST';
|
||||
|
||||
public static function help(): array
|
||||
{
|
||||
return [
|
||||
self::command,
|
||||
' List the available fileareas in this network',
|
||||
];
|
||||
}
|
||||
|
||||
public function process(): string
|
||||
{
|
||||
Log::debug(sprintf('%s:- Filefix [%s] for [%s] for [%s]',self::LOGKEY,self::command,$this->mo->fftn->ftn,join('|',$this->arguments)));
|
||||
|
||||
if (count($this->arguments) > 1)
|
||||
return sprintf('%-25s <-- INVALID COMMAND',self::command);
|
||||
|
||||
else {
|
||||
Notification::route('netmail',$this->mo->fftn)
|
||||
->notify(new AreaListNotification($this->mo));
|
||||
|
||||
return sprintf('%-25s <-- COMMAND PROCESSED',self::command);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user