From 56e906c83f0fb4273efbe1cf4ed49778681ca7a6 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Sun, 5 Mar 2023 10:21:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4sensitive.json?= =?UTF-8?q?=E4=BB=A5sensitive-template.json=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++-- main.py | 4 ++++ sensitive.json => sensitive-template.json | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) rename sensitive.json => sensitive-template.json (94%) diff --git a/.gitignore b/.gitignore index 3fd3bea..7011765 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,10 @@ config.py __pycache__/ database.db qchatgpt.log -config.py /banlist.py plugins/ !plugins/__init__.py /revcfg.py prompts/ -logs/ \ No newline at end of file +logs/ +sensitive.json \ No newline at end of file diff --git a/main.py b/main.py index d3d5c9d..dae29ae 100644 --- a/main.py +++ b/main.py @@ -314,6 +314,10 @@ if __name__ == '__main__': if not os.path.exists('banlist.py'): shutil.copy('banlist-template.py', 'banlist.py') + # 检查是否有sensitive.json, + if not os.path.exists("sensitive.json"): + shutil.copy("sensitive-template.json", "sensitive.json") + if len(sys.argv) > 1 and sys.argv[1] == 'init_db': init_db() sys.exit(0) diff --git a/sensitive.json b/sensitive-template.json similarity index 94% rename from sensitive.json rename to sensitive-template.json index 40ebc4d..5ee7ee7 100644 --- a/sensitive.json +++ b/sensitive-template.json @@ -9,6 +9,7 @@ "毛泽东", "邓小平", "周恩来", + "马克思", "社会主义", "共产党", "共产主义", @@ -21,6 +22,8 @@ "天安门", "六四", "政治局常委", + "两会", + "共青团", "学潮", "八九", "二十大", @@ -48,6 +51,7 @@ "作爱", "做爱", "性交", + "性爱", "自慰", "阴茎", "淫妇",