Remove unneeded complexity in modules/coins.py.reset_coins
This commit is contained in:
parent
7eb65ac1da
commit
1eab3178b3
1 changed files with 3 additions and 7 deletions
|
@ -144,13 +144,9 @@ class Module(ModuleManager.BaseModule):
|
|||
"""
|
||||
target = event["server"].get_user(event["args_split"][0])
|
||||
coins = self._get_user_coins(target)
|
||||
if coins == DECIMAL_ZERO:
|
||||
event["stderr"].write("%s already has %s coins" % (
|
||||
target.nickname, str(DECIMAL_ZERO)))
|
||||
else:
|
||||
self._give_to_pool(event["server"], coins)
|
||||
self._reset_user_coins(target)
|
||||
event["stdout"].write("Reset coins for %s" % target.nickname)
|
||||
self._take(event["server"], target, coins)
|
||||
self._reset_user_coins(target)
|
||||
event["stdout"].write("Reset coins for %s" % target.nickname)
|
||||
|
||||
@utils.hook("received.command.givecoins", min_args=1)
|
||||
def give_coins(self, event):
|
||||
|
|
Loading…
Reference in a new issue