X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcommandinterpreter.php;h=c288c2e5f0ec66d5d781b067417bbed6931eae3f;hb=56e72ec7a138b823b8094312d935c9644838a8eb;hp=60fc4c3c44802755af6e8bc1c6a5e4ea54bd92f1;hpb=49bce941a9aae495ee7221bd367791227487b458;p=quix0rs-gnu-social.git diff --git a/lib/commandinterpreter.php b/lib/commandinterpreter.php index 60fc4c3c44..c288c2e5f0 100644 --- a/lib/commandinterpreter.php +++ b/lib/commandinterpreter.php @@ -41,6 +41,41 @@ class CommandInterpreter return null; } return new HelpCommand($user); + case 'login': + if ($arg) { + return null; + } else { + return new LoginCommand($user); + } + case 'lose': + if ($arg) { + list($other, $extra) = $this->split_arg($arg); + if ($extra) { + return null; + } else { + return new LoseCommand($user, $other); + } + } else { + return null; + } + case 'subscribers': + if ($arg) { + return null; + } else { + return new SubscribersCommand($user); + } + case 'subscriptions': + if ($arg) { + return null; + } else { + return new SubscriptionsCommand($user); + } + case 'groups': + if ($arg) { + return null; + } else { + return new GroupsCommand($user); + } case 'on': if ($arg) { list($other, $extra) = $this->split_arg($arg); @@ -134,6 +169,30 @@ class CommandInterpreter } else { return new MessageCommand($user, $other, $extra); } + case 'r': + case 'reply': + if (!$arg) { + return null; + } + list($other, $extra) = $this->split_arg($arg); + if (!$extra) { + return null; + } else { + return new ReplyCommand($user, $other, $extra); + } + case 'repeat': + case 'rp': + case 'rt': + case 'rd': + if (!$arg) { + return null; + } + list($other, $extra) = $this->split_arg($arg); + if ($extra) { + return null; + } else { + return new RepeatCommand($user, $other); + } case 'whois': if (!$arg) { return null; @@ -213,7 +272,7 @@ class CommandInterpreter return false; } } - + /** * Split arguments without triggering a PHP notice warning */ @@ -226,4 +285,3 @@ class CommandInterpreter return $pieces; } } -