master
Aevann1 2022-02-15 22:22:48 +02:00
parent e99d0af6f5
commit 9f446a2163
5 changed files with 14 additions and 8 deletions

View File

@ -25,12 +25,15 @@ def login_get(v):
def check_for_alts(current_id):
ids = tuple(x[0] for x in g.db.query(User.id).all())
past_accs = set(session.get("history", []))
past_accs.add(current_id)
session["history"] = list(past_accs)
for past_id in session["history"]:
for past_id in past_accs:
if past_id not in ids:
past_accs.remove(past_id)
continue
if past_id == MOM_ID or current_id == MOM_ID: break
if past_id == current_id: continue
@ -75,6 +78,9 @@ def check_for_alts(current_id):
new_alt = Alt(user1=a.user2, user2=current_id)
g.db.add(new_alt)
g.db.flush()
past_accs.add(current_id)
session["history"] = list(past_accs)
@app.post("/login")

View File

@ -233,7 +233,7 @@
👻
{% else %}
{% if SITE_NAME=='Drama' and c.author.house %}
<img src="/assets/images/{{SITE_NAME}}/houses/{{c.author.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{c.author.house}}">
<img src="/assets/images/{{SITE_NAME}}/houses/{{c.author.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{c.author.house}}" alt="House {{c.author.house}}">
{% endif %}
{% if c.author.verified %}<i class="fas fa-badge-check align-middle ml-1" style="color:{% if c.author.verifiedcolor %}#{{c.author.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{c.author.verified}}"></i>

View File

@ -519,7 +519,7 @@
👻
{% else %}
{% if SITE_NAME=='Drama' and p.author.house %}
<img src="/assets/images/{{SITE_NAME}}/houses/{{p.author.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{p.author.house}}">
<img src="/assets/images/{{SITE_NAME}}/houses/{{p.author.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{p.author.house}}" alt="House {{p.author.house}}">
{% endif %}
{% if p.author.verified %}<i class="fas fa-badge-check align-middle ml-1" style="color:{% if p.author.verifiedcolor %}#{{p.author.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{p.author.verified}}"></i>

View File

@ -190,7 +190,7 @@
👻
{% else %}
{% if SITE_NAME=='Drama' and p.author.house %}
<img src="/assets/images/{{SITE_NAME}}/houses/{{p.author.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{p.author.house}}">
<img src="/assets/images/{{SITE_NAME}}/houses/{{p.author.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{p.author.house}}" alt="House {{p.author.house}}">
{% endif %}
{% if p.author.verified %}<i class="fas fa-badge-check align-middle ml-1" style="color:{% if p.author.verifiedcolor %}#{{p.author.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{p.author.verified}}"></i>

View File

@ -58,7 +58,7 @@
</span>
{% endif %}
{% if SITE_NAME=='Drama' and u.house %}
<img src="/assets/images/{{SITE_NAME}}/houses/{{u.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{u.house}}">
<img src="/assets/images/{{SITE_NAME}}/houses/{{u.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{u.house}}" alt="House {{u.house}}">
{% endif %}
{% if u.verified %}<span><i class="fas fa-badge-check align-middle ml-1" style="color:{% if u.verifiedcolor %}#{{u.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{u.verified}}"></i></span>{% endif %}
@ -366,7 +366,7 @@
{% if u.unban_utc %}<h5 class="text-primary">>{{u.unban_string}}</h5>{% endif %}
{% endif %}
{% if SITE_NAME=='Drama' and u.house %}
<img src="/assets/images/{{SITE_NAME}}/houses/{{u.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{u.house}}">
<img src="/assets/images/{{SITE_NAME}}/houses/{{u.house}}.webp?a=7" height="20" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="House {{u.house}}" alt="House {{u.house}}">
{% endif %}
{% if u.verified %}<span><i class="fas fa-badge-check align-middle ml-1" style="color:{% if u.verifiedcolor %}#{{u.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{u.verified}}"></i></span>&nbsp;{% endif %}