✏️ 修复 control 全局禁用

This commit is contained in:
fumiama 2021-11-27 00:36:29 +08:00
parent 2917ff6701
commit 35f7450ab2

View File

@ -103,7 +103,7 @@ func (m *Control) IsEnabledIn(gid int64) bool {
m.RLock()
err = db.Find(m.service, &c, "WHERE gid = 0")
m.RUnlock()
if err == nil && gid == 0 {
if err == nil && c.GroupID == 0 {
logrus.Debugf("[control] plugin %s of all : %d", m.service, c.Disable)
return c.Disable == 0
}