正则匹配时加入多行匹配

发来的消息带回车时,使用dotall一直匹配下去

Signed-off-by: lcroof <lcroof@qq.com>
This commit is contained in:
lcroof 2024-03-16 04:31:49 +00:00 committed by Gitee
parent ca46134b81
commit d839e57a3c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 2 deletions

View File

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