From 1cc83a4a38ba2b621d221d92f28949d04499d710 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 9 Aug 2018 16:13:17 +0100 Subject: [PATCH] Fix more issues with referencing "server" in interest() in coins.py --- modules/coins.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/coins.py b/modules/coins.py index 52433064..d439fb02 100644 --- a/modules/coins.py +++ b/modules/coins.py @@ -136,12 +136,11 @@ class Module(object): for server in self.bot.servers.values(): all_coins = server.get_all_user_settings( "coins", []) - interest_rate = event["server"].get_setting("interest-rate", + interest_rate = server.get_setting("interest-rate", DEFAULT_INTEREST_RATE) - redeem_amount = event["server"].get_setting("redeem-amount", + redeem_amount = server.get_setting("redeem-amount", DEFAULT_REDEEM_AMOUNT) for nickname, coins in all_coins: if coins > redeem_amount: coins += coins*interest_rate - event["server"].get_user(nickname).set_setting("coins", - coins) + server.get_user(nickname).set_setting("coins", coins)