From 7e387aa4049656b7ae2d62d88584d9da0767d110 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 4 May 2023 01:01:17 +0300 Subject: [PATCH] stop using eg.log --- files/routes/wrappers.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/files/routes/wrappers.py b/files/routes/wrappers.py index e644275e0..677e8b3a3 100644 --- a/files/routes/wrappers.py +++ b/files/routes/wrappers.py @@ -76,12 +76,9 @@ def get_logged_in_user(): if SITE == 'rdrama.net' and request.headers.get("Cf-Ipcountry") == 'EG': if v: if v.id != AEVANN_ID and not v.username.startswith('Aev'): - with open(f"{LOG_DIRECTORY}/eg.log", "a+", encoding="utf-8") as f: - f.seek(0) - ip = request.headers.get('CF-Connecting-IP') - if f'@{v.username}, ' not in f.read(): - t = time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(time.time())) - log_file(f'@{v.username}, {v.truescore}, {ip}, {t}\n', 'eg.log') + ip = request.headers.get('CF-Connecting-IP') + text = f'@{v.username}, {ip}' + send_notification(AEVANN_ID, text) else: abort(404)