Moses - A framework for building IRC bots quickly and easily.
version 0.91
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;
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.
Set the nickname for the bot. Default's to the current package.
The username which we should use
The server password which we shoulduse
Set the server for the bot.
Set the port for the bot's server. Default's to 6667.
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.
Disable flood protection. Defaults to False.
Supply a list of channels for the bot to join upon connecting.
Extra POE::Component::IRC::Plugin objects or class names to load into the bot.
A list of extra arguments to pass to the irc constructor.
The same dependencies as Adam.
MooseX::POE, namespace::autoclean, MooseX::Alias, POE::Component::IRC, MooseX::Getopt, MooseX::SimpleConfig, MooseX::LogDispatch
None known currently, please report bugs to https://rt.cpan.org/Ticket/Create.html?Queue=Adam
Chris Prather <chris@prather.org>
Torsten Raudssus <torsten@raudssus.de> http://www.raudssus.de/
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.
To install Moses::Declare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Moses::Declare
CPAN shell
perl -MCPAN -e shell install Moses::Declare
For more information on module installation, please visit the detailed CPAN module installation guide.