From e914da4839916b7b34f78865b78fb5855ccb9b86 Mon Sep 17 00:00:00 2001 From: Alexandre Morignot <erdnaxeli@gmail.com> Date: Sun, 12 Oct 2014 20:39:17 +0200 Subject: [PATCH] bug fix in duration calculation --- lib/sites/parser.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sites/parser.pm b/lib/sites/parser.pm index b4477ae..80d09aa 100644 --- a/lib/sites/parser.pm +++ b/lib/sites/parser.pm @@ -90,13 +90,13 @@ sub parse { if (defined $content{'duration'}) { my $h = int($content{'duration'} / 3600); my $m = int(($content{'duration'} % 3600) / 60); - my $s = int(($content{'duration'} % 3600) % 3600); + my $s = int(($content{'duration'} % 3600) % 60); - $msg .= ' ( '; + $msg .= ' ('; $msg .= sprintf("%02d:", $h) if ($h > 0); $msg .= sprintf("%02d:", $m); $msg .= sprintf("%02d", $s); - $msg .= ' )'; + $msg .= ')'; } $irc->yield(privmsg => $chan => $msg); -- GitLab