SYNOPSIS
# with all defaults
my $bot = Bot::BasicBot->new( channels => ["#bottest"] );
$bot->run();
# with all known options
my $bot = Bot::BasicBot->new(
server => "irc.example.com",
port => "6667",
channels => ["#bottest"],
nick => "basicbot",
alt_nicks => ["bbot", "simplebot"],
username => "bot",
name => "Yet Another Bot",
ignore_list => [qw(dipsy dadadodo laotse)],
charset => "utf-8", # charset the bot assumes the channel is using
);
$bot->run();
Basic bot system designed to make it easy to do simple bots, optionally forking longer processes (like searches) concurrently in the background.
There are several examples of bots using Bot::BasicBot in the examples/ folder in the Bot::BasicBot tarball. If you installed Bot::BasicBot through CPAN, see http://jerakeen.org/programming/Bot-BasicBot for more docs and examples.
A quick summary, though - You want to define your own package that subclasses Bot::BasicBot, override various methods (documented below), then call new() and run() on it.
STARTING THE BOT
new( key => value, .. )
Creates a new instance of the class. Name value pairs may be passed which will have the same effect as calling the method of that name with the value supplied. Returns a Bot::BasicBot object, that you can call 'run' on later.
eg:
my $bot = Bot::BasicBot->new( nick => 'superbot', channels => [ '#superheroes' ] );
run()
Runs the bot. Hands the control over to the POE core.
Product's homepage
Requirements:
· Perl