NAME

Moses - A framework for building IRC bots quickly and easily.

VERSION

version 0.91

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 report bugs to https://rt.cpan.org/Ticket/Create.html?Queue=Adam

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Chris Prather, Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.