mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 09:34:05 +08:00
opt some
This commit is contained in:
parent
7bead22151
commit
db15dfed1b
@ -296,24 +296,30 @@ func init() {
|
|||||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
cli.NodeInfo(m, WORKER, ice.Info.PathName)
|
cli.NodeInfo(m, WORKER, ice.Info.PathName)
|
||||||
AddRewrite(func(w http.ResponseWriter, r *http.Request) bool {
|
AddRewrite(func(w http.ResponseWriter, r *http.Request) bool {
|
||||||
if r.Method == SPIDE_GET && r.URL.Path == ice.PS {
|
if r.Method == SPIDE_GET {
|
||||||
msg := m.Spawn(SERVE, w, r)
|
switch r.URL.Path {
|
||||||
if share := r.URL.Query().Get("share"); share != "" {
|
case ice.PS:
|
||||||
switch msg := msg.Cmd(SHARE, share); msg.Append(mdb.TYPE) {
|
msg := m.Spawn(SERVE, w, r)
|
||||||
case "login":
|
if share := r.URL.Query().Get("share"); share != "" {
|
||||||
RenderCookie(msg, aaa.SessCreate(msg, msg.Append(aaa.USERNAME)))
|
switch msg := msg.Cmd(SHARE, share); msg.Append(mdb.TYPE) {
|
||||||
|
case "login":
|
||||||
|
RenderCookie(msg, aaa.SessCreate(msg, msg.Append(aaa.USERNAME)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
repos := kit.Select(ice.INTSHELL, ice.VOLCANOS, strings.Contains(r.Header.Get("User-Agent"), "Mozilla/5.0"))
|
repos := kit.Select(ice.INTSHELL, ice.VOLCANOS, strings.Contains(r.Header.Get("User-Agent"), "Mozilla/5.0"))
|
||||||
if repos == ice.VOLCANOS {
|
if repos == ice.VOLCANOS {
|
||||||
if s := msg.Cmdx("web.chat.website", "show", "index.iml", "Header", "", "River", ""); s != "" {
|
if s := msg.Cmdx("web.chat.website", "show", "index.iml", "Header", "", "River", ""); s != "" {
|
||||||
Render(msg, ice.RENDER_RESULT, s)
|
Render(msg, ice.RENDER_RESULT, s)
|
||||||
return true
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Render(msg, ice.RENDER_DOWNLOAD, path.Join(msg.Config(kit.Keys(repos, nfs.PATH)), msg.Config(kit.Keys(repos, INDEX))))
|
||||||
|
return true // 网站主页
|
||||||
|
|
||||||
|
case "/help/":
|
||||||
|
r.URL.Path = "/help/tutor.shy"
|
||||||
}
|
}
|
||||||
Render(msg, ice.RENDER_DOWNLOAD, path.Join(msg.Config(kit.Keys(repos, nfs.PATH)), msg.Config(kit.Keys(repos, INDEX))))
|
|
||||||
return true // 网站主页
|
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user