remotes/1693045480750635534/spooky-22
Aevann1 2021-09-25 01:12:44 +02:00
parent f54d19d0a6
commit ba9ea8ff8c
3 changed files with 12 additions and 4 deletions

View File

@ -230,6 +230,14 @@ class User(Base):
def age(self):
return int(time.time()) - self.created_utc
@property
@lazy
def alts_unique(self):
alts = []
for u in self.alts:
if u not in alts: alts.append(u)
return alts
@property
@lazy
def strid(self):

View File

@ -66,7 +66,7 @@ def club_allow(v, username):
u.club_banned = False
g.db.add(u)
for x in u.alts:
for x in u.alts_unique:
x.club_allowed = True
x.club_banned = False
g.db.add(x)
@ -95,7 +95,7 @@ def club_ban(v, username):
u.club_banned = True
u.club_allowed = False
for x in u.alts:
for x in u.alts_unique:
x.club_banned = True
u.club_allowed = False
g.db.add(x)

View File

@ -356,7 +356,7 @@
{% endif %}
<span>Alts:</span>
<ul>
{% for account in u.alts %}
{% for account in u.alts_unique %}
<li><a href="{{account.url}}">@{{account.username}}</a>{% if account._is_manual %} [m]{% endif %}</li>
{% endfor %}
</ul>
@ -633,7 +633,7 @@
{% endif %}
<span>Alts:</span>
<ul>
{% for account in u.alts %}
{% for account in u.alts_unique %}
<li><a href="{{account.url}}">@{{account.username}}</a>{% if account._is_manual %} [m]{% endif %}</li>
{% endfor %}
</ul>