forked from rDrama/rDrama
dedup
parent
527d33b81b
commit
b02347bc73
|
@ -712,12 +712,13 @@ class User(Base):
|
||||||
@lazy
|
@lazy
|
||||||
def unchud_string(self):
|
def unchud_string(self):
|
||||||
if self.chud == 1:
|
if self.chud == 1:
|
||||||
return "permanently chudded"
|
text = "permanently chudded"
|
||||||
|
else:
|
||||||
|
text = "unchud in "
|
||||||
wait = self.chud - int(time.time())
|
wait = self.chud - int(time.time())
|
||||||
|
|
||||||
if wait < 60:
|
if wait < 60:
|
||||||
text = f"{wait}s"
|
text += f"{wait}s"
|
||||||
else:
|
else:
|
||||||
days = wait//(24*60*60)
|
days = wait//(24*60*60)
|
||||||
wait -= days*24*60*60
|
wait -= days*24*60*60
|
||||||
|
@ -727,9 +728,9 @@ class User(Base):
|
||||||
|
|
||||||
mins = wait//60
|
mins = wait//60
|
||||||
|
|
||||||
text = f"{days}d {hours:02d}h {mins:02d}m"
|
text += f"{days}d {hours:02d}h {mins:02d}m"
|
||||||
|
|
||||||
return f'''Unchud in {text} - Chud phrase: "{self.chud_phrase[0].upper()}{self.chud_phrase[1:].replace('israel', 'Israel').replace('ukraine', 'Ukraine').replace('ccp', 'CCP')}"'''
|
return f'''{text} - chud phrase: "{self.chud_phrase[0].upper()}{self.chud_phrase[1:].replace('israel', 'Israel').replace('ukraine', 'Ukraine').replace('ccp', 'CCP')}"'''
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
{% macro userBanBlock(deviceType) %}
|
{% macro userBanBlock(deviceType) %}
|
||||||
{% if u.chud %}
|
{% if u.chud %}
|
||||||
<h5 class="text-primary" id="profile-{{deviceType}}--chudded">CHUDDED USER:
|
<h5 class="text-primary" id="profile-{{deviceType}}--chudded">CHUDDED USER:
|
||||||
(by {{u.chudder | safe}})
|
(by {{u.chudder | safe}}) - {{u.unchud_string}}
|
||||||
|
|
||||||
{% if u.chud > 1 %}
|
|
||||||
- {{u.unchud_string}}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
- "{{u.chud_phrase[0].upper() + u.chud_phrase[1:]}}"
|
|
||||||
</h5>
|
</h5>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if u.is_suspended %}
|
{% if u.is_suspended %}
|
||||||
|
|
Loading…
Reference in New Issue