_user_has_wallet takes a user
param!
This commit is contained in:
parent
472c4fb1f3
commit
3e65983fbc
1 changed files with 2 additions and 2 deletions
|
@ -208,7 +208,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.addwallet", authenticated=True, min_args=1)
|
@utils.hook("received.command.addwallet", authenticated=True, min_args=1)
|
||||||
def add_wallet(self, event):
|
def add_wallet(self, event):
|
||||||
wallet = event["args_split"][0]
|
wallet = event["args_split"][0]
|
||||||
if self._user_has_wallet(wallet):
|
if self._user_has_wallet(event["user"], wallet):
|
||||||
raise utils.EventError("%s: you already have a '%s' wallet" %
|
raise utils.EventError("%s: you already have a '%s' wallet" %
|
||||||
(event["user"].nickname, wallet))
|
(event["user"].nickname, wallet))
|
||||||
self._add_user_wallet(event["user"], wallet)
|
self._add_user_wallet(event["user"], wallet)
|
||||||
|
@ -217,7 +217,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.removewallet", authenticated=True, min_args=1)
|
@utils.hook("received.command.removewallet", authenticated=True, min_args=1)
|
||||||
def remove_wallet(self, event):
|
def remove_wallet(self, event):
|
||||||
wallet = event["args_split"][0]
|
wallet = event["args_split"][0]
|
||||||
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))
|
||||||
if wallet.lower() == WALLET_DEFAULT.lower():
|
if wallet.lower() == WALLET_DEFAULT.lower():
|
||||||
|
|
Loading…
Reference in a new issue