From d4bceb1922925dfa519f6a6c256dde9b371a93c8 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 27 Nov 2021 00:49:50 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20=20=E4=BF=AE=E5=A4=8D=20co?= =?UTF-8?q?ntrol=20=E5=85=A8=E5=B1=80=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- control/rule.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/control/rule.go b/control/rule.go index 7b817553..0edd6d1f 100644 --- a/control/rule.go +++ b/control/rule.go @@ -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 }