This will perhaps work:
#!/usr/bin/perl package main; my $bot = Perlbot->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 Perlbot; use POE; use base qw(Bot::BasicBot); sub irc_disconnected_state { my $self = $_[OBJECT]; return if $self->{_shutdown}; $self->SUPER::irc_disconnected_state( @_ ); }
In reply to Re: How do I shut down a Bot::BasicBot?
by bingos
in thread How do I shut down a Bot::BasicBot?
by myuserid7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |