fill out commands, move to separate file

darcs-hash:20081004154846-5ed1f-02f7c93248af00fd22e7bb3520179ef1f31da121.gz
This commit is contained in:
Evan Prodromou
2008-10-04 11:48:46 -04:00
parent fa2d50f481
commit c8fd8fa00f
3 changed files with 390 additions and 143 deletions

View File

@@ -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 {
}