summaryrefslogtreecommitdiff
path: root/src/plugins/SenderIdentica.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/SenderIdentica.class.php')
-rw-r--r--src/plugins/SenderIdentica.class.php35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/plugins/SenderIdentica.class.php b/src/plugins/SenderIdentica.class.php
deleted file mode 100644
index ea9b343..0000000
--- a/src/plugins/SenderIdentica.class.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-require_once('Identica.class.php');
-
-class SenderIdentica extends Plugin {
- protected $config = array('username'=>'',
- 'password'=>'',
- 'length'=>140);
- private $obj;
-
- public static function description() {
- return 'Dent messages to Identi.ca.';
- }
-
- public static function configList() {
- return array('username'=>'text',
- 'password'=>'password',
- 'length'=>'int');
- }
-
- public function init() {
- $this->obj = new Identica($this->config['username'],
- $this->config['password']);
- }
-
- public function sendBroadcast($id, $subject, $body) {
- global $shorturl, $messenger;
- $url = $shorturl->get($messenger->id2url($id));
- $maxlen = $this->config['length']-(strlen($url)+1);
- if($maxlen < strlen($subject)) {
- $subject = substr($subject,0,$maxlen-3).'...';
- }
- $this->obj->updateStatus($subject.' '.$url);
- }
-}