X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fchannel.php;h=689bca0be98a8028966812aa578569dbc3efdb7d;hb=3172b50fc7eec9a2ae2b27abe5e9ab3e0875558c;hp=cb35e5ddb623034acb30077832d7b014e2956287;hpb=c8b8f07af14ad2ce9d0c0267962dd3bbf6473a4b;p=quix0rs-gnu-social.git diff --git a/lib/channel.php b/lib/channel.php index cb35e5ddb6..689bca0be9 100644 --- a/lib/channel.php +++ b/lib/channel.php @@ -1,6 +1,6 @@ . */ -if (!defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } class Channel { @@ -47,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 {