1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-09-16 17:39:52 +08:00
parent dea7b707f6
commit 101002e269
3 changed files with 2 additions and 6 deletions

View File

@ -57,7 +57,6 @@ func _serve_main(m *ice.Message, w http.ResponseWriter, r *http.Request) bool {
} else {
r.Header.Set(ice.MSG_USERIP, strings.Split(r.RemoteAddr, nfs.DF)[0])
}
if m.Logs(r.Header.Get(ice.MSG_USERIP), r.Method, r.URL.String()); r.Method == http.MethodGet {
ispod := kit.Contains(r.Header.Get("Referer"), "/chat/pod/", "pod=")
if msg := m.Spawn(w, r).Options(ice.MSG_USERUA, r.UserAgent()); path.Join(r.URL.Path) == nfs.PS {

View File

@ -183,10 +183,7 @@ func init() {
mdb.Config(m, ice.MAIN, m.Option(ctx.INDEX))
return
}
kit.If(mdb.Config(m, ice.MAIN), func(cmd string) { RenderPodCmd(m, "", cmd) }, func() {
m.OptionDefault(nfs.VERSION, RenderVersion(m))
m.RenderResult(nfs.Template(m, "main.html"))
})
kit.If(mdb.Config(m, ice.MAIN), func(cmd string) { RenderPodCmd(m, "", cmd) }, func() { RenderMain(m) })
m.Optionv(ice.MSG_ARGS, kit.Simple(m.Optionv(ice.MSG_ARGS)))
}},
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {

View File

@ -32,7 +32,7 @@ func init() {
m.Cmd(web.DREAM, cli.START, kit.Dict(mdb.NAME, arg[0]))
}
if len(arg) == 1 {
m.Cmdy(web.SPACE, arg[0], web.SPACE, ice.MAIN, kit.Dict(nfs.VERSION, web.RenderVersion(m)))
m.Cmdy(web.SPACE, arg[0], web.SPACE, ice.MAIN, kit.Dict(nfs.VERSION, web.RenderVersion(m), ice.MSG_USERPOD, arg[0]))
} else if arg[1] == CMD {
web.RenderPodCmd(m, arg[0], arg[2], arg[3:])
}