mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +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()
|
||||
if err == nil && c.GroupID == 0 {
|
||||
logrus.Debugf("[control] plugin %s of all : %d", m.service, c.Disable)
|
||||
if m.options.DisableOnDefault {
|
||||
if c.Disable == 0 {
|
||||
return true
|
||||
}
|
||||
} else if c.Disable != 0 {
|
||||
return false
|
||||
}
|
||||
return c.Disable == 0
|
||||
}
|
||||
return !m.options.DisableOnDefault
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user