From 3f300833d3b73c314afd383382590aae3ae7be0c Mon Sep 17 00:00:00 2001 From: helloplhm-qwq Date: Fri, 5 Jan 2024 18:24:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=BB=91=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E6=A3=80=E6=9F=A5=E4=B8=8D=E4=BA=86=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/config.py b/common/config.py index 229b911..3bf1c82 100644 --- a/common/config.py +++ b/common/config.py @@ -648,6 +648,10 @@ def ban_ip(ip_addr, ban_time=-1): 'expire_time': read_config('security.banlist.expire.length') if (ban_time == -1) else ban_time, }) write_data('banList', banList) + banListRaw = read_data('banListRaw') + if (ip_addr not in banListRaw): + banListRaw.append(ip_addr) + write_data('banListRaw', banListRaw) else: if (variable.banList_suggest < 10): variable.banList_suggest += 1