NAME

Bot::Cobalt::Core::Role::EasyAccessors - Easy configuration accessors

SYNOPSIS

## Inside a Cobalt plugin
my $current_alias = $core->get_plugin_alias($self);

my $chan_cf_hash = $core->get_channels_cfg($context);

my $plugin_cf = $core->get_plugin_cfg($self);

my $core_cf = $core->get_core_cfg;

DESCRIPTION

Simple methods for accessing some of the configuration state tracked by Bot::Cobalt::Core.

You might prefer Bot::Cobalt::Core::Sugar when writing plugins.

get_plugin_alias

Takes an object (or a stringified object, but this happens automatically) and returns the registered alias for the plugin if it is loaded.

get_channels_cfg

Returns a copy of the channel configuration hash for the specified context.

get_plugin_cfg

Retrieves the current configuration hash for the specified plugin.

Takes either a plugin object (as a reference only) or a plugin alias (as a string).

get_core_cfg

Returns a copy of the 'core' configuration hash.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>

http://www.cobaltirc.org