]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/commandinterpreter.php
"Notice posted" message in Ajax title for NewnoticeAction
[quix0rs-gnu-social.git] / lib / commandinterpreter.php
index fe426f1fcd3a41f6b4a6515a2fcaaf10079f561e..20e7ae1acf99cbc3e32219e394b5559713e064ae 100644 (file)
@@ -37,7 +37,7 @@ class CommandInterpreter
 
         $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) {
@@ -231,18 +231,6 @@ class CommandInterpreter
                     }
                 }
                 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;
@@ -274,6 +262,32 @@ class CommandInterpreter
                     }
                 }
                 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;
@@ -313,8 +327,8 @@ class CommandInterpreter
             default:
                 $result = false;
             }
-                
-            Event::handle('EndInterpretCommand', array($cmd, $arg, $user, $result));
+
+            Event::handle('EndInterpretCommand', array($cmd, $arg, $user, &$result));
         }
 
         return $result;