From 4836b10c8d1e58fe14628bf9ff5be7f7d22fac81 Mon Sep 17 00:00:00 2001 From: copurxia <53603471+copurxia@users.noreply.github.com> Date: Thu, 22 Aug 2024 09:17:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix(gif,=20qqwife):=20at=20=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 适配买礼物的at解析问题 --- plugin/qqwife/favorSystem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/qqwife/favorSystem.go b/plugin/qqwife/favorSystem.go index 9c7acf1007..5f6a2e4fab 100644 --- a/plugin/qqwife/favorSystem.go +++ b/plugin/qqwife/favorSystem.go @@ -47,7 +47,7 @@ func init() { ) }) // 礼物系统 - engine.OnRegex(`^买礼物给\s?(\[CQ:at,qq=(\d+)\]|(\d+))`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). + engine.OnRegex(`^买礼物给\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). Handle(func(ctx *zero.Ctx) { gid := ctx.Event.GroupID uid := ctx.Event.UserID From aca9959c7b4fff28fa950872c3d36f862e197165 Mon Sep 17 00:00:00 2001 From: copurxia <53603471+copurxia@users.noreply.github.com> Date: Thu, 22 Aug 2024 09:23:02 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix(robbery):=20at=20=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit robbery同样的@解析问题 --- plugin/robbery/robbery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/robbery/robbery.go b/plugin/robbery/robbery.go index b029be6354..db819192aa 100644 --- a/plugin/robbery/robbery.go +++ b/plugin/robbery/robbery.go @@ -74,7 +74,7 @@ func init() { }) // 打劫功能 - engine.OnRegex(`^打劫\s?(\[CQ:at,qq=(\d+)\]|(\d+))`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). + engine.OnRegex(`^打劫\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). Handle(func(ctx *zero.Ctx) { uid := ctx.Event.UserID fiancee := ctx.State["regex_matched"].([]string) From 096efa7ea1edd0a01a07cfa99416b30ecf2f6960 Mon Sep 17 00:00:00 2001 From: copurxia <53603471+copurxia@users.noreply.github.com> Date: Thu, 22 Aug 2024 09:26:29 +0800 Subject: [PATCH 3/4] Update robbery.go --- plugin/robbery/robbery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/robbery/robbery.go b/plugin/robbery/robbery.go index db819192aa..0ba3035f92 100644 --- a/plugin/robbery/robbery.go +++ b/plugin/robbery/robbery.go @@ -74,7 +74,7 @@ func init() { }) // 打劫功能 - engine.OnRegex(`^打劫\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). + engine.OnRegex(`^打劫\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]|(\d+))`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). Handle(func(ctx *zero.Ctx) { uid := ctx.Event.UserID fiancee := ctx.State["regex_matched"].([]string) From f0118a9d5d983aa088722d47ab50eeab3507af09 Mon Sep 17 00:00:00 2001 From: copurxia <53603471+copurxia@users.noreply.github.com> Date: Thu, 22 Aug 2024 09:29:09 +0800 Subject: [PATCH 4/4] Update favorSystem.go --- plugin/qqwife/favorSystem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/qqwife/favorSystem.go b/plugin/qqwife/favorSystem.go index 5f6a2e4fab..409ab63ed4 100644 --- a/plugin/qqwife/favorSystem.go +++ b/plugin/qqwife/favorSystem.go @@ -47,7 +47,7 @@ func init() { ) }) // 礼物系统 - engine.OnRegex(`^买礼物给\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). + engine.OnRegex(`^买礼物给\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]|(\d+))`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). Handle(func(ctx *zero.Ctx) { gid := ctx.Event.GroupID uid := ctx.Event.UserID