From ed5181cf0d687d0a2cf412e7d5fb1da387efb2f6 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 27 May 2010 09:19:11 +0000 Subject: [PATCH] Redefine Net::IRC::Connection::DESTROY sub after forking to prevent disconnecting when child exits --- PBot/FactoidModuleLauncher.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PBot/FactoidModuleLauncher.pm b/PBot/FactoidModuleLauncher.pm index 8612ecac..b33fd8e7 100644 --- a/PBot/FactoidModuleLauncher.pm +++ b/PBot/FactoidModuleLauncher.pm @@ -129,6 +129,10 @@ sub execute_module { die $!; } + no warnings; + *Net::IRC::Connection::DESTROY = sub { return; }; + use warnings; + if(defined $tonick) { $self->{pbot}->logger->log("($from): $nick!$user\@$host) sent to $tonick\n"); $text = `$module_dir/$module $arguments`;