Seen.pm - A module for handling seen requests for IRC::Bot.
use IRC::Bot::Seen; my $seen = IRC::Bot::Seen->new(); # later on... # Log join event, assuming Poe::Component::IRC use.. sub on_join { my ( $kernel, $who, $where ) = @_[ KERNEL, ARG0, ARG1 ]; my $nick = ( split /!/, $who )[0]; # Do Stuff... $seen->log_seen( $nick, "Joining $where" ); }
Provides seen functionality for an IRC bot.
log_seen() takes two arguments, stores info into cache. Returns nothing.
Use like so:
$seen->log_seen( $nick, $msg );
get_seen() takes a nickname as an argument. Checks to see if nick is defined in the cache and returns the results.
$seen->get_seen( $nick );
load_current() takes list from irc_353 (names command) as an argument and loads it into the cache, so current users on the channel are seen.
$seen->load_current( $names );
clear_seen() clears the cache, takes no args.
See IRC::Bot
Benjamin Smith defitro@just-another.net
IRC::Bot POE::Component::IRC Cache::FileCache
To install IRC::Bot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IRC::Bot
CPAN shell
perl -MCPAN -e shell install IRC::Bot
For more information on module installation, please visit the detailed CPAN module installation guide.