#!/usr/bin/pdbot
package main;
my $bot = ebot->new (no_run =0, server => 'swiftco.dal.net', chan
+nels =['#randomtestingchannel']);
$SIG{'INT'} = 'Handler';
$SIG{'TERM'} = 'Handler';
sub Handler {
$bot->{_shutdown} = 1;
$bot->shutdown('Leaving.');
};
$bot->run;
package ebot;
use POE;
use base qw(Bot::BasicBot);
sub irc_disconnected_state {
my $self = $_[OBJECT];
return if $self->{_shutdown};
$self->SUPER::irc_disconnected_state( @_ );
}
[download]