* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
-
class AimPlugin extends ImPlugin
{
public $user = null;
function getDisplayName()
{
+ // TRANS: Display name.
return _m('AIM');
}
return strtolower($screenname);
}
- function daemon_screenname()
+ function daemonScreenname()
{
return $this->user;
}
case 'Aim':
require_once(INSTALLDIR.'/plugins/Aim/extlib/phptoclib/aimclassw.php');
return false;
- case 'AimManager':
- include_once $dir . '/'.strtolower($cls).'.php';
- return false;
- case 'Fake_Aim':
- include_once $dir . '/'. $cls .'.php';
- return false;
- default:
- return true;
}
+
+ return parent::onAutoload($cls);
}
function onStartImDaemonIoManagers(&$classes)
{
- parent::onStartImDaemonIoManagers(&$classes);
+ parent::onStartImDaemonIoManagers($classes);
$classes[] = new AimManager($this); // handles sending/receiving
return true;
}
function microiduri($screenname)
{
- return 'aim:' . $screenname;
+ return 'aim:' . $screenname;
}
- function send_message($screenname, $body)
+ function sendMessage($screenname, $body)
{
$this->fake_aim->sendIm($screenname, $body);
- $this->enqueue_outgoing_raw($this->fake_aim->would_be_sent);
+ $this->enqueueOutgoingRaw($this->fake_aim->would_be_sent);
return true;
}
*
* @return true if processing completed, false if message should be reprocessed
*/
- function receive_raw_message($message)
+ function receiveRawMessage($message)
{
$info=Aim::getMessageInfo($message);
$from = $info['from'];
- $user = $this->get_user($from);
+ $user = $this->getUser($from);
$notice_text = $info['message'];
- $this->handle_incoming($from, $notice_text);
+ $this->handleIncoming($from, $notice_text);
return true;
}
function initialize(){
if(!isset($this->user)){
- throw new Exception("must specify a user");
+ // TRANS: Exception thrown in AIM plugin when user has not been specified.
+ throw new Exception(_m('Must specify a user.'));
}
if(!isset($this->password)){
- throw new Exception("must specify a password");
+ // TRANS: Exception thrown in AIM plugin when password has not been specified.
+ throw new Exception(_m('Must specify a password.'));
}
$this->fake_aim = new Fake_Aim($this->user,$this->password,4);
return true;
}
- function onPluginVersion(&$versions)
+ function onPluginVersion(array &$versions)
{
$versions[] = array('name' => 'AIM',
- 'version' => STATUSNET_VERSION,
+ 'version' => GNUSOCIAL_VERSION,
'author' => 'Craig Andrews',
'homepage' => 'http://status.net/wiki/Plugin:AIM',
'rawdescription' =>
+ // TRANS: Plugin description.
_m('The AIM plugin allows users to send and receive notices over the AIM network.'));
return true;
}
}
-