The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bot::Cobalt::Conf - Load Bot::Cobalt configuration files

SYNOPSIS

  ## Load:
  ##  - cobalt.conf
  ##  - channels.conf
  ##  - plugins.conf
  ##  - configured plugin-specific confs
  my $cfg_obj = Bot::Cobalt::Conf->new(
    etc => $path_to_etc_dir
  );
  
  my $cfg_hash = $cfg_obj->read_cfg;

DESCRIPTION

Normally used by frontends to create a configuration hash to pass to Bot::Cobalt::Core's constructor.

Loads Cobalt configuration files from a directory (specified via etc at construction) and produces a hash with the following keys:

core

Loaded from cobalt.conf

The core Cobalt configuration.

channels

Loaded from channels.conf

Configured context and channel settings.

Keyed on context name. Per-context hash is keyed on channel name.

plugins

Loaded from plugins.conf

Configured plugins. Keyed on plugin alias.

plugin_cf

Per-plugin options loaded from either PluginOpts directives in plugins.conf or plugin-specific configuration files included via Config directives. Keyed on plugin alias.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>