« Patching the MSN Bots »


.: Patching the MSN Bots :.
First of all, you'll need an updated module. You can download one from Chaos AI Technology.

In most, if not all, of the Chaosbot Programs that connect to MSN, the connection information is mostly the same. Here's what to change to match the new MSN modules:

Change To
Step One:
MSN->new()

This might be found around the lines of
$client = MSN->new();

MSN->new('',Handle => $handle, Password => $password, Debug => 1);

This is assuming that $handle and $password have already been defined as the e-mail and password for the bot.

Step Two:
This entire block of text can go:

$client->connect("$handle","$password", '', {
    Status  => \&Status,
    Answer  => \&Answer,
    Message => \&Message,     Join    => \&Join }
) or die "Error: Cannot connect to the MSN server!";

And replace all that with this:

$msn->set_handler(Connected => \&Connected);
$msn->set_handler(Message   => \&Message);
$msn->set_handler(Answer    => \&Answer);
$msn->set_handler(Join      => \&Join);

Step Three:
Now you just have to add a few things... Add this to the bot.pl after all the above changes:

$msn->connect();

while (1) {
     $msn->do_one_loop();
}