greaderimport: add command line mode

This commit is contained in:
Andrew Dolgov
2013-03-28 18:37:36 +04:00
parent 4c92878f5f
commit 4cf0f9a900
3 changed files with 70 additions and 21 deletions

View File

@@ -172,10 +172,12 @@ class PluginHost {
return false;
}
function add_command($command, $description, $sender) {
function add_command($command, $description, $sender, $suffix = "", $arghelp = "") {
$command = str_replace("-", "_", strtolower($command));
$this->commands[$command] = array("description" => $description,
"suffix" => $suffix,
"arghelp" => $arghelp,
"class" => $sender);
}