world: 一大波优化与功能更新

- fix #441
- 优化wsserver解析
- 完善 ctx.this 相关函数
- 自动已读: Config 的 MarkMessage
This commit is contained in:
源文雨
2023-07-28 13:56:48 +08:00
parent ebcd3cdef2
commit c8dcdbb0b2
11 changed files with 47 additions and 72 deletions

View File

@@ -70,7 +70,7 @@ func init() {
if err := ctx.State["manager"].(*ctrl.Control[*zero.Ctx]).Manager.DoBlock(uid); err == nil {
t := time.Now().Unix()
cache.Set(uid, struct{}{})
ctx.SetGroupBan(gid, uid, int64(bandur.Minutes()))
ctx.SetThisGroupBan(uid, int64(bandur.Minutes()))
ctx.SendChain(message.Text("检测到违禁词, 已封禁/屏蔽", bandur))
db.Lock()
defer db.Unlock()