]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/channel.php
Merge branch 'testing' into 0.9.x
[quix0rs-gnu-social.git] / lib / channel.php
index f1e2055466ae2f7f83fe66b39b8ca9b94f2caaac..689bca0be98a8028966812aa578569dbc3efdb7d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2008, 2009, StatusNet, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-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
 {