* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0\r
* @link http://status.net/\r
*/\r
-\r
class MsnPlugin extends ImPlugin {\r
public $user = null;\r
public $password = null;\r
* @return string Name of service\r
*/\r
public function getDisplayName() {\r
+ // TRANS: Display name of the MSN instant messaging service.\r
return _m('MSN');\r
}\r
\r
case 'MSN':\r
require_once(INSTALLDIR.'/plugins/Msn/extlib/phpmsnclass/msn.class.php');\r
return false;\r
- case 'MsnManager':\r
- case 'Msn_waiting_message':\r
- include_once $dir . '/'.strtolower($cls).'.php';\r
- return false;\r
- default:\r
- return true;\r
}\r
+\r
+ return parent::onAutoload($cls);\r
}\r
\r
/*\r
* @return boolean\r
*/\r
public function onStartImDaemonIoManagers(&$classes) {\r
- parent::onStartImDaemonIoManagers(&$classes);\r
+ parent::onStartImDaemonIoManagers($classes);\r
$classes[] = new MsnManager($this); // handles sending/receiving\r
return true;\r
}\r
$schema = Schema::get();\r
\r
// For storing messages while sessions become ready\r
- $schema->ensureTable('msn_waiting_message',\r
- array(new ColumnDef('id', 'integer', null,\r
- false, 'PRI', null, null, true),\r
- new ColumnDef('screenname', 'varchar', 255, false),\r
- new ColumnDef('message', 'text', null, false),\r
- new ColumnDef('created', 'datetime', null, false),\r
- new ColumnDef('claimed', 'datetime')));\r
-\r
+ $schema->ensureTable('msn_waiting_message', Msn_waiting_message::schemaGet());\r
return true;\r
}\r
\r
*/\r
public function initialize() {\r
if (!isset($this->user)) {\r
- throw new Exception("Must specify a user");\r
+ // TRANS: Exception thrown when configuration for the MSN plugin is incomplete.\r
+ throw new Exception(_m('Must specify a user.'));\r
}\r
if (!isset($this->password)) {\r
- throw new Exception("Must specify a password");\r
+ // TRANS: Exception thrown when configuration for the MSN plugin is incomplete.\r
+ throw new Exception(_m('Must specify a password.'));\r
}\r
if (!isset($this->nickname)) {\r
- throw new Exception("Must specify a nickname");\r
+ // TRANS: Exception thrown when configuration for the MSN plugin is incomplete.\r
+ throw new Exception(_m('Must specify a nickname.'));\r
}\r
\r
return true;\r
public function onPluginVersion(&$versions) {\r
$versions[] = array(\r
'name' => 'MSN',\r
- 'version' => STATUSNET_VERSION,\r
+ 'version' => GNUSOCIAL_VERSION,\r
'author' => 'Luke Fitzgerald',\r
'homepage' => 'http://status.net/wiki/Plugin:MSN',\r
'rawdescription' =>\r
+ // TRANS: Plugin description.\r
_m('The MSN plugin allows users to send and receive notices over the MSN network.')\r
);\r
return true;\r