插件enable=false不再接收总线事件

This commit is contained in:
dexter
2022-05-26 10:49:11 +08:00
parent dbf0e0b070
commit d94fd98e9d
7 changed files with 56 additions and 123 deletions

View File

@@ -86,7 +86,9 @@ func Run(ctx context.Context, configFile string) (err error) {
select {
case event := <-EventBus:
for _, plugin := range Plugins {
plugin.Config.OnEvent(event)
if plugin.RawConfig["enable"] != false {
plugin.Config.OnEvent(event)
}
}
case <-ctx.Done():
return