Clean up comments
This commit cleans up the comments in tilde and in tildewait.master
parent
5458b23efb
commit
862c9360b1
|
@ -68,7 +68,6 @@ def tilde_plugin(msg):
|
||||||
return pinhook.plugin.message("{} is a meanie and gets no tildes. **ju only gives out tildes in the {} channel.**".format(msg.nick, util.tilde.GOOD_CHAN))
|
return pinhook.plugin.message("{} is a meanie and gets no tildes. **ju only gives out tildes in the {} channel.**".format(msg.nick, util.tilde.GOOD_CHAN))
|
||||||
if msg.nick not in util.tilde.challenges:
|
if msg.nick not in util.tilde.challenges:
|
||||||
challenge = util.tilde.challenge(msg.channel, msg.nick, msg.timestamp)
|
challenge = util.tilde.challenge(msg.channel, msg.nick, msg.timestamp)
|
||||||
#return pinhook.plugin.message("{} (bonus {})".format(challenge,util.tilde.challenges[msg.nick][1]))
|
|
||||||
return pinhook.plugin.message(challenge)
|
return pinhook.plugin.message(challenge)
|
||||||
|
|
||||||
@pinhook.plugin.listener('tilde_guess')
|
@pinhook.plugin.listener('tilde_guess')
|
||||||
|
@ -100,12 +99,10 @@ def cleanwash_money(msg):
|
||||||
if msg.nick in msg.ops and msg.arg: nick = msg.arg
|
if msg.nick in msg.ops and msg.arg: nick = msg.arg
|
||||||
balance = Decimal(subprocess.check_output(['/home/jmjl/bin/coin','Ju','internal_balance',nick],universal_newlines=True))
|
balance = Decimal(subprocess.check_output(['/home/jmjl/bin/coin','Ju','internal_balance',nick],universal_newlines=True))
|
||||||
subprocess.check_output(['/home/jmjl/bin/coin','Ju','add_internal_balance',nick,f'-{str(balance)}'],universal_newlines=True).strip()
|
subprocess.check_output(['/home/jmjl/bin/coin','Ju','add_internal_balance',nick,f'-{str(balance)}'],universal_newlines=True).strip()
|
||||||
#new_balance=((__import__('random').randint(80,110)/100)*balance).split('.')[0]
|
|
||||||
new_balance = Decimal(randint(80,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)
|
new_balance = new_balance.quantize(Decimal('1.'), rounding=ROUND_DOWN)
|
||||||
percentage_return = new_balance/balance * Decimal(100)
|
percentage_return = new_balance/balance * Decimal(100)
|
||||||
percentage_return = percentage_return.quantize(Decimal('.00'), rounding=ROUND_DOWN)
|
percentage_return = percentage_return.quantize(Decimal('.00'), rounding=ROUND_DOWN)
|
||||||
#jackpot_balance=(0.10*balance).split('.')[0]
|
|
||||||
jackpot_balance = (Decimal(0.10)*Decimal(balance)).quantize(Decimal('1.'), rounding=ROUND_DOWN)
|
jackpot_balance = (Decimal(0.10)*Decimal(balance)).quantize(Decimal('1.'), rounding=ROUND_DOWN)
|
||||||
with open(util.tilde.JACKPOT_FILE, "r+") as jackpotfile:
|
with open(util.tilde.JACKPOT_FILE, "r+") as jackpotfile:
|
||||||
jackpot = int(jackpotfile.readline().strip("\n"))
|
jackpot = int(jackpotfile.readline().strip("\n"))
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
import pinhook.plugin
|
import pinhook.plugin
|
||||||
#import util.tilde
|
|
||||||
import importlib
|
import importlib
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
@ -11,8 +9,6 @@ def tilde_wait(msg):
|
||||||
found = False
|
found = False
|
||||||
if msg.arg: nicktouse = ''.join(msg.arg.split(' '))
|
if msg.arg: nicktouse = ''.join(msg.arg.split(' '))
|
||||||
else: nicktouse = msg.nick
|
else: nicktouse = msg.nick
|
||||||
# if util.tilde.TIMESKIP:
|
|
||||||
# return pinhook.plugin.message(f"{msg.nick}: You don't have to wait, timeskip is on")
|
|
||||||
with open("/home/jmjl/dev/juju/data/tildescores.txt", "r") as scorefile:
|
with open("/home/jmjl/dev/juju/data/tildescores.txt", "r") as scorefile:
|
||||||
scores = scorefile.readlines()
|
scores = scorefile.readlines()
|
||||||
for score in scores:
|
for score in scores:
|
||||||
|
@ -25,12 +21,10 @@ def tilde_wait(msg):
|
||||||
if timecalc > 1:
|
if timecalc > 1:
|
||||||
return pinhook.plugin.message("{}: wait {} until playing again (talking about {})".format(
|
return pinhook.plugin.message("{}: wait {} until playing again (talking about {})".format(
|
||||||
msg.nick, importlib.import_module('datetime').timedelta(seconds=timecalc), '\u200b'.join(nicktouse)
|
msg.nick, importlib.import_module('datetime').timedelta(seconds=timecalc), '\u200b'.join(nicktouse)
|
||||||
#msg.nick, timecalc, '\u200b'.join(nicktouse)
|
|
||||||
))
|
))
|
||||||
else:
|
else:
|
||||||
return pinhook.plugin.message("{}: wasted {} time, *can play* (talking about {})".format(
|
return pinhook.plugin.message("{}: wasted {} time, *can play* (talking about {})".format(
|
||||||
msg.nick, importlib.import_module('datetime').timedelta(seconds=timecalc * -1), '\u200b'.join(nicktouse))
|
msg.nick, importlib.import_module('datetime').timedelta(seconds=timecalc * -1), '\u200b'.join(nicktouse))
|
||||||
#msg.nick, timecalc, '\u200b'.join(nicktouse)
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return pinhook.plugin.message("{}: User not found in db (talking about {})".format(msg.nick, '\u200b'.join(nicktouse)))
|
return pinhook.plugin.message("{}: User not found in db (talking about {})".format(msg.nick, '\u200b'.join(nicktouse)))
|
||||||
|
@ -53,12 +47,10 @@ def tildebot_wait(msg):
|
||||||
if timecalc > 1:
|
if timecalc > 1:
|
||||||
return pinhook.plugin.message("{}: wait {} until playing again (talking about {})".format(
|
return pinhook.plugin.message("{}: wait {} until playing again (talking about {})".format(
|
||||||
msg.nick, importlib.import_module('datetime').timedelta(seconds=timecalc), '\u200b'.join(nicktouse)
|
msg.nick, importlib.import_module('datetime').timedelta(seconds=timecalc), '\u200b'.join(nicktouse)
|
||||||
#msg.nick, timecalc, '\u200b'.join(nicktouse)
|
|
||||||
))
|
))
|
||||||
else:
|
else:
|
||||||
return pinhook.plugin.message("{}: wasted {} time, *can play* (talking about {})".format(
|
return pinhook.plugin.message("{}: wasted {} time, *can play* (talking about {})".format(
|
||||||
msg.nick, importlib.import_module('datetime').timedelta(seconds=timecalc * -1), '\u200b'.join(nicktouse))
|
msg.nick, importlib.import_module('datetime').timedelta(seconds=timecalc * -1), '\u200b'.join(nicktouse))
|
||||||
#msg.nick, timecalc, '\u200b'.join(nicktouse)
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return pinhook.plugin.message("{}: User not found in db (talking about {})".format(msg.nick, '\u200b'.join(nicktouse)))
|
return pinhook.plugin.message("{}: User not found in db (talking about {})".format(msg.nick, '\u200b'.join(nicktouse)))
|
||||||
|
|
Loading…
Reference in New Issue