The Password Hack.
This hack adds the ability for wollabot to connect to a password protected irc server.
Background
If you look in the start.php file, you will see that one of the first methods called is $wollabot->connect_and_register();
This method reads params set in the wollabot.ini file and passes them through to the smartirc object which calls it's login() method. This method supports a password, but as written there's not provision for having wollabot connect using a password.
The Password Hack
The following hack *should* allow wollabot to send a password to those servers that require them.
Step 1.
First edit the /lib/wollabot.php file. This file is the wollabot class.
At around line 318 you will find function connect_and_register(). Delete the function and replace it with this one:
[php]
function connect_and_register() {
// Connects and sets up the connection with nick, username and realname
$this->print_log("Connection to IRC server '".$this->configuration['server'].":".$this->configuration['port']."' ".
"with nickname '".$this->configuration['nickname']."' and username '".$this->configuration['username']."'");
$this->irc->connect($this->configuration['server'], $this->configuration['port']);
if (isset($this->configuration['passwd'])) {
$this->irc->login($this->configuration['nickname'], WOLLABOT_VERSION_STRING, 0, $this->configuration['username'], $this->configuration['passwd']);
} else {
$this->irc->login($this->configuration['nickname'], WOLLABOT_VERSION_STRING, 0, $this->configuration['username']);
}
}
[/php]
Step 2.
Now edit your wollabot.ini file.
Beneath the [main] section add a new line:
passwd = "server password here"
where "server password here" will be the password required to connect to the password protected irc server.
For example if the password was gizmola, then you should have this line:
passwd = "gizmola"
Now start your wollabot, and if all goes well, it will now be able to connect to the password protected server.