aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-14 14:30:19 +0100
committerGravatar jesopo2018-10-14 14:30:19 +0100
commit0ed0b235e9f858e18e7f40f6b114347630599ee8 (patch)
treee69138fd1efc229a33ad7111b546460f7d1b3ee2 /modules
parentAdd !lotterywinner in modules/coins.py, to show who last won the lottery (diff)
signature
Work directly from users in modules/coins.py.interest(), so as to not give
double-interest to two "users" online at the same time sharing the same identity
Diffstat (limited to 'modules')
-rw-r--r--modules/coins.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/coins.py b/modules/coins.py
index 12a58408..7feaad77 100644
--- a/modules/coins.py
+++ b/modules/coins.py
@@ -459,8 +459,7 @@ class Module(ModuleManager.BaseModule):
interest = round(coins*interest_rate, 2)
coins += interest
self._take_from_pool(server, interest)
- server.get_user(nickname).set_setting("coins",
- str(coins))
+ server.set_user_setting(nickname, "coins", str(coins))
event["timer"].redo()
@utils.hook("received.command.lotterybuy", authenticated=True)