++ed by:
KES
Author image Benjamin W. Smith

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() Pretty much does the same thing as ask_help(), only for public commands.

Use like so:

 my %pubhelp = $help->pub_help();

CREDITS

See IRC::Bot

AUTHOR

Benjamin Smith defitro@just-another.net

SEE ALSO

IRC::Bot POE::Component::IRC