NAME
Help.pm - A module to dispatch help for IRC::Bot.
SYNOPSIS
use IRC::Bot::Help;
my $seen = IRC::Bot::Help->new();
# later on...
# User asks for help in DCC CHAT
sub on_dcc_chat {
my ( $kernel, $id, $who, $msg ) = @_[ KERNEL, ARG0, ARG1, ARG3 ];
my $nick = ( split /!/, $who )[0];
# Do Stuff...
if ( $msg =~ m/^.help/i ) {
my $topic = $help->ask_help('all');
$kernel->post( NICK, 'dcc_chat', $id, $topic );
}
}
DESCRIPTION
Basically holds a list of help topics and dispatches them on demand.
METHODS
- ask_help()
-
ask_help() Answers a question based on the argument given. If no arg is given, returns a list of all available help topics.
Use like so:
my $topic = $help->ask_help('topic');
- pub_help()
-
pub_help() Returns a list of public command help topics.
Use like so:
my %pubhelp = $help->pub_help();
CREDITS
See IRC::Bot
AUTHOR
Benjamin Smith (DeFyance) defyance@just-another.net
SEE ALSO
IRC::Bot POE::Component::IRC