X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fchannel.php;h=689bca0be98a8028966812aa578569dbc3efdb7d;hb=47f19988d1b0e4f64fde8a385d3205c2fd476234;hp=f1e2055466ae2f7f83fe66b39b8ca9b94f2caaac;hpb=61940e37ff89710628eff1a4ad6db8df16142cec;p=quix0rs-gnu-social.git diff --git a/lib/channel.php b/lib/channel.php index f1e2055466..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 {