From 299f3ea184588a33c46073259a7abad9dbfdc3f5 Mon Sep 17 00:00:00 2001 From: shy Date: Wed, 31 Jan 2024 15:16:32 +0800 Subject: [PATCH] add some --- base/aaa/offer.go | 4 ++++ base/web/store.go | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/base/aaa/offer.go b/base/aaa/offer.go index df9db3e6..580368da 100644 --- a/base/aaa/offer.go +++ b/base/aaa/offer.go @@ -45,6 +45,10 @@ func init() { }, mdb.ImportantHashAction(EMAIL, ADMIN, mdb.SHORT, mdb.UNIQ, mdb.FIELD, "time,hash,status,inviter,email,title,content")), Hand: func(m *ice.Message, arg ...string) { if !m.Warn(len(arg) == 0 && m.Option(ice.MSG_USERROLE) == VOID, ice.ErrNotRight) { kit.If(mdb.HashSelect(m, arg...).FieldsIsDetail(), func() { + if m.Option(ice.MSG_USERNAME) != "" { + m.ProcessLocation(m.MergePod("")) + return + } m.Option(ice.MSG_USERHOST, strings.Split(m.Option(ice.MSG_USERHOST), "://")[1]) m.SetAppend().EchoInfoButton(ice.Info.Template(m, SUBJECT_HTML), ACCEPT) }) diff --git a/base/web/store.go b/base/web/store.go index d582dd46..ce323cee 100644 --- a/base/web/store.go +++ b/base/web/store.go @@ -38,15 +38,13 @@ func init() { OPEN: {Hand: func(m *ice.Message, arg ...string) { ProcessIframe(m, m.Option(mdb.NAME), S(m.Option(mdb.NAME)), arg...) }}, - PORTAL: {Hand: func(m *ice.Message, arg ...string) { + PORTAL: {Role: aaa.VOID, Hand: func(m *ice.Message, arg ...string) { ProcessIframe(m, m.Option(mdb.NAME), m.Option(ORIGIN)+S(m.Option(mdb.NAME))+C(PORTAL), arg...) }}, }, ctx.ConfAction(ctx.TOOLS, DREAM)), Hand: func(m *ice.Message, arg ...string) { if len(arg) == 0 { m.Cmd(SPIDE, arg, kit.Dict(ice.MSG_FIELDS, "time,client.type,client.name,client.origin")).Table(func(value ice.Maps) { - if value[CLIENT_TYPE] == nfs.REPOS { - m.Push(mdb.NAME, value[CLIENT_NAME]) - } + kit.If(value[CLIENT_TYPE] == nfs.REPOS, func() { m.Push(mdb.NAME, value[CLIENT_NAME]) }) }) if ctx.Toolkit(m.Display("")); ice.Info.NodeType == WORKER { return