forked from MarseyWorld/MarseyWorld
check lowercase snappy quotes
parent
96f20d0c2c
commit
ce62364262
|
@ -248,8 +248,8 @@ def comment(v):
|
|||
|
||||
if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] and posting_to_post and post_target.id == SNAPPY_THREAD and level == 1:
|
||||
with open(f"snappy_{SITE_NAME}.txt", "r+") as f:
|
||||
body_for_checking = '\n{[para]}\n' + body + '\n{[para]}\n'
|
||||
if body_for_checking in f.read():
|
||||
body_for_checking = '\n{[para]}\n' + body.lower() + '\n{[para]}\n'
|
||||
if body_for_checking in f.read().lower():
|
||||
abort(400, "Snappy quote already exists!")
|
||||
f.write('{[para]}\n' + body + '\n')
|
||||
|
||||
|
|
Loading…
Reference in New Issue