From e076bc0831aea0aed8bfe12a8f5b56d679a25c11 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Tue, 30 Aug 2016 12:25:08 +0200 Subject: [PATCH] [Minor] Ip Score: Fix display of subscores --- src/plugins/lua/ip_score.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua index 93d01f6c75..a8687a1cd1 100644 --- a/src/plugins/lua/ip_score.lua +++ b/src/plugins/lua/ip_score.lua @@ -175,19 +175,19 @@ local ip_score_set = function(task) if ip_score ~= 0 then total_score = total_score + ip_score - table.insert(description_t, 'ip: ' .. '(' .. math.floor(ip_score * 10) .. ')') + table.insert(description_t, 'ip: ' .. '(' .. string.format('%.2f', ip_score * 10) .. ')') end if ipnet_score ~= 0 then total_score = total_score + ipnet_score - table.insert(description_t, 'ipnet: ' .. ipnet .. '(' .. math.floor(ipnet_score * 10) .. ')') + table.insert(description_t, 'ipnet: ' .. ipnet .. '(' .. string.format('%.2f', ipnet_score * 10) .. ')') end if asn_score ~= 0 then total_score = total_score + asn_score - table.insert(description_t, 'asn: ' .. asn .. '(' .. math.floor(asn_score * 10) .. ')') + table.insert(description_t, 'asn: ' .. asn .. '(' .. string.format('%.2f', asn_score * 10) .. ')') end if country_score ~= 0 then total_score = total_score + country_score - table.insert(description_t, 'country: ' .. country .. '(' .. math.floor(country_score * 10) .. ')') + table.insert(description_t, 'country: ' .. country .. '(' .. string.format('%.2f', country_score * 10) .. ')') end if options['max_score'] and (total_score*10) > options['max_score'] then -- 2.47.3