]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/channel.php
Added scripts/command.php, can be used to run commands such as subscription on behalf...
[quix0rs-gnu-social.git] / lib / channel.php
index 3cd168786c9d69e89343170e19cdda7bf27a308c..689bca0be98a8028966812aa578569dbc3efdb7d 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 XMPPChannel extends Channel
 {