From c8fd8fa00f30cb2862a6feb32bc1b7d3a394c565 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 4 Oct 2008 11:48:46 -0400 Subject: fill out commands, move to separate file darcs-hash:20081004154846-5ed1f-02f7c93248af00fd22e7bb3520179ef1f31da121.gz --- classes/CommandInterpreter.php | 145 +---------------------------------------- 1 file changed, 2 insertions(+), 143 deletions(-) (limited to 'classes/CommandInterpreter.php') diff --git a/classes/CommandInterpreter.php b/classes/CommandInterpreter.php index 58e6a9c07..4e27f8f79 100644 --- a/classes/CommandInterpreter.php +++ b/classes/CommandInterpreter.php @@ -19,6 +19,8 @@ if (!defined('LACONICA')) { exit(1); } +require_once(INSTALLDIR.'/classes/Command.php'); + class CommandInterpreter { function handle_command($user, $text) { @@ -191,146 +193,3 @@ class CommandInterpreter { } } -class Channel { - - function on($user) { - } - - function off($user) { - } - - function output($user) { - } - - function error($user) { - } -} - -class Command { - - var $user = NULL; - - function __construct($user=NULL) { - $this->user = $user; - } - - function execute($channel) { - return false; - } -} - -class UnimplementedCommand extends Command { - function execute($channel) { - $channel->error(_("Sorry, this command is not yet implemented.")); - } -} - -class TrackingCommand extends UnimplementedCommand { -} - -class TrackOffCommand extends UnimplementedCommand { -} - -class TrackCommand extends UnimplementedCommand { - var $word = NULL; - function __construct($user, $word) { - parent::__construct($user); - $this->word = $word; - } -} - -class UntrackCommand extends UnimplementedCommand { - var $word = NULL; - function __construct($user, $word) { - parent::__construct($user); - $this->word = $word; - } -} - -class NudgeCommand extends UnimplementedCommand { - var $other = NULL; - function __construct($user, $other) { - parent::__construct($user); - $this->other = $other; - } -} - -class InviteCommand extends UnimplementedCommand { - var $other = NULL; - function __construct($user, $other) { - parent::__construct($user); - $this->other = $other; - } -} - -class StatsCommand extends UnimplementedCommand { -} - -class FaveCommand extends UnimplementedCommand { - var $other = NULL; - function __construct($user, $other) { - parent::__construct($user); - $this->other = $other; - } -} - -class WhoisCommand extends UnimplementedCommand { - var $other = NULL; - function __construct($user, $other) { - parent::__construct($user); - $this->other = $other; - } -} - -class MessageCommand extends UnimplementedCommand { - var $other = NULL; - var $text = NULL; - function __construct($user, $other, $text) { - parent::__construct($user); - $this->other = $other; - $this->text = $other; - } -} - -class GetCommand extends UnimplementedCommand { - var $other = NULL; - function __construct($user, $other) { - parent::__construct($user); - $this->other = $other; - } -} - -class SubCommand extends UnimplementedCommand { - var $other = NULL; - function __construct($user, $other) { - parent::__construct($user); - $this->other = $other; - } -} - -class UnsubCommand extends UnimplementedCommand { - var $other = NULL; - function __construct($user, $other) { - parent::__construct($user); - $this->other = $other; - } -} - -class OffCommand extends UnimplementedCommand { - var $other = NULL; - function __construct($user, $other=NULL) { - parent::__construct($user); - $this->other = $other; - } -} - -class OnCommand extends UnimplementedCommand { - var $other = NULL; - function __construct($user, $other=NULL) { - parent::__construct($user); - $this->other = $other; - } -} - -class HelpCommand extends UnimplementedCommand { -} -- cgit v1.2.3-54-g00ecf