diff --git a/PlayBot.pl b/PlayBot.pl index aba41ebd5f23f32fb8be98cb47e5b2c6460243bc..cb36c9b6a6af30d27bc9b64c38a9ebaa73bce71e 100755 --- a/PlayBot.pl +++ b/PlayBot.pl @@ -8,6 +8,7 @@ use POSIX 'strftime'; use DBI; use Tie::File; use JSON; +use Module::Refresh; use FindBin; use lib "$FindBin::Bin/lib/"; @@ -139,10 +140,9 @@ sub cycle { my ($arg) = @_; - $log->info("restarting"); - $irc->yield(quit => 'goodbye'); - sleep 1; - exec $bot; + $log->info("refresh modules"); + + Module::Refresh->refresh; }