From ac70e3ef7cbd78f33a89c4c722cfca23de6a58da Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 11 Mar 2011 03:01:58 +0100 Subject: [PATCH] brmd: Try to deal with IRC disconnects gracefully --- brmd.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/brmd.pl b/brmd.pl index 867e7fc..3c4407d 100755 --- a/brmd.pl +++ b/brmd.pl @@ -2,7 +2,7 @@ use strict; use warnings; -use POE qw(Component::IRC Component::Client::TCP Component::Server::HTTP); +use POE qw(Component::IRC Component::IRC::Plugin::Connector Component::Client::TCP Component::Server::HTTP); use HTTP::Status qw/RC_OK/; our $channel = "#brmlab"; @@ -51,6 +51,8 @@ sub _start { my $irc = $heap->{irc}; $irc->yield( register => 'all' ); + $heap->{connector} = POE::Component::IRC::Plugin::Connector->new(); + $irc->plugin_add( 'Connector' => $heap->{connector} ); $irc->yield( connect => { } ); }