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 = 疯狂模式,累计触碰次数按阶梯进行不同时长的封禁