NAME
Moses - A framework for building IRC bots quickly and easily.
VERSION
This documentation refers to version 0.04.
SYNOPSIS
package SampleBot;
use Moses;
use namespace::autoclean;
server 'irc.perl.org';
nickname 'sample-bot';
channels '#bots';
has message => (
isa => 'Str',
is => 'rw',
default => 'Hello',
);
event irc_bot_addressed => sub {
my ( $self, $nickstr, $channel, $msg ) = @_[ OBJECT, ARG0, ARG1, ARG2 ];
my ($nick) = split /!/, $nickstr;
$self->privmsg( $channel => "$nick: ${ \$self->message }" );
};
__PACKAGE__->run unless caller;
DESCRIPTION
Moses is some declarative sugar for building an IRC bot based on the Adam IRC Bot. Moses is designed to minimize the amount of work you have to do to make an IRC bot functional, and to make the process as declarative as possible.
FUNCTIONS
nickname (Str $name)
Set the nickname for the bot. Default's to the current package.
username(Str)
The username which we should use
password(Str)
The server password which we shoulduse
server (Str $server)
Set the server for the bot.
port (Int $port)
Set the port for the bot's server. Default's to 6667.
owner (Str)
The hostmask of the ower of the bot. The owner can control the bot's plugins through IRC using the <POE::Component::IRC::Plugin::Plugman|Plugman> interface.
flood (Bool)
Disable flood protection. Defaults to False.
channels (@channels)
Supply a list of channels for the bot to join upon connecting.
plugins (@plugins)
Extra POE::Component::IRC::Plugin objects or class names to load into the bot.
extra_args (HashRef)
A list of extra arguments to pass to the irc constructor.
DEPENDENCIES
The same dependencies as Adam.
MooseX::POE, namespace::autoclean, MooseX::Alias, POE::Component::IRC, MooseX::Getopt, MooseX::SimpleConfig, MooseX::LogDispatch
BUGS AND LIMITATIONS
None known currently, please email the author if you find any.
AUTHOR
Chris Prather (chris@prather.org)
LICENCE
Copyright 2007-2009 by Chris Prather.
This software is free. It is licensed under the same terms as Perl itself.