3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-19 10:29:30 +01:00

Redefine Net::IRC::Connection::DESTROY sub after forking to prevent disconnecting when child exits

This commit is contained in:
Pragmatic Software 2010-05-27 09:19:11 +00:00
parent 631a075ca5
commit ed5181cf0d

View File

@ -129,6 +129,10 @@ sub execute_module {
die $!; die $!;
} }
no warnings;
*Net::IRC::Connection::DESTROY = sub { return; };
use warnings;
if(defined $tonick) { if(defined $tonick) {
$self->{pbot}->logger->log("($from): $nick!$user\@$host) sent to $tonick\n"); $self->{pbot}->logger->log("($from): $nick!$user\@$host) sent to $tonick\n");
$text = `$module_dir/$module $arguments`; $text = `$module_dir/$module $arguments`;