forked from MarseyWorld/MarseyWorld
master
parent
381f295998
commit
1a362d29a3
|
@ -226,7 +226,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
|
|||
sanitized = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" class="{classes}" src="/static/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
|
||||
if comment: marseys_used.add(emoji)
|
||||
|
||||
sanitized = sanitized.replace("https://youtu.be/", "https://youtube.com/watch?v=").replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/watch?v=").replace("https://mobile.twitter", "https://twitter").replace("https://m.facebook", "https://facebook").replace("m.wikipedia.org", "wikipedia.org").replace("https://m.youtube", "https://youtube")
|
||||
sanitized = sanitized.replace("https://youtu.be/", "https://youtube.com/watch?v=").replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/watch?v=").replace("https://mobile.twitter", "https://twitter").replace("https://m.facebook", "https://facebook").replace("m.wikipedia.org", "wikipedia.org").replace("https://m.youtube", "https://youtube").replace("https://www.youtube", "https://youtube")
|
||||
|
||||
if "https://youtube.com/watch?v=" in sanitized: sanitized = sanitized.replace("?t=", "&t=")
|
||||
|
||||
|
|
|
@ -213,7 +213,6 @@ def monthly(v):
|
|||
|
||||
for u in g.db.query(User).filter(User.patron > 0, User.patron_utc == 0).all():
|
||||
if u.email and u.email.lower() in emails:
|
||||
continue
|
||||
if u.patron == 1: procoins = 2500
|
||||
elif u.patron == 2: procoins = 5000
|
||||
elif u.patron == 3: procoins = 10000
|
||||
|
@ -223,13 +222,11 @@ def monthly(v):
|
|||
g.db.add(u)
|
||||
send_repeatable_notification(u.id, f"You were given {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).")
|
||||
elif u.patron == 5:
|
||||
continue
|
||||
procoins = 50000
|
||||
u.procoins += procoins
|
||||
g.db.add(u)
|
||||
send_repeatable_notification(u.id, f"You were given {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).")
|
||||
elif u.patron == 1 and u.admin_level > 0:
|
||||
continue
|
||||
procoins = 2500
|
||||
u.procoins += procoins
|
||||
g.db.add(u)
|
||||
|
|
|
@ -427,7 +427,7 @@ def reportbugs(v):
|
|||
return redirect(f'{SITE_FULL}/post/{BUG_THREAD}')
|
||||
|
||||
@app.post("/@<username>/message")
|
||||
@limiter.limit("1/second;2/minute;10/hour;50/day")
|
||||
@limiter.limit("1/second;10/minute;20/hour;50/day")
|
||||
@is_not_permabanned
|
||||
def message2(v, username):
|
||||
|
||||
|
|
Loading…
Reference in New Issue