From 7411c493f97d5e568185da20eec488005be6ac11 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 16 Oct 2018 13:46:25 +0100 Subject: [PATCH] Move some more str(coins) calls to _coin_str(coins) in modules/coins.py --- modules/coins.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/coins.py b/modules/coins.py index 5fce3380..e0192c09 100644 --- a/modules/coins.py +++ b/modules/coins.py @@ -54,7 +54,7 @@ class Module(ModuleManager.BaseModule): def _get_pool(self, server): return decimal.Decimal(server.get_setting("coins", DEFAULT_MARKET_CAP)) def _set_pool(self, server, amount): - server.set_setting("coins", str(amount)) + server.set_setting("coins", self._coin_str(amount)) def _take_from_pool(self, server, amount): coins = self._get_pool(server) self._set_pool(server, coins-amount) @@ -164,7 +164,7 @@ class Module(ModuleManager.BaseModule): self._give(event["server"], target, coins) event["stdout"].write("Gave '%s' %s coins" % (target.nickname, - str(coins))) + self._coin_str(coins))) @utils.hook("received.command.richest") def richest(self, event):