Jon Portnoy > Bot-Cobalt > Bot::Cobalt::Conf::File::Channels

Download:
Bot-Cobalt-0.016002.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.016002   Source  

NAME ^

Bot::Cobalt::Conf::File::Channels - Bot::Cobalt channels conf

SYNOPSIS ^

  my $chan_cfg = Bot::Cobalt::Conf::File::Channels->new(
    path => $path_to_channels_cf,
  );
  
  my $hash_for_context = $chan_cfg->context($context_name);

  my $this_channel = $hash_for_context->{$channel} || { };

DESCRIPTION ^

This is the Bot::Cobalt::Conf::File subclass for "channels.conf."

This is a core configuration class; plugin authors should use get_channels_cfg instead:

  use Bot::Cobalt;
  my $channels_cfg = core()->get_channels_cfg( $context_name );

context

The 'context' method takes a context name and returns the relevant hash of channels.

AUTHOR ^

Jon Portnoy <avenj@cobaltirc.org>

syntax highlighting: