取消正则g全局匹配

要加全局匹配你可以在你插件自己的正则里面加,加个多行能理解,为什么要加g

Signed-off-by: Admilk <13205155+adrae@user.noreply.gitee.com>
This commit is contained in:
Admilk 2024-03-26 04:35:29 +00:00 committed by Gitee
parent 657a1bf877
commit d1b7df10bd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ class PluginsLoader {
/** 判断事件 */
if (v.event && !this.filtEvent(e, v)) continue
/** 加入多行匹配符号 */
if (!new RegExp(v.reg, 'sg').test(e.msg)) continue
if (!new RegExp(v.reg, 's').test(e.msg)) continue
e.logFnc = `[${plugin.name}][${v.fnc}]`
if (v.log !== false)