From 7bc381479e15646dfec98cb206aa228a656e5a26 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 3 Dec 2014 21:33:04 +0100 Subject: Bootstrapped arthur implementation in perl --- arthur.pl | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 arthur.pl (limited to 'arthur.pl') 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(); -- cgit v1.2.3