diff --git a/files/routes/login.py b/files/routes/login.py index 3fa8fb8748..78f01efbcc 100755 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -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 diff --git a/files/routes/votes.py b/files/routes/votes.py index 5f61b88c44..891254205e 100755 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -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()