修复前端会显示已禁用管理器信息的bug

This commit is contained in:
wsczx 2024-10-31 11:51:49 +08:00
parent cad74d7fdb
commit 9d5b7070d9
1 changed files with 3 additions and 3 deletions

View File

@ -128,7 +128,7 @@ func (lm *LockManager) GetLocksInfo() []LockInfo {
defer lm.mu.Unlock()
for ip, state := range lm.ipLocks {
if state.Locked {
if base.Cfg.MaxGlobalIPBanCount > 0 && state.Locked {
info := LockInfo{
Description: "全局IP锁定",
Username: "",
@ -145,7 +145,7 @@ func (lm *LockManager) GetLocksInfo() []LockInfo {
}
for username, state := range lm.userLocks {
if state.Locked {
if base.Cfg.MaxGlobalUserBanCount > 0 && state.Locked {
info := LockInfo{
Description: "全局用户锁定",
Username: username,
@ -163,7 +163,7 @@ func (lm *LockManager) GetLocksInfo() []LockInfo {
for username, ipStates := range lm.ipUserLocks {
for ip, state := range ipStates {
if state.Locked {
if base.Cfg.MaxBanCount > 0 && state.Locked {
info := LockInfo{
Description: "单用户IP锁定",
Username: username,