X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fchannel.php;h=689bca0be98a8028966812aa578569dbc3efdb7d;hb=60e0f0426133544eaaea7ff84da5f02ca86bd8cc;hp=38c1d4d67f56f37025f8c5bc4115dda5cd3614b9;hpb=280f8faab4f692ff7f4389f82397adfa6db56325;p=quix0rs-gnu-social.git diff --git a/lib/channel.php b/lib/channel.php index 38c1d4d67f..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 { @@ -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 {