Skip to content

Commit

Permalink
Make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
oissevalt committed Dec 26, 2024
1 parent a1932ac commit 036f06f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dice/ext_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ func RegisterBuiltinExtLog(self *Dice) {
currentGroup.UpdatedAtTime = time.Now().Unix()

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

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

0 comments on commit 036f06f

Please sign in to comment.