From: Brion Vibber Date: Tue, 9 Mar 2010 21:07:52 +0000 (-0800) Subject: Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8bf1b54abd860fbfa8c036aac0c3d3a5faf2f489;p=quix0rs-gnu-social.git Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x --- 8bf1b54abd860fbfa8c036aac0c3d3a5faf2f489 diff --cc lib/command.php index db8e800304,9d550550f7..0b3b3c95a2 --- a/lib/command.php +++ b/lib/command.php @@@ -668,37 -711,9 +711,37 @@@ class LoginCommand extends Comman } } +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) + function handle($channel) { $profile = $this->user->getSubscriptions(0); $nicknames=array();