Skip to content

Commit c7cc56f

Browse files
committed
Make lint happy
1 parent 828cb2f commit c7cc56f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dice/ext_log.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ func RegisterBuiltinExtLog(self *Dice) {
276276
currentGroup.UpdatedAtTime = time.Now().Unix()
277277

278278
time.Sleep(time.Duration(0.3 * float64(time.Second)))
279+
// Note: 2024-10-15 经过简单测试,似乎能缓解#1034的问题,但无法根本解决。
279280
go collectLogAndUpload(currentGroup.GroupID, currentGroup.LogCurName)
280281

281282
currentGroup.LogCurName = ""
@@ -857,11 +858,11 @@ func LogAppend(ctx *MsgContext, groupID string, logName string, logItem *model.L
857858
if ok {
858859
if size, okCount := model.LogLinesCountGet(ctx.Dice.DBLogs, groupID, logName); okCount {
859860
// 默认每记录500条发出提示
860-
if ctx.Dice.LogSizeNoticeEnable {
861-
if ctx.Dice.LogSizeNoticeCount == 0 {
862-
ctx.Dice.LogSizeNoticeCount = 500
861+
if ctx.Dice.Config.LogSizeNoticeEnable {
862+
if ctx.Dice.Config.LogSizeNoticeCount == 0 {
863+
ctx.Dice.Config.LogSizeNoticeCount = DefaultConfig.LogSizeNoticeCount
863864
}
864-
if size > 0 && int(size)%ctx.Dice.LogSizeNoticeCount == 0 {
865+
if size > 0 && int(size)%ctx.Dice.Config.LogSizeNoticeCount == 0 {
865866
VarSetValueInt64(ctx, "$t条数", size)
866867
text := DiceFormatTmpl(ctx, "日志:记录_条数提醒")
867868
// text := fmt.Sprintf("提示: 当前故事的文本已经记录了 %d 条", size)

0 commit comments

Comments
 (0)