NAME

IRC::Indexer::Report::Network - Network information class for IRC::Indexer

SYNOPSIS

my $network = IRC::Indexer::Report::Network->new;

## Or: save server MOTDs to global network hash.  
## Tracking a lot of MOTDs will eat memory fast.
my $network = IRC::Indexer::Report::Network->new(
  ServerMOTDs => 1,
  
  ## Disable channel tracking, perhaps:
  NoChannels => 1,
);

## Get ::Report::Server object from finished trawl bot:
my $info_obj  = $trawler->report;
## Feed it to add_server:
$network->add_server( $info_obj );

## Get a network info hash:
my $net_hash = $network->dump;

## Re-create a Network object from a dumped hash:
$network = IRC::Indexer::Report::Network->new(
  FromHash => $net_hash,
);

DESCRIPTION

This is a simple Network class for IRC::Indexer, providing an easy way to merge multiple trawled servers into a single network summary.

METHODS

add_server

Merges server information from a Trawl::Bot run.

Argument must be a IRC::Indexer::Report::Server object.

netinfo

Returns a reference to the network information hash.

connectedat

Returns the connect timestamp of the last run for this network.

finishedat

Returns the timestamp of the last run for this network.

servers

Returns a hash keyed on server name.

lastserver

Returns the name of the last server added to this network.

motd_for

Returns the MOTD for a specified server:

my $motd = $network->motd_for($servername);

Only usable if ServerMOTDs was enabled for this network instance.

users

Returns the global user count if available via LUSERS

opers

Returns the global operator count if available via LUSERS

chanhash

Returns the hash containing parsed LIST results, as described in IRC::Indexer::Trawl::Bot

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>

http://www.cobaltirc.org