counter a cp spammer

pull/199/head
Aevann 2023-09-15 03:10:11 +03:00
parent b3ef4734a5
commit 70a3510ed4
1 changed files with 8 additions and 0 deletions

View File

@ -264,4 +264,12 @@ def process_image(filename, v, resize=0, trim=False, uploader_id=None, db=None):
)
db.add(media)
if SITE == 'watchpeopledie.tv' and v and "dylan" in v.username.lower() and "hewitt" in v.username.lower():
gevent.spawn(delete_file, filename)
return f'{SITE_FULL_IMAGES}{filename}'
def delete_file(filename):
time.sleep(60)
os.remove(filename)
purge_files_in_cloudflare_cache(f'{SITE_FULL_IMAGES}{filename}')