From 9cfa7f5c79d01229930bdca286b5066f15870598 Mon Sep 17 00:00:00 2001 From: GeekQu Date: Thu, 3 Oct 2019 17:43:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E8=AE=A1=E5=B0=81=E7=A6=81=E5=8F=AF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=8B=E5=A4=96=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controllers/Mod_Mu/UserController.php | 2 +- config/.config.example.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Controllers/Mod_Mu/UserController.php b/app/Controllers/Mod_Mu/UserController.php index dff10074..2515896d 100644 --- a/app/Controllers/Mod_Mu/UserController.php +++ b/app/Controllers/Mod_Mu/UserController.php @@ -358,7 +358,7 @@ class UserController extends BaseController if ($User == null) { continue; } - if ($User->detect_ban == 1) { + if ($User->detect_ban == 1 || ($User->is_admin && Config::get('auto_detect_ban_allow_admin') == 'true') || in_array($User->id, Config::get('auto_detect_ban_allow_users'))) { continue; } if (Config::get('auto_detect_ban_type') == '1') { diff --git a/config/.config.example.php b/config/.config.example.php index e3087d61..ea2d5002 100644 --- a/config/.config.example.php +++ b/config/.config.example.php @@ -301,6 +301,12 @@ $System_Config['relay_port_migration'] = 'false'; //为中转规则下发偏 // 审计自动封禁开关 $System_Config['enable_auto_detect_ban'] = 'false'; +// 管理员不受审计限制 +$System_Config['auto_detect_ban_allow_admin'] = 'true'; + +// 审计封禁的例外用户 ID +$System_Config['auto_detect_ban_allow_users'] = []; + // 审计封禁判断类型: // - 1 = 仁慈模式,每触碰多少次封禁一次 // - 2 = 疯狂模式,累计触碰次数按阶梯进行不同时长的封禁