summaryrefslogtreecommitdiff
path: root/lib/channel.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/channel.php')
-rw-r--r--lib/channel.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/channel.php b/lib/channel.php
index 05437b4e9..e83960ac5 100644
--- a/lib/channel.php
+++ b/lib/channel.php
@@ -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 WebChannel extends Channel
{
var $out = null;