Add help command

This commit is contained in:
Ely Deckers 2022-02-18 12:22:09 +01:00
parent 1965594c66
commit 718fcfdf8b
1 changed files with 7 additions and 1 deletions

View File

@ -1410,11 +1410,17 @@ function main($arguments)
$command = strtolower($arguments[1]);
$parameters = array_slice($arguments, 2);
if ($command == "help") {
print_r(COMMAND_HANDLERS);
exit;
}
$is_known_command = in_array($command, COMMAND_HANDLERS);
if (!$is_known_command) {
PfzCommands::pfz_test();
return;
exit;
}
PfzCommands::{"pfz_$command"}(...$parameters);