forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-10-21 23:08:53 +02:00
parent 028d420eaf
commit f8c68f1485
2 changed files with 4 additions and 6 deletions

View File

@ -133,12 +133,6 @@ def login_post():
else:
abort(400)
if account.is_banned and account.unban_utc > 0 and time.time() > account.unban_utc:
account.is_banned = 0
account.unban_utc = 0
account.ban_evade = 0
g.db.add(account)
session["user_id"] = account.id
session["session_id"] = token_hex(16)
session["login_nonce"] = account.login_nonce

View File

@ -1,5 +1,7 @@
from files.helpers.wrappers import *
from files.helpers.get import *
from files.helpers.const import NOTIFICATIONS_ACCOUNT
from files.helpers.notifications import send_notification
from files.classes import *
from flask import *
from files.__main__ import app, limiter, cache
@ -106,10 +108,12 @@ def api_vote_post(post_id, new, v):
v.agendaposter_expires_utc = 0
v.agendaposter = False
g.db.add(v)
send_notification(NOTIFICATIONS_ACCOUNT, v, "Your agendaposter theme has expired!")
if v.flairchanged and v.flairchanged < time.time():
v.flairchanged = None
g.db.add(v)
send_notification(NOTIFICATIONS_ACCOUNT, v, "Your flair lock has expired. You can now change your flair!")
try:
g.db.flush()