mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
✏️ 修复 control 全局禁用
This commit is contained in:
parent
876d85ac4e
commit
d4bceb1922
@ -105,13 +105,7 @@ func (m *Control) IsEnabledIn(gid int64) bool {
|
|||||||
m.RUnlock()
|
m.RUnlock()
|
||||||
if err == nil && c.GroupID == 0 {
|
if err == nil && c.GroupID == 0 {
|
||||||
logrus.Debugf("[control] plugin %s of all : %d", m.service, c.Disable)
|
logrus.Debugf("[control] plugin %s of all : %d", m.service, c.Disable)
|
||||||
if m.options.DisableOnDefault {
|
return c.Disable == 0
|
||||||
if c.Disable == 0 {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
} else if c.Disable != 0 {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return !m.options.DisableOnDefault
|
return !m.options.DisableOnDefault
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user