try to fix mbux bug

pull/136/head
Aevann 2023-02-27 17:02:45 +02:00
parent 5b71b0a81a
commit 668499846b
2 changed files with 13 additions and 12 deletions

View File

@ -93,8 +93,6 @@ link_fix_regex = re.compile("(\[.*?\]\()(?!http|\/)(.*?\))(?!([^<]*<\/(code|pre|
css_url_regex = re.compile('url\(\s*[\'"]?(.*?)[\'"]?\s*\)', flags=re.I|re.A)
marseybux_li = (0,2500,5000,10000,25000,50000,100000,250000)
linefeeds_regex = re.compile("([^\n])\n([^\n])", flags=re.A)
greentext_regex = re.compile("(\n|^)>([^ >][^\n]*)", flags=re.A)

View File

@ -1331,6 +1331,8 @@ tiers={
200: 6
}
marseybux_li = (0,2500,5000,10000,25000,50000,100000,250000)
def claim_rewards(v):
g.db.flush()
transactions = g.db.query(Transaction).filter_by(email=v.email, claimed=None).all()
@ -1346,6 +1348,7 @@ def claim_rewards(v):
transaction.claimed = True
g.db.add(transaction)
if marseybux:
v.pay_account('marseybux', marseybux)
send_repeatable_notification(v.id, f"You have received {marseybux} Marseybux! You can use them to buy awards or hats in the [shop](/shop) or gamble them in the [casino](/casino).")