Freyr - IRC bot with multi-network and web API
version 0.001
use Freyr;
use Freyr::Plugin::Say;
my $bot = Freyr->new(
host => 'irc.perl.org',
channels => [ '#freyr' ],
nick => 'freyr',
prefix => '!',
plugins => {
say => Freyr::Plugin::Say->new,
},
);
$bot->start;
# In #freyr on irc.perl.org...
# -- Message addressed to the bot
# > freyr, say I'm a little teapot
# freyr> I'm a little teapot
# -- "prefix" message
# > !say Short and stout
# freyr> Short and stout
Freyr is an IRC bot designed for multiple networks and a web interface.
The default nickname for the bot
The prefix character. A shortcut to address the bot.
The default host to connect to in single-network mode.
The default port to connect to in single-network mode.
The network the bot is currently connected to.
The channel names to connect to in single-network mode.
The plugins to attach to this bot, keyed by route. The plugin will be registered with the given route.
The Mojo::Log object attached to this bot
The Mojo::IOLoop the bot should use.
The Freyr::Route for the entire bot.
Initialize the network in single-network mode.
Get a channel object, joining the channel if necessary.
Add a route to the entire bot. Routes must be unique. Only one route will be triggered for every message.
Doug Bell preaction@cpan.org
This software is copyright (c) 2014 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.