public function on_command($pars)
{
$bundle_id = $this->stripFileName($pars['bundle']);
$command = str_replace('..', '', $pars['command']);
$command_path = $this->configuration['support-path'] . '/bundles/' . $bundle_id . '/commands/' . $command . '.amCommandDef';
include_once $command_path;
if (function_exists('run_command')) {
run_command($this, $pars['text'], $pars);
self::raiseError('Command returned no result.');
} else {
self::raiseError('Command not found.');
}
}