From cc98a0b76f3b7c857defde1cb921f6117b485c71 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 13 Feb 2013 10:04:43 -0500 Subject: [PATCH] show percentage in output --- plugins/ActivitySpam/scripts/silencespammer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ActivitySpam/scripts/silencespammer.php b/plugins/ActivitySpam/scripts/silencespammer.php index f08f080338..dfa9335587 100644 --- a/plugins/ActivitySpam/scripts/silencespammer.php +++ b/plugins/ActivitySpam/scripts/silencespammer.php @@ -88,10 +88,10 @@ function silencespammer($filter, $user, $minimum, $percent) { $spam_count = $ss->spam_count; } - $spam_percent = ($spam_count * 100 / $cnt); + $spam_percent = ($spam_count * 100.0 / $cnt); if ($spam_percent > $percent) { - printfnq("Silencing user %s (%0.2f%% spam)\n", $user->nickname, $spam_percent); + printfnq("Silencing user %s (%d/%d = %0.2f%% spam)\n", $user->nickname, $spam_count, $cnt, $spam_percent); try { $profile->silence(); } catch(Exception $e) {