mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
修复hy2内核设备数统计错误的BUG
This commit is contained in:
@@ -48,6 +48,7 @@ type UserLimitInfo struct {
|
||||
DeviceLimit int
|
||||
DynamicSpeedLimit int
|
||||
ExpireTime int64
|
||||
OverLimit bool
|
||||
}
|
||||
|
||||
func AddLimiter(tag string, l *conf.LimitConfig, users []panel.UserInfo) *Limiter {
|
||||
@@ -69,6 +70,7 @@ func AddLimiter(tag string, l *conf.LimitConfig, users []panel.UserInfo) *Limite
|
||||
if users[i].DeviceLimit != 0 {
|
||||
userLimit.DeviceLimit = users[i].DeviceLimit
|
||||
}
|
||||
userLimit.OverLimit = false
|
||||
info.UserLimitInfo.Store(format.UserTag(tag, users[i].Uuid), userLimit)
|
||||
}
|
||||
info.UUIDtoUID = uuidmap
|
||||
@@ -110,6 +112,7 @@ func (l *Limiter) UpdateUser(tag string, added []panel.UserInfo, deleted []panel
|
||||
if added[i].DeviceLimit != 0 {
|
||||
userLimit.DeviceLimit = added[i].DeviceLimit
|
||||
}
|
||||
userLimit.OverLimit = false
|
||||
l.UserLimitInfo.Store(format.UserTag(tag, added[i].Uuid), userLimit)
|
||||
l.UUIDtoUID[added[i].Uuid] = added[i].Id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user