From: octo Date: Mon, 5 Sep 2005 19:10:43 +0000 (+0000) Subject: Fixes this bug: X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=HEAD;p=onis.git Fixes this bug: [20:58] < someone> Illegal division by zero at lib/Onis/Plugins/Core.pm line 928. --- diff --git a/lib/Onis/Plugins/Core.pm b/lib/Onis/Plugins/Core.pm index 0afa108..627fc5e 100644 --- a/lib/Onis/Plugins/Core.pm +++ b/lib/Onis/Plugins/Core.pm @@ -611,7 +611,7 @@ sub ranking ($tmp) = sort { $NickData->{$b}{'chars_total'} <=> $NickData->{$a}{'chars_total'} } (@nicks); $max_chars = $NickData->{$tmp}{'chars_total'} || 0; - + $trans = translate ('Most active nicks'); print $fh "

$trans

\n"; @@ -913,6 +913,8 @@ sub bar my $i; my $j; + $max_num ||= 1; + for ($i = 0; $i < 4; $i++) { my $sum = 0;