Added areafix command %LIST
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 32s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m35s
Create Docker Image / Final Docker Image Manifest (push) Successful in 8s

This commit is contained in:
2024-11-02 00:10:38 +11:00
parent a310f4190c
commit f6134c0a98
6 changed files with 220 additions and 5 deletions

View File

@@ -79,8 +79,16 @@ final class Areafix extends Process
array_unshift($command,'%AREA');
}
// Parse the message body and pluck out the commands on each line
$class = self::areafix_commands.ucfirst(strtolower(substr($command[0],1)));
// Some commands are reserved words
switch ($x=strtolower(substr($command[0],1))) {
case 'list':
$class = self::areafix_commands.'Arealist';
break;
default:
// Parse the message body and pluck out the commands on each line
$class = self::areafix_commands.ucfirst($x);
}
if (! class_exists($class)) {
$result->push(sprintf('%-25s <-- **COMMAND UNKNOWN**',join(' ',$command)));