summaryrefslogtreecommitdiff
path: root/src/plugins/SenderGVSMS.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/SenderGVSMS.class.php')
-rw-r--r--src/plugins/SenderGVSMS.class.php34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/plugins/SenderGVSMS.class.php b/src/plugins/SenderGVSMS.class.php
deleted file mode 100644
index 7919007..0000000
--- a/src/plugins/SenderGVSMS.class.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-require_once('GoogleVoice.class.php');
-
-class SenderGVSMS extends Plugin {
- protected $config = array('username'=>'',
- 'password'=>'',
- 'length'=>160);
- private $obj;
-
- public static function description() {
- return 'Send messages over SMS via GoogleVoice.';
- }
-
- public static function configList() {
- return array('username'=>'text',
- 'password'=>'password');
- }
-
- public function init() {
- $this->obj = new GoogleVoice($this->config['username'],
- $this->config['password']);
- }
-
- public function sendPrivate($phoneNum, $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->sms($phoneNum, $subject.' '.$url);
- }
-}