X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApp%2FFonBot%2FPlugin%2FOFTC.pm;h=3f79a947d68be077a219d251d3863cc898a08fac;hb=b8d4a54731323949ef92a5300862476fc712f215;hp=12b88cf655267b1e28863a3353d2f186190708ec;hpb=8dc70d07c47947a1b1a9de7d377aee1003aca0ae;p=app-fonbot-daemon.git diff --git a/lib/App/FonBot/Plugin/OFTC.pm b/lib/App/FonBot/Plugin/OFTC.pm index 12b88cf..3f79a94 100644 --- a/lib/App/FonBot/Plugin/OFTC.pm +++ b/lib/App/FonBot/Plugin/OFTC.pm @@ -1,6 +1,6 @@ package App::FonBot::Plugin::OFTC; -our $VERSION = '0.000_3'; +our $VERSION = '0.001'; use v5.14; use strict; @@ -18,30 +18,30 @@ use App::FonBot::Plugin::Config qw/$oftc_enabled $oftc_nick @oftc_channels $oftc ################################################## sub _start{ - return unless $oftc_enabled; - my $self=$_[OBJECT]; - - $self->{irc} = POE::Component::IRC->spawn( - Nick => $oftc_nick, - Username => $oftc_nick, - Ircname => 'FonBot OFTC Transport', - Server => 'irc.oftc.net', - Port => 6697, - UseSSL => 1, - ); - $self->{irc}->yield(register => qw/msg/); - $self->{irc}->yield(connect => {}); - - $self->{irc}->plugin_add(Connector => POE::Component::IRC::Plugin::Connector->new); - $self->{irc}->plugin_add(AutoJoin => POE::Component::IRC::Plugin::AutoJoin->new( - Channels => \@oftc_channels - )); - - $self->{irc}->plugin_add(NickServID => POE::Component::IRC::Plugin::NickServID->new( - Password => $oftc_nickserv_password - )); - - $_[KERNEL]->alias_set('OFTC'); + return unless $oftc_enabled; + my $self=$_[OBJECT]; + + $self->{irc} = POE::Component::IRC->spawn( + Nick => $oftc_nick, + Username => $oftc_nick, + Ircname => 'FonBot OFTC Transport', + Server => 'irc.oftc.net', + Port => 6697, + UseSSL => 1, + ); + $self->{irc}->yield(register => qw/msg/); + $self->{irc}->yield(connect => {}); + + $self->{irc}->plugin_add(Connector => POE::Component::IRC::Plugin::Connector->new); + $self->{irc}->plugin_add(AutoJoin => POE::Component::IRC::Plugin::AutoJoin->new( + Channels => \@oftc_channels + )); + + $self->{irc}->plugin_add(NickServID => POE::Component::IRC::Plugin::NickServID->new( + Password => $oftc_nickserv_password + )); + + $_[KERNEL]->alias_set('OFTC'); } 1; @@ -93,7 +93,7 @@ Marius Gavrilescu C<< >> =head1 COPYRIGHT AND LICENSE -Copyright 2013 Marius Gavrilescu +Copyright 2013-2015 Marius Gavrilescu This file is part of fonbotd.