summaryrefslogtreecommitdiff
path: root/arthur.pl
blob: f2d0ec153c40ee90a236ea3a0018c395ef01b192 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env perl

use warnings;
use strict;

package Avalon::Arthur;
{
    $Avalon::Arthur::VERSION = '0.01';
}

use Bot::BasicBot::Pluggable;
use Config::Simple;

my %cfg;
Config::Simple->import_from('arthur.cfg', \%cfg);

my $bot = Bot::BasicBot::Pluggable->new(
    nick     => $cfg{'irc.nick'},
    ircname  => $cfg{'irc.ircname'},
    server   => $cfg{'irc.server'},
    port     => $cfg{'irc.port'},
    password => $cfg{'irc.password'},
    ssl      => $cfg{'irc.ssl'},
    channels => ($cfg{'irc.channel'}),
    store    => Bot::BasicBot::Pluggable::Store->new(),
);
$bot->{cfg} = \%cfg;

$bot->load("Auth");
$bot->{store_object}->{store}->{Auth}->{password_admin} = $cfg{'admin.password'};
$bot->load("Loader");
$bot->load("Avalon");

$bot->run();