summaryrefslogtreecommitdiff
path: root/arthur.pl
diff options
context:
space:
mode:
authorJulien Dessaux2014-12-03 21:33:04 +0100
committerJulien Dessaux2014-12-03 23:42:22 +0100
commit7bc381479e15646dfec98cb206aa228a656e5a26 (patch)
treeab71ec1aca472255158020f1bc0cf2f6a73ecca7 /arthur.pl
parentFixed protocol discrepancy (diff)
downloadavalon-arthur-7bc381479e15646dfec98cb206aa228a656e5a26.tar.gz
avalon-arthur-7bc381479e15646dfec98cb206aa228a656e5a26.tar.bz2
avalon-arthur-7bc381479e15646dfec98cb206aa228a656e5a26.zip
Bootstrapped arthur implementation in perl
Diffstat (limited to '')
-rwxr-xr-xarthur.pl34
1 files changed, 34 insertions, 0 deletions
diff --git a/arthur.pl b/arthur.pl
new file mode 100755
index 0000000..f2d0ec1
--- /dev/null
+++ b/arthur.pl
@@ -0,0 +1,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();