From be3e7c892cbdfef428f1dd17898c6b6369b5b3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 11 Jun 2022 18:27:26 +0800 Subject: [PATCH] fix b14 --- plugin/b14/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/b14/main.go b/plugin/b14/main.go index a147934e..b321c0fb 100644 --- a/plugin/b14/main.go +++ b/plugin/b14/main.go @@ -19,7 +19,7 @@ func init() { Help: "base16384加解密\n" + "- 加密xxx\n- 解密xxx\n- 用yyy加密xxx\n- 用yyy解密xxx", }) - en.OnRegex(`^加密\s?(.*)`).SetBlock(true). + en.OnRegex(`^加密\s*(.*)`).SetBlock(true). Handle(func(ctx *zero.Ctx) { str := ctx.State["regex_matched"].([]string)[1] es := base14.EncodeString(str) @@ -29,7 +29,7 @@ func init() { ctx.SendChain(message.Text("加密失败!")) } }) - en.OnRegex(`^解密\s?([一-踀]*[㴁-㴆]?)$`).SetBlock(true). + en.OnRegex(`^解密\s*([一-踀]*[㴁-㴆]?)$`).SetBlock(true). Handle(func(ctx *zero.Ctx) { str := ctx.State["regex_matched"].([]string)[1] es := base14.DecodeString(str) @@ -39,7 +39,7 @@ func init() { ctx.SendChain(message.Text("解密失败!")) } }) - en.OnRegex(`^用(.*)加密\s?(.*)`).SetBlock(true). + en.OnRegex(`^用(.*)加密\s*(.*)`).SetBlock(true). Handle(func(ctx *zero.Ctx) { key, str := ctx.State["regex_matched"].([]string)[1], ctx.State["regex_matched"].([]string)[2] t := getea(key) @@ -50,7 +50,7 @@ func init() { ctx.SendChain(message.Text("加密失败!")) } }) - en.OnRegex(`^用(.*)解密\s?([一-踀]*[㴁-㴆]?)$`).SetBlock(true). + en.OnRegex(`^用(.*)解密\s*([一-踀]*[㴁-㴆]?)$`).SetBlock(true). Handle(func(ctx *zero.Ctx) { key, str := ctx.State["regex_matched"].([]string)[1], ctx.State["regex_matched"].([]string)[2] t := getea(key)