]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/channel.php
Ticket #2210: adjust locale setup fallback to try more locales on the system if en_US...
[quix0rs-gnu-social.git] / lib / channel.php
index 95d576a3c137d08636ce221fe34c6e308c4f7567..689bca0be98a8028966812aa578569dbc3efdb7d 100644 (file)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('STATUSNET')) { 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
 {