NAME

Seen.pm - A module for handling seen requests for IRC::Bot.

SYNOPSIS

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" );

}

DESCRIPTION

Provides seen functionality for an IRC bot.

METHODS

  1. log_seen() takes two arguments, stores info into cache. Returns nothing.

    Use like so:

    $seen->log_seen( $nick, $msg );
  2. getSeen() takes a nickname as an argument. Checks to see if nick is defined in the cache and returns the results.

    Use like so:

    $seen->get_seen( $nick );
  3. 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.

    Use like so:

    $seen->load_current( $names );
  4. clear_seen() clears the cache, takes no args.

AUTHOR

Benjamin Smith (DeFyance) defyance@just-another.net

SEE ALSO

POE::Component::IRC Cache::FileCache