X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fchannel.php;h=689bca0be98a8028966812aa578569dbc3efdb7d;hb=60e0f0426133544eaaea7ff84da5f02ca86bd8cc;hp=fdeff21fc6d984107a21913b190f4bf64c8d3a3e;hpb=5127396325a29d6c7b8f0e1e0ae3e0580ab30dda;p=quix0rs-gnu-social.git diff --git a/lib/channel.php b/lib/channel.php index fdeff21fc6..689bca0be9 100644 --- a/lib/channel.php +++ b/lib/channel.php @@ -1,7 +1,7 @@ . */ -if (!defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } class Channel { - function on($user) { return false; @@ -48,6 +47,25 @@ class Channel } } +class CLIChannel extends Channel +{ + function source() + { + return 'cli'; + } + + function output($user, $text) + { + $site = common_config('site', 'name'); + print "[{$user->nickname}@{$site}] $text\n"; + } + + function error($user, $text) + { + $this->output($user, $text); + } +} + class XMPPChannel extends Channel {