From 253c6b67574d83e293265b095c45e2f6082d1945 Mon Sep 17 00:00:00 2001
From: Alexandre Morignot <erdnaxeli@gmail.com>
Date: Tue, 6 Aug 2013 21:50:26 +0200
Subject: [PATCH] !cycle refresh the modules instead of restarting the bot

---
 PlayBot.pl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/PlayBot.pl b/PlayBot.pl
index aba41eb..cb36c9b 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;
 }
 
 
-- 
GitLab