summaryrefslogtreecommitdiff
path: root/plugins/Irc/IrcPlugin.php
diff options
context:
space:
mode:
authorLuke Fitzgerald <lw.fitzgerald@googlemail.com>2010-07-20 11:16:59 -0700
committerLuke Fitzgerald <lw.fitzgerald@googlemail.com>2010-07-20 11:16:59 -0700
commitefdf9b6d4e3c6e8c4ce49a5d5f9e42658d1dc004 (patch)
tree77df03872276de9b3cfaad39839d3d638ce7e25a /plugins/Irc/IrcPlugin.php
parent1e5198645c0588cec11ff0bcd5e2864e88da3cdf (diff)
Code now functional - lots of error checking and extras missing still though
Diffstat (limited to 'plugins/Irc/IrcPlugin.php')
-rw-r--r--plugins/Irc/IrcPlugin.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/plugins/Irc/IrcPlugin.php b/plugins/Irc/IrcPlugin.php
index 0422a6389..a9044df8d 100644
--- a/plugins/Irc/IrcPlugin.php
+++ b/plugins/Irc/IrcPlugin.php
@@ -33,10 +33,9 @@ if (!defined('STATUSNET')) {
// your code file can't be executed directly from the web.
exit(1);
}
+
// We bundle the Phergie library...
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/extlib/phergie');
-require 'Phergie/Autoload.php';
-Phergie_Autoload::registerAutoloader();
/**
* Plugin for IRC
@@ -50,9 +49,16 @@ Phergie_Autoload::registerAutoloader();
*/
class IrcPlugin extends ImPlugin {
- public $user = null;
+ public $host = null;
+ public $port = null;
+ public $username = null;
+ public $realname = null;
+ public $nick = null;
public $password = null;
- public $publicFeed = array();
+ public $nickservpassword = null;
+ public $channels = null;
+ public $transporttype = null;
+ public $encoding = null;
public $transport = 'irc';
@@ -116,6 +122,10 @@ class IrcPlugin extends ImPlugin {
include_once $dir . '/'. $cls .'.php';
return false;
default:
+ if (substr($cls, 0, 7) == 'Phergie') {
+ include_once str_replace('_', DIRECTORY_SEPARATOR, $cls) . '.php';
+ return false;
+ }
return true;
}
}
@@ -173,9 +183,6 @@ class IrcPlugin extends ImPlugin {
if (!isset($this->host)) {
throw new Exception('must specify a host');
}
- if (!isset($this->port)) {
- throw new Exception('must specify a port');
- }
if (!isset($this->username)) {
throw new Exception('must specify a username');
}