NAME

App::Dataninja::Bot - the core interface needed to run the IRC bot

SYNOPSIS

my $bot = App::Dataninja::Bot->new(
    assigned_network => '...',
    config           => App::Dataninja::Config->new(...),
    schema           => App::Dataninja::Schema->new(...),
);

$bot->search_path(add => 'My::Own::Plugins');

$bot->run;

DESCRIPTION

See examples/ in the dist for examples of extending App::Dataninja.

ATTRIBUTES

dispatcher

(Path::Dispatcher) The object that App::Dataninja uses to parse the IRC users' input.

assigned_network

(Str) The network on which the App::Dataninja process resides.

config

(App::Dataninja::Config) The configuration structure loaded from YAML file(s).

schema

(App::Dataninja::Schema) The interface that App::Dataninja uses to interact with the database.

plugins

(ArrayRef[Str]) The list of plugins provided by App::Dataninja.

METHODS

load_modules

Loads all the commands for the bot to use on IRC.

init

Overridden method for loading the modules.

new NETWORK

Overridden to specify a network as a string for the param.

record_and_say

A wrapper around 'say' that logs the IRC message to the database as well as talk to the IRC channel.

said [HASHREF]

Overridden method from Bot::BasicBot that parses IRC input (public msg). The appropriate response is returned. The method returns undef if the bot doesn't want to respond.

run

The method to run the App::Dataninja bot.

tick

This was overridden to probe the reminders table for any reminders that need mentioned to its corresponding remindee.