3 * StatusNet - the distributed open-source microblogging tool
4 * Copyright (C) 2008, 2009, 2010 StatusNet, Inc.
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
22 require_once(INSTALLDIR.'/lib/channel.php');
28 function __construct($user=null)
34 * Execute the command and send success or error results
35 * back via the given communications channel.
39 public function execute($channel)
42 $this->handle($channel);
43 } catch (CommandException $e) {
44 $channel->error($this->user, $e->getMessage());
45 } catch (Exception $e) {
46 common_log(LOG_ERR, "Error handling " . get_class($this) . ": " . $e->getMessage());
47 $channel->error($this->user, $e->getMessage());
52 * Override this with the meat!
54 * An error to send back to the user may be sent by throwing
55 * a CommandException with a formatted message.
58 * @throws CommandException
60 function handle($channel)
66 * Look up a notice from an argument, by poster's name to get last post
67 * or notice_id prefixed with #.
70 * @throws CommandException
72 function getNotice($arg)
75 if (Event::handle('StartCommandGetNotice', array($this, $arg, &$notice))) {
76 if(substr($this->other,0,1)=='#'){
77 // A specific notice_id #123
79 $notice = Notice::staticGet(substr($arg,1));
81 // TRANS: Command exception text shown when a notice ID is requested that does not exist.
82 throw new CommandException(_('Notice with that id does not exist.'));
86 if (Validate::uri($this->other)) {
87 // A specific notice by URI lookup
88 $notice = Notice::staticGet('uri', $arg);
92 // Local or remote profile name to get their last notice.
93 // May throw an exception and report 'no such user'
94 $recipient = $this->getProfile($arg);
96 $notice = $recipient->getCurrentNotice();
98 // TRANS: Command exception text shown when a last user notice is requested and it does not exist.
99 throw new CommandException(_('User has no last notice.'));
103 Event::handle('EndCommandGetNotice', array($this, $arg, &$notice));
105 // TRANS: Command exception text shown when a notice ID is requested that does not exist.
106 throw new CommandException(_('Notice with that id does not exist.'));
112 * Look up a local or remote profile by nickname.
115 * @throws CommandException
117 function getProfile($arg)
120 if (Event::handle('StartCommandGetProfile', array($this, $arg, &$profile))) {
122 common_relative_profile($this->user, common_canonical_nickname($arg));
124 Event::handle('EndCommandGetProfile', array($this, $arg, &$profile));
126 // TRANS: Message given requesting a profile for a non-existing user.
127 // TRANS: %s is the nickname of the user for which the profile could not be found.
128 throw new CommandException(sprintf(_('Could not find a user with nickname %s.'), $arg));
134 * Get a local user by name
136 * @throws CommandException
138 function getUser($arg)
141 if (Event::handle('StartCommandGetUser', array($this, $arg, &$user))) {
142 $user = User::staticGet('nickname', Nickname::normalize($arg));
144 Event::handle('EndCommandGetUser', array($this, $arg, &$user));
146 // TRANS: Message given getting a non-existing user.
147 // TRANS: %s is the nickname of the user that could not be found.
148 throw new CommandException(sprintf(_('Could not find a local user with nickname %s.'),
155 * Get a local or remote group by name.
157 * @throws CommandException
159 function getGroup($arg)
162 if (Event::handle('StartCommandGetGroup', array($this, $arg, &$group))) {
163 $group = User_group::getForNickname($arg, $this->user->getProfile());
165 Event::handle('EndCommandGetGroup', array($this, $arg, &$group));
167 // TRANS: Command exception text shown when a group is requested that does not exist.
168 throw new CommandException(_('No such group.'));
174 class CommandException extends Exception
178 class UnimplementedCommand extends Command
180 function handle($channel)
182 // TRANS: Error text shown when an unimplemented command is given.
183 $channel->error($this->user, _("Sorry, this command is not yet implemented."));
187 class TrackingCommand extends UnimplementedCommand
191 class TrackOffCommand extends UnimplementedCommand
195 class TrackCommand extends UnimplementedCommand
198 function __construct($user, $word)
200 parent::__construct($user);
205 class UntrackCommand extends UnimplementedCommand
208 function __construct($user, $word)
210 parent::__construct($user);
215 class NudgeCommand extends Command
218 function __construct($user, $other)
220 parent::__construct($user);
221 $this->other = $other;
224 function handle($channel)
226 $recipient = $this->getUser($this->other);
227 if ($recipient->id == $this->user->id) {
228 // TRANS: Command exception text shown when a user tries to nudge themselves.
229 throw new CommandException(_('It does not make a lot of sense to nudge yourself!'));
231 if ($recipient->email && $recipient->emailnotifynudge) {
232 mail_notify_nudge($this->user, $recipient);
235 // XXX: notify by SMS
236 // TRANS: Message given having nudged another user.
237 // TRANS: %s is the nickname of the user that was nudged.
238 $channel->output($this->user, sprintf(_('Nudge sent to %s.'),
239 $recipient->nickname));
244 class InviteCommand extends UnimplementedCommand
247 function __construct($user, $other)
249 parent::__construct($user);
250 $this->other = $other;
254 class StatsCommand extends Command
256 function handle($channel)
258 $profile = $this->user->getProfile();
260 $subs_count = $profile->subscriptionCount();
261 $subbed_count = $profile->subscriberCount();
262 $notice_count = $profile->noticeCount();
264 // TRANS: User statistics text.
265 // TRANS: %1$s is the number of other user the user is subscribed to.
266 // TRANS: %2$s is the number of users that are subscribed to the user.
267 // TRANS: %3$s is the number of notices the user has sent.
268 $channel->output($this->user, sprintf(_("Subscriptions: %1\$s\n".
269 "Subscribers: %2\$s\n".
277 class FavCommand extends Command
281 function __construct($user, $other)
283 parent::__construct($user);
284 $this->other = $other;
287 function handle($channel)
289 $notice = $this->getNotice($this->other);
292 $fave->user_id = $this->user->id;
293 $fave->notice_id = $notice->id;
296 if ($fave->fetch()) {
297 // TRANS: Error message text shown when a favorite could not be set because it has already been favorited.
298 $channel->error($this->user, _('Could not create favorite: already favorited.'));
302 $fave = Fave::addNew($this->user->getProfile(), $notice);
305 // TRANS: Error message text shown when a favorite could not be set.
306 $channel->error($this->user, _('Could not create favorite.'));
310 // @fixme favorite notification should be triggered
313 $other = User::staticGet('id', $notice->profile_id);
315 if ($other && $other->id != $this->user->id) {
316 if ($other->email && $other->emailnotifyfav) {
317 mail_notify_fave($other, $this->user, $notice);
321 $this->user->blowFavesCache();
323 // TRANS: Text shown when a notice has been marked as favourite successfully.
324 $channel->output($this->user, _('Notice marked as fave.'));
328 class JoinCommand extends Command
332 function __construct($user, $other)
334 parent::__construct($user);
335 $this->other = $other;
338 function handle($channel)
340 $group = $this->getGroup($this->other);
343 if ($cur->isMember($group)) {
344 // TRANS: Error text shown a user tries to join a group they already are a member of.
345 $channel->error($cur, _('You are already a member of that group.'));
348 if (Group_block::isBlocked($group, $cur->getProfile())) {
349 // TRANS: Error text shown when a user tries to join a group they are blocked from joining.
350 $channel->error($cur, _('You have been blocked from that group by the admin.'));
355 if (Event::handle('StartJoinGroup', array($group, $cur))) {
356 Group_member::join($group->id, $cur->id);
357 Event::handle('EndJoinGroup', array($group, $cur));
359 } catch (Exception $e) {
360 // TRANS: Message given having failed to add a user to a group.
361 // TRANS: %1$s is the nickname of the user, %2$s is the nickname of the group.
362 $channel->error($cur, sprintf(_('Could not join user %1$s to group %2$s.'),
363 $cur->nickname, $group->nickname));
367 // TRANS: Message given having added a user to a group.
368 // TRANS: %1$s is the nickname of the user, %2$s is the nickname of the group.
369 $channel->output($cur, sprintf(_('%1$s joined group %2$s.'),
375 class DropCommand extends Command
379 function __construct($user, $other)
381 parent::__construct($user);
382 $this->other = $other;
385 function handle($channel)
387 $group = $this->getGroup($this->other);
391 // TRANS: Error text shown when trying to leave a group that does not exist.
392 $channel->error($cur, _('No such group.'));
396 if (!$cur->isMember($group)) {
397 // TRANS: Error text shown when trying to leave an existing group the user is not a member of.
398 $channel->error($cur, _('You are not a member of that group.'));
403 if (Event::handle('StartLeaveGroup', array($group, $cur))) {
404 Group_member::leave($group->id, $cur->id);
405 Event::handle('EndLeaveGroup', array($group, $cur));
407 } catch (Exception $e) {
408 // TRANS: Message given having failed to remove a user from a group.
409 // TRANS: %1$s is the nickname of the user, %2$s is the nickname of the group.
410 $channel->error($cur, sprintf(_('Could not remove user %1$s from group %2$s.'),
411 $cur->nickname, $group->nickname));
415 // TRANS: Message given having removed a user from a group.
416 // TRANS: %1$s is the nickname of the user, %2$s is the nickname of the group.
417 $channel->output($cur, sprintf(_('%1$s left group %2$s.'),
423 class WhoisCommand extends Command
426 function __construct($user, $other)
428 parent::__construct($user);
429 $this->other = $other;
432 function handle($channel)
434 $recipient = $this->getProfile($this->other);
436 // TRANS: Whois output.
437 // TRANS: %1$s nickname of the queried user, %2$s is their profile URL.
438 $whois = sprintf(_m('WHOIS',"%1\$s (%2\$s)"), $recipient->nickname,
439 $recipient->profileurl);
440 if ($recipient->fullname) {
441 // TRANS: Whois output. %s is the full name of the queried user.
442 $whois .= "\n" . sprintf(_('Fullname: %s'), $recipient->fullname);
444 if ($recipient->location) {
445 // TRANS: Whois output. %s is the location of the queried user.
446 $whois .= "\n" . sprintf(_('Location: %s'), $recipient->location);
448 if ($recipient->homepage) {
449 // TRANS: Whois output. %s is the homepage of the queried user.
450 $whois .= "\n" . sprintf(_('Homepage: %s'), $recipient->homepage);
452 if ($recipient->bio) {
453 // TRANS: Whois output. %s is the bio information of the queried user.
454 $whois .= "\n" . sprintf(_('About: %s'), $recipient->bio);
456 $channel->output($this->user, $whois);
460 class MessageCommand extends Command
464 function __construct($user, $other, $text)
466 parent::__construct($user);
467 $this->other = $other;
471 function handle($channel)
474 $other = $this->getUser($this->other);
475 } catch (CommandException $e) {
477 $profile = $this->getProfile($this->other);
478 } catch (CommandException $f) {
481 // TRANS: Command exception text shown when trying to send a direct message to a remote user (a user not registered at the current server).
482 // TRANS: %s is a remote profile.
483 throw new CommandException(sprintf(_('%s is a remote profile; you can only send direct messages to users on the same server.'), $this->other));
486 $len = mb_strlen($this->text);
489 // TRANS: Command exception text shown when trying to send a direct message to another user without content.
490 $channel->error($this->user, _('No content!'));
494 $this->text = $this->user->shortenLinks($this->text);
496 if (Message::contentTooLong($this->text)) {
497 // XXX: i18n. Needs plural support.
498 // TRANS: Message given if content is too long. %1$sd is used for plural.
499 // TRANS: %1$d is the maximum number of characters, %2$d is the number of submitted characters.
500 $channel->error($this->user, sprintf(_m('Message too long - maximum is %1$d character, you sent %2$d.',
501 'Message too long - maximum is %1$d characters, you sent %2$d.',
502 Message::maxContent()),
503 Message::maxContent(), mb_strlen($this->text)));
508 // TRANS: Error text shown when trying to send a direct message to a user that does not exist.
509 $channel->error($this->user, _('No such user.'));
511 } else if (!$this->user->mutuallySubscribed($other)) {
512 // TRANS: Error text shown when trying to send a direct message to a user without a mutual subscription (each user must be subscribed to the other).
513 $channel->error($this->user, _('You can\'t send a message to this user.'));
515 } else if ($this->user->id == $other->id) {
516 // TRANS: Error text shown when trying to send a direct message to self.
517 $channel->error($this->user, _('Don\'t send a message to yourself; just say it to yourself quietly instead.'));
520 $message = Message::saveNew($this->user->id, $other->id, $this->text, $channel->source());
523 // TRANS: Message given have sent a direct message to another user.
524 // TRANS: %s is the name of the other user.
525 $channel->output($this->user, sprintf(_('Direct message to %s sent.'), $this->other));
527 // TRANS: Error text shown sending a direct message fails with an unknown reason.
528 $channel->error($this->user, _('Error sending direct message.'));
533 class RepeatCommand extends Command
536 function __construct($user, $other)
538 parent::__construct($user);
539 $this->other = $other;
542 function handle($channel)
544 $notice = $this->getNotice($this->other);
546 if($this->user->id == $notice->profile_id)
548 // TRANS: Error text shown when trying to repeat an own notice.
549 $channel->error($this->user, _('Cannot repeat your own notice.'));
553 if ($this->user->getProfile()->hasRepeated($notice->id)) {
554 // TRANS: Error text shown when trying to repeat an notice that was already repeated by the user.
555 $channel->error($this->user, _('Already repeated that notice.'));
559 $repeat = $notice->repeat($this->user->id, $channel->source);
563 // TRANS: Message given having repeated a notice from another user.
564 // TRANS: %s is the name of the user for which the notice was repeated.
565 $channel->output($this->user, sprintf(_('Notice from %s repeated.'), $recipient->nickname));
567 // TRANS: Error text shown when repeating a notice fails with an unknown reason.
568 $channel->error($this->user, _('Error repeating notice.'));
573 class ReplyCommand extends Command
577 function __construct($user, $other, $text)
579 parent::__construct($user);
580 $this->other = $other;
584 function handle($channel)
586 $notice = $this->getNotice($this->other);
587 $recipient = $notice->getProfile();
589 $len = mb_strlen($this->text);
592 // TRANS: Command exception text shown when trying to reply to a notice without providing content for the reply.
593 $channel->error($this->user, _('No content!'));
597 $this->text = $this->user->shortenLinks($this->text);
599 if (Notice::contentTooLong($this->text)) {
600 // XXX: i18n. Needs plural support.
601 // TRANS: Message given if content of a notice for a reply is too long. %1$d is used for plural.
602 // TRANS: %1$d is the maximum number of characters, %2$d is the number of submitted characters.
603 $channel->error($this->user, sprintf(_m('Notice too long - maximum is %1$d character, you sent %2$d.',
604 'Notice too long - maximum is %1$d characters, you sent %2$d.',
605 Notice::maxContent()),
606 Notice::maxContent(), mb_strlen($this->text)));
610 $notice = Notice::saveNew($this->user->id, $this->text, $channel->source(),
611 array('reply_to' => $notice->id));
614 // TRANS: Text shown having sent a reply to a notice successfully.
615 // TRANS: %s is the nickname of the user of the notice the reply was sent to.
616 $channel->output($this->user, sprintf(_('Reply to %s sent.'), $recipient->nickname));
618 // TRANS: Error text shown when a reply to a notice fails with an unknown reason.
619 $channel->error($this->user, _('Error saving notice.'));
625 class GetCommand extends Command
629 function __construct($user, $other)
631 parent::__construct($user);
632 $this->other = $other;
635 function handle($channel)
637 $target = $this->getProfile($this->other);
639 $notice = $target->getCurrentNotice();
641 // TRANS: Error text shown when a last user notice is requested and it does not exist.
642 $channel->error($this->user, _('User has no last notice.'));
645 $notice_content = $notice->content;
647 $channel->output($this->user, $target->nickname . ": " . $notice_content);
651 class SubCommand extends Command
655 function __construct($user, $other)
657 parent::__construct($user);
658 $this->other = $other;
661 function handle($channel)
665 // TRANS: Error text shown when no username was provided when issuing a subscribe command.
666 $channel->error($this->user, _('Specify the name of the user to subscribe to.'));
670 $target = $this->getProfile($this->other);
672 $remote = Remote_profile::staticGet('id', $target->id);
674 // TRANS: Command exception text shown when trying to subscribe to an OMB profile using the subscribe command.
675 throw new CommandException(_("Can't subscribe to OMB profiles by command."));
679 Subscription::start($this->user->getProfile(),
681 // TRANS: Text shown after having subscribed to another user successfully.
682 // TRANS: %s is the name of the user the subscription was requested for.
683 $channel->output($this->user, sprintf(_('Subscribed to %s.'), $this->other));
684 } catch (Exception $e) {
685 $channel->error($this->user, $e->getMessage());
690 class UnsubCommand extends Command
694 function __construct($user, $other)
696 parent::__construct($user);
697 $this->other = $other;
700 function handle($channel)
703 // TRANS: Error text shown when no username was provided when issuing an unsubscribe command.
704 $channel->error($this->user, _('Specify the name of the user to unsubscribe from.'));
708 $target = $this->getProfile($this->other);
711 Subscription::cancel($this->user->getProfile(),
713 // TRANS: Text shown after having unsubscribed from another user successfully.
714 // TRANS: %s is the name of the user the unsubscription was requested for.
715 $channel->output($this->user, sprintf(_('Unsubscribed from %s.'), $this->other));
716 } catch (Exception $e) {
717 $channel->error($this->user, $e->getMessage());
722 class OffCommand extends Command
726 function __construct($user, $other=null)
728 parent::__construct($user);
729 $this->other = $other;
731 function handle($channel)
734 // TRANS: Error text shown when issuing the command "off" with a setting which has not yet been implemented.
735 $channel->error($this->user, _("Command not yet implemented."));
737 if ($channel->off($this->user)) {
738 // TRANS: Text shown when issuing the command "off" successfully.
739 $channel->output($this->user, _('Notification off.'));
741 // TRANS: Error text shown when the command "off" fails for an unknown reason.
742 $channel->error($this->user, _('Can\'t turn off notification.'));
748 class OnCommand extends Command
751 function __construct($user, $other=null)
753 parent::__construct($user);
754 $this->other = $other;
757 function handle($channel)
760 // TRANS: Error text shown when issuing the command "on" with a setting which has not yet been implemented.
761 $channel->error($this->user, _("Command not yet implemented."));
763 if ($channel->on($this->user)) {
764 // TRANS: Text shown when issuing the command "on" successfully.
765 $channel->output($this->user, _('Notification on.'));
767 // TRANS: Error text shown when the command "on" fails for an unknown reason.
768 $channel->error($this->user, _('Can\'t turn on notification.'));
774 class LoginCommand extends Command
776 function handle($channel)
778 $disabled = common_config('logincommand','disabled');
779 $disabled = isset($disabled) && $disabled;
781 // TRANS: Error text shown when issuing the login command while login is disabled.
782 $channel->error($this->user, _('Login command is disabled.'));
787 $login_token = Login_token::makeNew($this->user);
788 } catch (Exception $e) {
789 $channel->error($this->user, $e->getMessage());
792 $channel->output($this->user,
793 // TRANS: Text shown after issuing the login command successfully.
794 // TRANS: %s is a logon link..
795 sprintf(_('This link is useable only once and is valid for only 2 minutes: %s.'),
796 common_local_url('otp',
797 array('user_id' => $login_token->user_id, 'token' => $login_token->token))));
801 class LoseCommand extends Command
805 function __construct($user, $other)
807 parent::__construct($user);
808 $this->other = $other;
811 function execute($channel)
814 // TRANS: Error text shown when no username was provided when issuing the command.
815 $channel->error($this->user, _('Specify the name of the user to unsubscribe from.'));
819 $result = Subscription::cancel($this->getProfile($this->other), $this->user->getProfile());
822 // TRANS: Text shown after issuing the lose command successfully (stop another user from following the current user).
823 // TRANS: %s is the name of the user the unsubscription was requested for.
824 $channel->output($this->user, sprintf(_('Unsubscribed %s.'), $this->other));
826 $channel->error($this->user, $result);
831 class SubscriptionsCommand extends Command
833 function handle($channel)
835 $profile = $this->user->getSubscriptions(0);
837 while ($profile->fetch()) {
838 $nicknames[]=$profile->nickname;
840 if(count($nicknames)==0){
841 // TRANS: Text shown after requesting other users a user is subscribed to without having any subscriptions.
842 $out=_('You are not subscribed to anyone.');
844 // TRANS: Text shown after requesting other users a user is subscribed to.
845 // TRANS: This message supports plural forms. This message is followed by a
846 // TRANS: hard coded space and a comma separated list of subscribed users.
847 $out = ngettext('You are subscribed to this person:',
848 'You are subscribed to these people:',
851 $out .= implode(', ',$nicknames);
853 $channel->output($this->user,$out);
857 class SubscribersCommand extends Command
859 function handle($channel)
861 $profile = $this->user->getSubscribers();
863 while ($profile->fetch()) {
864 $nicknames[]=$profile->nickname;
866 if(count($nicknames)==0){
867 // TRANS: Text shown after requesting other users that are subscribed to a user
868 // TRANS: (followers) without having any subscribers.
869 $out=_('No one is subscribed to you.');
871 // TRANS: Text shown after requesting other users that are subscribed to a user (followers).
872 // TRANS: This message supports plural forms. This message is followed by a
873 // TRANS: hard coded space and a comma separated list of subscribing users.
874 $out = ngettext('This person is subscribed to you:',
875 'These people are subscribed to you:',
878 $out .= implode(', ',$nicknames);
880 $channel->output($this->user,$out);
884 class GroupsCommand extends Command
886 function handle($channel)
888 $group = $this->user->getGroups();
890 while ($group->fetch()) {
891 $groups[]=$group->nickname;
893 if(count($groups)==0){
894 // TRANS: Text shown after requesting groups a user is subscribed to without having
895 // TRANS: any group subscriptions.
896 $out=_('You are not a member of any groups.');
898 // TRANS: Text shown after requesting groups a user is subscribed to.
899 // TRANS: This message supports plural forms. This message is followed by a
900 // TRANS: hard coded space and a comma separated list of subscribed groups.
901 $out = ngettext('You are a member of this group:',
902 'You are a member of these groups:',
904 $out.=implode(', ',$groups);
906 $channel->output($this->user,$out);
910 class HelpCommand extends Command
912 function handle($channel)
914 $channel->output($this->user,
915 // TRANS: Help text for commands. Do not translate the command names themselves; they are fixed strings.
917 "on - turn on notifications\n".
918 "off - turn off notifications\n".
919 "help - show this help\n".
920 "follow <nickname> - subscribe to user\n".
921 "groups - lists the groups you have joined\n".
922 "subscriptions - list the people you follow\n".
923 "subscribers - list the people that follow you\n".
924 "leave <nickname> - unsubscribe from user\n".
925 "d <nickname> <text> - direct message to user\n".
926 "get <nickname> - get last notice from user\n".
927 "whois <nickname> - get profile info on user\n".
928 "lose <nickname> - force user to stop following you\n".
929 "fav <nickname> - add user's last notice as a 'fave'\n".
930 "fav #<notice_id> - add notice with the given id as a 'fave'\n".
931 "repeat #<notice_id> - repeat a notice with a given id\n".
932 "repeat <nickname> - repeat the last notice from user\n".
933 "reply #<notice_id> - reply to notice with a given id\n".
934 "reply <nickname> - reply to the last notice from user\n".
935 "join <group> - join group\n".
936 "login - Get a link to login to the web interface\n".
937 "drop <group> - leave group\n".
938 "stats - get your stats\n".
939 "stop - same as 'off'\n".
940 "quit - same as 'off'\n".
941 "sub <nickname> - same as 'follow'\n".
942 "unsub <nickname> - same as 'leave'\n".
943 "last <nickname> - same as 'get'\n".
944 "on <nickname> - not yet implemented.\n".
945 "off <nickname> - not yet implemented.\n".
946 "nudge <nickname> - remind a user to update.\n".
947 "invite <phone number> - not yet implemented.\n".
948 "track <word> - not yet implemented.\n".
949 "untrack <word> - not yet implemented.\n".
950 "track off - not yet implemented.\n".
951 "untrack all - not yet implemented.\n".
952 "tracks - not yet implemented.\n".
953 "tracking - not yet implemented.\n"));