X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcommandinterpreter.php;h=6e4340e5dcac05529218c6246b2aff02e35a62fa;hb=0190785b73b52e2c6069c31542f578f812a5e0ab;hp=49c733c0339c0f2c5f29f85af847f803642dcbd8;hpb=2eb6a6a9b02b51d9c8aa2f7bcff559681dd33b90;p=quix0rs-gnu-social.git diff --git a/lib/commandinterpreter.php b/lib/commandinterpreter.php index 49c733c033..6e4340e5dc 100644 --- a/lib/commandinterpreter.php +++ b/lib/commandinterpreter.php @@ -1,7 +1,7 @@ . */ -if (!defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } require_once INSTALLDIR.'/lib/command.php'; @@ -33,7 +33,7 @@ class CommandInterpreter # We try to support all the same commands as Twitter, see # http://getsatisfaction.com/twitter/topics/what_are_the_twitter_commands # There are a few compatibility commands from earlier versions of - # Laconica + # StatusNet switch(strtolower($cmd)) { case 'help': @@ -70,6 +70,26 @@ class CommandInterpreter } else { return new OffCommand($user); } + case 'join': + if (!$arg) { + return null; + } + list($other, $extra) = explode(' ', $arg, 2); + if ($extra) { + return null; + } else { + return new JoinCommand($user, $other); + } + case 'drop': + if (!$arg) { + return null; + } + list($other, $extra) = explode(' ', $arg, 2); + if ($extra) { + return null; + } else { + return new DropCommand($user, $other); + } case 'follow': case 'sub': if (!$arg) {