summaryrefslogtreecommitdiff
path: root/plugins/Irc/ircmanager.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/ircmanager.php
parent1e5198645c0588cec11ff0bcd5e2864e88da3cdf (diff)
Code now functional - lots of error checking and extras missing still though
Diffstat (limited to 'plugins/Irc/ircmanager.php')
-rw-r--r--plugins/Irc/ircmanager.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/Irc/ircmanager.php b/plugins/Irc/ircmanager.php
index 549936ae7..2157964f6 100644
--- a/plugins/Irc/ircmanager.php
+++ b/plugins/Irc/ircmanager.php
@@ -81,13 +81,14 @@ class IrcManager extends ImManager {
*/
public function connect() {
if (!$this->conn) {
- $this->conn = new Phergie_Extended_Bot;
+ $this->conn = new Phergie_ExtendedBot;
- $password = isset($this->plugin->password) ? $this->plugin->password : '';
- $transport = isset($this->plugin->transport) ? $this->plugin->transport : 'tcp';
- $encoding = isset($this->plugin->encoding) ? $this->plugin->encoding : 'ISO-8859-1';
- $nickservpassword = isset($this->plugin->nickservpassword) ? $this->plugin->nickservpassword : '';
- $channels = isset($this->plugin->channels) ? $this->plugin->channels : array();
+ $port = empty($this->plugin->port) ? 6667 : $this->plugin->port;
+ $password = empty($this->plugin->password) ? '' : $this->plugin->password;
+ $transport = empty($this->plugin->transporttype) ? 'tcp' : $this->plugin->transporttype;
+ $encoding = empty($this->plugin->encoding) ? 'ISO-8859-1' : $this->plugin->encoding;
+ $nickservpassword = empty($this->plugin->nickservpassword) ? '' : $this->plugin->nickservpassword;
+ $channels = empty($this->plugin->channels) ? array() : $this->plugin->channels;
$config = new Phergie_Config;
$config->readArray(
@@ -95,10 +96,10 @@ class IrcManager extends ImManager {
'connections' => array(
array(
'host' => $this->plugin->host,
- 'port' => $this->plugin->port,
+ 'port' => $port,
'username' => $this->plugin->username,
'realname' => $this->plugin->realname,
- 'nick' => $this->plugin->nickname,
+ 'nick' => $this->plugin->nick,
'password' => $password,
'transport' => $transport,
'encoding' => $encoding