give error on namelock

master
Aevann 2024-11-14 20:17:17 +02:00
parent edc511d24a
commit 7b29cec092
1 changed files with 3 additions and 0 deletions

View File

@ -626,6 +626,9 @@ def award_thing(v, thing_type, id):
author.flairchanged = int(time.time()) + 86400 * quantity author.flairchanged = int(time.time()) + 86400 * quantity
badge_grant(user=author, badge_id=96) badge_grant(user=author, badge_id=96)
elif kind == "namelock": elif kind == "namelock":
if author.username.startswith('deleted~'):
stop(403, "Recipient account is deleted!")
new_name = note.strip().lstrip('@').strip() new_name = note.strip().lstrip('@').strip()
if author.namechanged and (not new_name or new_name == author.username): if author.namechanged and (not new_name or new_name == author.username):
author.namechanged += 86400 * quantity author.namechanged += 86400 * quantity