From 700d0a9d1fa94ed52db9d72222e3208dc55c703e Mon Sep 17 00:00:00 2001 From: unek Date: Sat, 16 Aug 2014 17:46:12 +0200 Subject: [PATCH] shitty way to round rain amounts --- bin/tipbot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tipbot.js b/bin/tipbot.js index c8913b9..604e967 100644 --- a/bin/tipbot.js +++ b/bin/tipbot.js @@ -260,7 +260,7 @@ client.addListener('message', function(from, channel, message) { }); } - client.say(channel, settings.messages.rain.expand({name: from, amount: amount / max, list: (whole_channel && !settings.commands.rain.rain_on_last_active) ? 'the whole channel' : names.join(', ')})); + client.say(channel, settings.messages.rain.expand({name: from, amount: parseFloat((amount / max).toFixed(8)), list: (whole_channel && !settings.commands.rain.rain_on_last_active) ? 'the whole channel' : names.join(', ')})); }); } else { winston.info('%s tried to tip %s %d, but has only %d', from, to, amount, balance);