$cmd = strtolower($cmd);
- if (Event::handle('StartIntepretCommand', array($cmd, $arg, $user, &$result))) {
+ if (Event::handle('StartInterpretCommand', array($cmd, $arg, $user, &$result))) {
switch($cmd) {
case 'help':
if ($arg) {
}
}
break;
- case 'fav':
- if (!$arg) {
- $result = null;
- } else {
- list($other, $extra) = $this->split_arg($arg);
- if ($extra) {
- $result = null;
- } else {
- $result = new FavCommand($user, $other);
- }
- }
- break;
case 'nudge':
if (!$arg) {
$result = null;
}
}
break;
+ case 'list':
+ case 'tag':
+ if (!$arg) {
+ $result = null;
+ break;
+ }
+ list($other, $tags) = $this->split_arg($arg);
+ if (!$tags) {
+ $result = null;
+ } else {
+ $result = new TagCommand($user, $other, $tags);
+ }
+ break;
+ case 'unlist':
+ case 'untag':
+ if (!$arg) {
+ $result = null;
+ break;
+ }
+ list($other, $tags) = $this->split_arg($arg);
+ if (!$tags) {
+ $result = null;
+ } else {
+ $result = new UntagCommand($user, $other, $tags);
+ }
+ break;
case 'track':
if (!$arg) {
$result = null;
default:
$result = false;
}
-
- Event::handle('EndInterpretCommand', array($cmd, $arg, $user, $result));
+
+ Event::handle('EndInterpretCommand', array($cmd, $arg, $user, &$result));
}
return $result;