From b900abaea3abd876365186dcee4d5ea0536082ef Mon Sep 17 00:00:00 2001 From: cdle Date: Fri, 16 Jun 2023 00:40:56 +0800 Subject: [PATCH] x --- core/node_strings.go | 1 + core/node_temp.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core/node_strings.go b/core/node_strings.go index 1e412d0..0955810 100644 --- a/core/node_strings.go +++ b/core/node_strings.go @@ -218,6 +218,7 @@ func (sender *Strings) HideCQEmoji(text string) map[string]interface{} { } } +// 构建CQ码 func (sender *Strings) BuildCQCode(cqType string, params map[string]interface{}) string { var sb strings.Builder sb.WriteString("[CQ:" + cqType) diff --git a/core/node_temp.go b/core/node_temp.go index 4996a70..0247749 100644 --- a/core/node_temp.go +++ b/core/node_temp.go @@ -40,6 +40,8 @@ func (s *PersistentKeyValueStore) Set(key string, value interface{}, dur int) er ExpiredAt: expiredAt, } go func() { + s.RLock() + defer s.RUnlock() defer func() { recover() }()