Update 2025-05-21_08:58:06

This commit is contained in:
oib
2025-05-21 08:58:07 +02:00
parent 1011f58d00
commit 39934115a1
28 changed files with 2166 additions and 672 deletions

2
log.py
View File

@ -9,7 +9,7 @@ def log_violation(event: str, ip: str, uid: str, reason: str):
timestamp = datetime.utcnow().isoformat()
log_dir = os.path.join(os.path.dirname(__file__), "log")
os.makedirs(log_dir, exist_ok=True)
log_path = os.path.join(log_dir, "log.txt")
log_path = os.path.join(log_dir, "abuse.log")
log_entry = f"[{timestamp}] {event} IP={ip} UID={uid} REASON={reason}\n"
with open(log_path, "a") as f:
f.write(log_entry)