summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-09 14:20:50 -0800
committerBrion Vibber <brion@pobox.com>2010-03-09 14:20:50 -0800
commit6ea7e1c06e70b4adb459555336402a284fbe3fda (patch)
tree3e3509b54b5954ddffd6636fa072bec082cf76b1 /lib
parent8bf1b54abd860fbfa8c036aac0c3d3a5faf2f489 (diff)
parent60e6172bc9e52f1e6b4941811e2d6fd6050c1c6b (diff)
Merge branch 'testing' into 0.9.x
Diffstat (limited to 'lib')
-rw-r--r--lib/channel.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/channel.php b/lib/channel.php
index 3cd168786..689bca0be 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 XMPPChannel extends Channel
{