summaryrefslogtreecommitdiff
path: root/lib/commandinterpreter.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-10-02 15:27:55 -0400
committerEvan Prodromou <evan@status.net>2009-10-02 15:27:55 -0400
commitb3b3af9a2eff10c272bb213eccd3dd3060bc5830 (patch)
treeff0ae9108bcb085015a8e9f286963ad9fe58c13c /lib/commandinterpreter.php
parent51ac34e80c5a99008b1a945b2c00b6dbfdde1529 (diff)
parent5309910b9b4dd2533ff5b2190f90bf415fd20113 (diff)
Merge branch '0.8.x' into deleteuser
Diffstat (limited to 'lib/commandinterpreter.php')
-rw-r--r--lib/commandinterpreter.php28
1 files changed, 24 insertions, 4 deletions
diff --git a/lib/commandinterpreter.php b/lib/commandinterpreter.php
index 6538d4442..6e4340e5d 100644
--- a/lib/commandinterpreter.php
+++ b/lib/commandinterpreter.php
@@ -1,7 +1,7 @@
<?php
/*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, 2009, Control Yourself, Inc.
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2008, 2009, StatusNet, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-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) {