From 5711e782f4e86e742e7d86e785a2459e07473e41 Mon Sep 17 00:00:00 2001
From: Alexandre Morignot <erdnaxeli@gmail.com>
Date: Tue, 13 Nov 2012 15:14:13 +0100
Subject: [PATCH] Support des secondes pour !later

---
 PlayBot.pl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/PlayBot.pl b/PlayBot.pl
index 01e959c..5a6bf07 100755
--- a/PlayBot.pl
+++ b/PlayBot.pl
@@ -266,12 +266,13 @@ sub on_speak
 
 		return;
 	}
-	elsif ($msg =~ /^!later( ([0-9]*)( in ([0-9]*)(h|m)?)?)?/) {
+	elsif ($msg =~ /^!later( ([0-9]*)( in ([0-9]*)(h|m|s)?)?)?/) {
 		my ($id, $time, $unit) = ($2, $4, $5);
 
 		$id = $lastID if (!$id);
 		$time = 6 if (!$time);
-		$time *= ($unit eq 'm') ? 60 : 3600;
+		$time *= ($unit eq 's') ? 1 : ($unit eq 'm') ? 60 : 3600;
+		print "$time eq\n";
 		$kernel->delay_set('_later', $time, $nick, $id);
 
 		return;
-- 
GitLab