mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-21 23:50:09 +08:00
✏️ 修复 control 全局禁用
This commit is contained in:
parent
35f7450ab2
commit
ab34930beb
@ -105,7 +105,13 @@ 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)
|
||||||
return c.Disable == 0
|
if m.options.DisableOnDefault {
|
||||||
|
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