X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fchannel.php;h=689bca0be98a8028966812aa578569dbc3efdb7d;hb=3172b50fc7eec9a2ae2b27abe5e9ab3e0875558c;hp=340de640820416231c1c3026150e5d092fed02d4;hpb=793a6a1155996a7bcdc068fc891e7063934bdb19;p=quix0rs-gnu-social.git diff --git a/lib/channel.php b/lib/channel.php index 340de64082..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 {