X-Git-Url: http://git.ieval.ro/?p=app-fonbot-daemon.git;a=blobdiff_plain;f=lib%2FApp%2FFonBot%2FPlugin%2FOFTC.pm;h=b41fbd945063f86eaec772ec6a9aa1a85b736dd1;hp=12b88cf655267b1e28863a3353d2f186190708ec;hb=962dff7b76ec32cd68e0e96b8d3cc6d1f9759d00;hpb=7be318a6bf7a8f960c4192f52e7e5c8763d002ee diff --git a/lib/App/FonBot/Plugin/OFTC.pm b/lib/App/FonBot/Plugin/OFTC.pm index 12b88cf..b41fbd9 100644 --- a/lib/App/FonBot/Plugin/OFTC.pm +++ b/lib/App/FonBot/Plugin/OFTC.pm @@ -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;