summaryrefslogtreecommitdiff
path: root/lib/command.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-24 15:48:27 -0800
committerBrion Vibber <brion@pobox.com>2010-02-24 15:48:27 -0800
commit3194a86caa02f5796f468a7d2ebc8e54139fb1cb (patch)
tree7e1047fd9ccc7da5cd078ddc7ca13147069881d6 /lib/command.php
parent59be4b8cae992476628b23c2976d335e4f704c89 (diff)
parentf0d1d07b94fbd2fe0ecd1c2f18d831a177d11c5c (diff)
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/command.php')
-rw-r--r--lib/command.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/command.php b/lib/command.php
index ea7b60372..db8e80030 100644
--- a/lib/command.php
+++ b/lib/command.php
@@ -668,6 +668,34 @@ class LoginCommand extends Command
}
}
+class LoseCommand extends Command
+{
+
+ var $other = null;
+
+ function __construct($user, $other)
+ {
+ parent::__construct($user);
+ $this->other = $other;
+ }
+
+ function execute($channel)
+ {
+ if(!$this->other) {
+ $channel->error($this->user, _('Specify the name of the user to unsubscribe from'));
+ return;
+ }
+
+ $result=subs_unsubscribe_from($this->user, $this->other);
+
+ if ($result) {
+ $channel->output($this->user, sprintf(_('Unsubscribed %s'), $this->other));
+ } else {
+ $channel->error($this->user, $result);
+ }
+ }
+}
+
class SubscriptionsCommand extends Command
{
function execute($channel)
@@ -750,6 +778,7 @@ class HelpCommand extends Command
"d <nickname> <text> - direct message to user\n".
"get <nickname> - get last notice from user\n".
"whois <nickname> - get profile info on user\n".
+ "lose <nickname> - force user to stop following you\n".
"fav <nickname> - add user's last notice as a 'fave'\n".
"fav #<notice_id> - add notice with the given id as a 'fave'\n".
"repeat #<notice_id> - repeat a notice with a given id\n".