From e008f4d417696037e54166e25e2d9d2f95ad8e89 Mon Sep 17 00:00:00 2001 From: shy Date: Wed, 5 Mar 2025 08:55:30 +0800 Subject: [PATCH] add some --- base/web/dream.go | 3 ++- core/chat/header.go | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/base/web/dream.go b/base/web/dream.go index ebeccb79..07d9f327 100644 --- a/base/web/dream.go +++ b/base/web/dream.go @@ -506,7 +506,8 @@ func init() { m.Sort("type,status,name", []string{aaa.LOGIN, WORKER, SERVER, ORIGIN}, []string{cli.START, cli.STOP, cli.BEGIN}, ice.STR_R) m.StatusTimeCountStats(mdb.TYPE, mdb.STATUS) } else if arg[0] == ctx.ACTION { - gdb.Event(m, DREAM_ACTION, arg) + m.Cmdy(arg[1], DREAM_ACTION, arg) + // gdb.Event(m, DREAM_ACTION, arg) } }}, }) diff --git a/core/chat/header.go b/core/chat/header.go index 2114a846..de062b99 100644 --- a/core/chat/header.go +++ b/core/chat/header.go @@ -164,7 +164,12 @@ func init() { } m.Option(aaa.LANGUAGE, strings.ReplaceAll(strings.ToLower(kit.Select("", kit.Split(kit.GetValid( func() string { return kit.Select("", "zh-cn", strings.Contains(m.Option(ice.MSG_USERUA), "zh_CN")) }, - func() string { return kit.Select("", kit.Split(m.R.Header.Get(html.AcceptLanguage), ",;"), 0) }, + func() string { + if m.R != nil { + return kit.Select("", kit.Split(m.R.Header.Get(html.AcceptLanguage), ",;"), 0) + } + return "" + }, func() string { return ice.Info.Lang }, ), " ."), 0)), "_", "-")) m.Option("language.list", m.Cmd(nfs.DIR, nfs.TemplatePath(m, aaa.LANGUAGE)+nfs.PS, nfs.FILE).Appendv(nfs.FILE))