]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
进一步精简日志
authorqydysky <qydysky@foxmail.com>
Sat, 3 Apr 2021 01:22:25 +0000 (09:22 +0800)
committerqydysky <qydysky@foxmail.com>
Sat, 3 Apr 2021 01:26:52 +0000 (09:26 +0800)
Reply/F.go

index e1fc4b58c5d0e63c12e03beb67f44b75dc8dae43..6b17b7d658ba143cfad489c341a20d3b90d7b1c5 100644 (file)
@@ -332,7 +332,7 @@ func Saveflv_wait(){
        if !ok || qn < 0 {return}
 
        saveflv.cancel.Done()
-       c.Log.Base(`saveflv`).L(`I: `,"等待")
+       c.Log.Base(`saveflv`).L(`T: `,"等待")
        saveflv.wait.Wait()
 }
 
@@ -805,9 +805,12 @@ func Keep_medal_light() {
 
        flog.L(`T: `,`开始`)
 
+       var hasKeep bool
        for _,v := range F.Get_list_in_room() {
                if t := int64(v.Last_wear_time) - time.Now().Unix();t > 60*60*24*2 || t < 0{continue}//到期时间在2天以上或已过期
 
+               hasKeep = true
+
                info := F.Info(v.Target_id)
                //两天内到期,发弹幕续期
                send.Danmu_s(sendStr, info.Data.LiveRoom.Roomid)
@@ -824,7 +827,11 @@ func Keep_medal_light() {
                time.Sleep(time.Second)
        }
 
-       flog.L(`I: `,`完成`)
+       if hasKeep {
+               flog.L(`I: `,`完成`)
+       } else {
+               flog.L(`T: `,`完成`)
+       }
 }
 
 //自动发送即将过期的银瓜子礼物
@@ -838,10 +845,18 @@ func AutoSend_silver_gift() {
 
        if c.UpUid == 0 {F.Get(`UpUid`)}
 
+       var hasSend bool
+
        for _,v := range F.Gift_list() {
                if time.Now().Add(time.Hour * time.Duration(24 * int(day))).Unix() > int64(v.Expire_at) {
+                       hasSend = true
                        send.Send_gift(v.Gift_id, v.Bag_id, v.Gift_num)
                }
        }
-       flog.L(`I: `,`完成`)
+
+       if hasSend {
+               flog.L(`I: `,`完成`)
+       } else {
+               flog.L(`T: `,`完成`)
+       }
 }
\ No newline at end of file