diff options
| author | 2018-08-09 16:37:55 +0100 | |
|---|---|---|
| committer | 2018-08-09 16:37:55 +0100 | |
| commit | a114390cde52da78de580303e7a868feef8f646c (patch) | |
| tree | dc33ca03b4632253c21ecc4245becf98e49a439f /modules | |
| parent | Fix more issues with referencing "server" in interest() in coins.py (diff) | |
| signature | ||
Allow users to see other people's coins
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/coins.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/coins.py b/modules/coins.py index d439fb02..4a184e3d 100644 --- a/modules/coins.py +++ b/modules/coins.py @@ -31,9 +31,13 @@ class Module(object): next_due=time.time()+until_next_hour) def coins(self, event): - coins = event["user"].get_setting("coins", 0) + if event["args_split"]: + target = event["server"].get_user(event["args_split"][0]) + else: + target = event["user"] + coins = target.get_setting("coins", 0) event["stdout"].write("%s has %d coin%s" % ( - event["user"].nickname, coins, + target.nickname, coins, "" if coins == 1 else "s")) def richest(self, event): |
