_user_has_wallet takes a user arg

This commit is contained in:
jesopo 2018-10-18 15:25:42 +01:00
parent d2557cbc4f
commit f5ac44f1c6

View file

@ -180,7 +180,7 @@ class Module(ModuleManager.BaseModule):
(event["user"].nickname, ", ".join(wallets))) (event["user"].nickname, ", ".join(wallets)))
else: else:
wallet = event["args"] wallet = event["args"]
if not self._user_has_wallet(wallet): if not self._user_has_wallet(event["user"], wallet):
raise utils.EventError("%s: you don't have a '%s' wallet" % raise utils.EventError("%s: you don't have a '%s' wallet" %
(event["user"].nickname, wallet)) (event["user"].nickname, wallet))
coins = self._get_user_coins(user, wallet) coins = self._get_user_coins(user, wallet)