Anonymous ID: caeaf2 May 3, 2019, 6:40 p.m. No.6407755   🗄️.is 🔗kun

>>6407725

 

 

 

#!/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]