]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/channel.php
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.x
[quix0rs-gnu-social.git] / lib / channel.php
index 05437b4e9eaa44c3720b9ed9a192cbb7cbf43807..e83960ac5402cc41fbe1867ca2bceea31c7280f6 100644 (file)
@@ -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;