IRC::Indexer::Report::Network - Network information class for IRC::Indexer
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, );
This is a simple Network class for IRC::Indexer, providing an easy way to merge multiple trawled servers into a single network summary.
Merges server information from a Trawl::Bot run.
Argument must be a IRC::Indexer::Report::Server object.
Returns a reference to the network information hash.
Returns the connect timestamp of the last run for this network.
Returns the timestamp of the last run for this network.
Returns a hash keyed on server name.
Returns the name of the last server added to this network.
Returns the MOTD for a specified server:
my $motd = $network->motd_for($servername);
Only usable if ServerMOTDs was enabled for this network instance.
Returns the global user count if available via LUSERS
Returns the global operator count if available via LUSERS
Returns the hash containing parsed LIST results, as described in IRC::Indexer::Trawl::Bot
Jon Portnoy <avenj@cobaltirc.org>
http://www.cobaltirc.org
To install IRC::Indexer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IRC::Indexer
CPAN shell
perl -MCPAN -e shell install IRC::Indexer
For more information on module installation, please visit the detailed CPAN module installation guide.