forked from MarseyWorld/MarseyWorld
clearer chud message to chudded user
parent
3ee1851fa6
commit
a93c5ed0e5
|
@ -1042,26 +1042,25 @@ def agendaposter(id, v):
|
||||||
reason = reason_regex_post.sub(r'<a href="\1">\1</a>', reason)
|
reason = reason_regex_post.sub(r'<a href="\1">\1</a>', reason)
|
||||||
reason = reason_regex_comment.sub(r'<a href="\1#context">\1</a>', reason)
|
reason = reason_regex_comment.sub(r'<a href="\1#context">\1</a>', reason)
|
||||||
|
|
||||||
duration = "permanently"
|
|
||||||
if days:
|
if days:
|
||||||
if user.agendaposter:
|
if user.agendaposter:
|
||||||
user.agendaposter += days * 86400
|
user.agendaposter += days * 86400
|
||||||
else:
|
else:
|
||||||
user.agendaposter = int(time.time()) + (days * 86400)
|
user.agendaposter = int(time.time()) + (days * 86400)
|
||||||
|
|
||||||
days_txt = str(days)
|
days_txt = str(days)
|
||||||
if days_txt.endswith('.0'): days_txt = days_txt[:-2]
|
if days_txt.endswith('.0'): days_txt = days_txt[:-2]
|
||||||
duration = f"for {days_txt} day"
|
duration = f"for {days_txt} day"
|
||||||
if days != 1: duration += "s"
|
if days != 1: duration += "s"
|
||||||
if reason: text = f"@{v.username} (a site admin) has chudded you for **{days_txt}** days for the following reason:\n\n> {reason}"
|
|
||||||
else: text = f"@{v.username} (a site admin) has chudded you for **{days_txt}** days."
|
|
||||||
else:
|
else:
|
||||||
user.agendaposter = 1
|
user.agendaposter = 1
|
||||||
if reason: text = f"@{v.username} (a site admin) has chudded you permanently for the following reason:\n\n> {reason}"
|
duration = "permanently"
|
||||||
else: text = f"@{v.username} (a site admin) has chudded you permanently."
|
|
||||||
|
|
||||||
user.agendaposter_phrase = "trans lives matter"
|
user.agendaposter_phrase = "trans lives matter"
|
||||||
|
|
||||||
text += f"\n\n> {user.agendaposter_phrase}"
|
text = f"@{v.username} (a site admin) has chudded you **{duration}**"
|
||||||
|
if reason: text += f"for the following reason:\n\n> {reason}"
|
||||||
|
text += f"\n\n**You now have to say this phrase in all posts and comments you make {duration}:**\n\n> {user.agendaposter_phrase}"
|
||||||
|
|
||||||
user.chudded_by = v.id
|
user.chudded_by = v.id
|
||||||
g.db.add(user)
|
g.db.add(user)
|
||||||
|
|
|
@ -221,6 +221,8 @@ def award_thing(v, thing_type, id):
|
||||||
msg += "!"
|
msg += "!"
|
||||||
if note:
|
if note:
|
||||||
note = '\n\n> '.join(note.splitlines())
|
note = '\n\n> '.join(note.splitlines())
|
||||||
|
if kind == "agendaposter":
|
||||||
|
msg += f"\n\n**You now have to say this phrase in all posts and comments you make for 24 hours:**"
|
||||||
msg += f"\n\n> {note}"
|
msg += f"\n\n> {note}"
|
||||||
send_repeatable_notification(author.id, msg)
|
send_repeatable_notification(author.id, msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue