From ef60b999dc4d328cc367556efeca85dc17136dc4 Mon Sep 17 00:00:00 2001 From: Julian Marcos Date: Tue, 13 Feb 2024 10:25:03 +0000 Subject: [PATCH] Revert "Fix brainwash" This reverts commit c15be36df552b4b07f9b4f4e66f0ed270403bd8d. --- plugins/tildewash.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/plugins/tildewash.py b/plugins/tildewash.py index 81feee0..7b13b4c 100644 --- a/plugins/tildewash.py +++ b/plugins/tildewash.py @@ -28,8 +28,7 @@ def cleanwash_money(msg): balance = Decimal(subprocess.check_output(['/home/jmjl/bin/coin','Ju','internal_balance',nick],universal_newlines=True)) if balance == Decimal(0): return pinhook.plugin.message("You don't have any tildecoins with us, so you can't cleanwash") subprocess.check_output(['/home/jmjl/bin/coin','Ju','add_internal_balance',nick,f'-{str(balance)}'],universal_newlines=True).strip() - #new_balance = Decimal(randint(80,110))/Decimal(100)*Decimal(balance) - new_balance = Decimal(randint(59,110))/Decimal(100)*Decimal(balance) + new_balance = Decimal(randint(80,110))/Decimal(100)*Decimal(balance) new_balance = new_balance.quantize(Decimal('1.'), rounding=ROUND_DOWN) percentage_return = new_balance/balance * Decimal(100) percentage_return = percentage_return.quantize(Decimal('.00'), rounding=ROUND_DOWN) @@ -41,12 +40,7 @@ def cleanwash_money(msg): jackpot_now = str(jackpot + jackpot_balance) jackpotfile.write(jackpot_now) message = f"{msg.nick}: Cleanwashed {balance}TCN, and given the user {new_balance}TCN ({percentage_return}%) and contributed {jackpot_balance}TCN to the balance, jackpot at {jackpot_now}TCN" - time_to_file = __import__('time').time() - if float(msg.time) - float(time) < 86400: # Limit gain time to 24 hours - time_to_file = float(msg.timestamp) + float(util.tilde.WAIT_TIME) - else: - time_to_file = float(msg.timestamp) - float(86400) + float(util.tilde.WAIT_TIME) - util.tilde.admin_update_tilde(nick,amount=new_balance,time=time_to_file,comment=message) + util.tilde.admin_update_tilde(nick,amount=new_balance,time=msg.timestamp,comment=message) return pinhook.plugin.message(message) @pinhook.plugin.command('&brainwashreturnbeforeplaying', help_text='Alias -- &cleanwashreturnbeforeplaying')