mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 09:34:05 +08:00
add some
This commit is contained in:
parent
437ec06692
commit
1f0f934ec0
@ -38,7 +38,7 @@ func (s apply) Apply(m *ice.Message, arg ...string) {
|
||||
h := s.Hash.Create(m, kit.Simple(arg, mdb.STATUS, kit.FuncName(s.Apply), web.ParseUA(m.Message))...)
|
||||
m.ProcessCookie(_cookie_key(m), h)
|
||||
m.StreamPushRefreshConfirm()
|
||||
m.ChatMessageInsertPlug(aaa.APPLY, "user.signup", m.PrefixKey(), h)
|
||||
m.ChatMessageInsertPlug(aaa.APPLY, "user.signup", "", m.PrefixKey(), h)
|
||||
}
|
||||
}
|
||||
func (s apply) Agree(m *ice.Message, arg ...string) {
|
||||
|
@ -121,11 +121,9 @@ func MessageInsert(m *ice.Message, zone string, arg ...string) {
|
||||
}
|
||||
func MessageInsertPlug(m *ice.Message, zone, name, text, index, args string, arg ...string) {
|
||||
kit.If(text == "", func() {
|
||||
msg := m.Cmd(index, args)
|
||||
if msg.Option(ice.MSG_STATUS) == "" {
|
||||
msg.StatusTimeCount()
|
||||
}
|
||||
msg := m.Cmds(index, args, ice.Maps{ice.MSG_USERUA: html.Mozilla})
|
||||
kit.If(msg.Option(ice.MSG_STATUS) == "", func() { msg.StatusTimeCount() })
|
||||
text = msg.FormatMeta()
|
||||
})
|
||||
MessageInsert(m, zone, kit.Simple(mdb.TYPE, html.PLUG, mdb.NAME, kit.Select(m.ActionKey(), name), mdb.TEXT, text, ctx.INDEX, index, ctx.ARGS, args, arg)...)
|
||||
MessageInsert(m, zone, kit.Simple(mdb.TYPE, html.PLUG, mdb.NAME, kit.Select(m.ActionKey(), name), mdb.TEXT, text, ctx.INDEX, kit.Select(m.ShortKey(), index), ctx.ARGS, args, arg)...)
|
||||
}
|
||||
|
@ -70,22 +70,22 @@ func init() {
|
||||
web.StreamPushRefreshConfirm(m, m.Trans("refresh for new message ", "刷新列表,查看最新消息 "))
|
||||
}},
|
||||
web.DREAM_CREATE: {Hand: func(m *ice.Message, arg ...string) {
|
||||
PlanInsert(m, web.DREAM, "", m.Option(mdb.NAME), web.CHAT_IFRAME, web.S(m.Option(mdb.NAME)))
|
||||
PlanInsertPlan(m, web.DREAM, "", m.Option(mdb.NAME), web.CHAT_IFRAME, web.S(m.Option(mdb.NAME)))
|
||||
}},
|
||||
web.DREAM_REMOVE: {Hand: func(m *ice.Message, arg ...string) {
|
||||
PlanInsert(m, web.DREAM, "", "", web.CHAT_IFRAME, web.S(m.Option(mdb.NAME)))
|
||||
PlanInsertPlan(m, web.DREAM, "", "", web.CHAT_IFRAME, web.S(m.Option(mdb.NAME)))
|
||||
}},
|
||||
aaa.OFFER_CREATE: {Hand: func(m *ice.Message, arg ...string) {
|
||||
PlanInsert(m, aaa.APPLY, "", m.Option(aaa.EMAIL), aaa.OFFER, m.Option(mdb.HASH))
|
||||
PlanInsertPlan(m, aaa.APPLY, "", m.Option(aaa.EMAIL), aaa.OFFER, m.Option(mdb.HASH))
|
||||
}},
|
||||
aaa.OFFER_ACCEPT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
PlanInsert(m, aaa.APPLY, "", m.Option(aaa.EMAIL), aaa.OFFER, m.Option(mdb.HASH))
|
||||
PlanInsertPlan(m, aaa.APPLY, "", m.Option(aaa.EMAIL), aaa.OFFER, m.Option(mdb.HASH))
|
||||
}},
|
||||
aaa.USER_CREATE: {Hand: func(m *ice.Message, arg ...string) {
|
||||
PlanInsert(m, aaa.APPLY, "", "", aaa.USER, m.Option(aaa.USERNAME))
|
||||
PlanInsertPlan(m, aaa.APPLY, "", "", aaa.USER, m.Option(aaa.USERNAME))
|
||||
}},
|
||||
aaa.USER_REMOVE: {Hand: func(m *ice.Message, arg ...string) {
|
||||
PlanInsert(m, aaa.APPLY, "", "", aaa.USER, m.Option(aaa.USERNAME))
|
||||
PlanInsertPlan(m, aaa.APPLY, "", "", aaa.USER, m.Option(aaa.USERNAME))
|
||||
}},
|
||||
ctx.RUN: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.RenameOption(TASK_POD, ice.POD); ctx.PodCmd(m, m.ShortKey(), ctx.RUN, arg) {
|
||||
@ -105,11 +105,11 @@ func init() {
|
||||
}},
|
||||
})
|
||||
}
|
||||
func PlanInsert(m *ice.Message, zone, name, text, index, args string, arg ...string) {
|
||||
func PlanInsertPlan(m *ice.Message, zone, name, text, index, args string, arg ...string) {
|
||||
if ice.Info.Important {
|
||||
m.Cmd(PLAN, mdb.INSERT, web.SPACE, "", mdb.ZONE, zone, mdb.TYPE, "once",
|
||||
mdb.NAME, kit.Select(m.ActionKey(), name), mdb.TEXT, kit.Select(args, text), BEGIN_TIME, m.Time(),
|
||||
"extra.index", index, "extra.args", args, arg,
|
||||
"extra.index", kit.Select(m.ShortKey(), index), "extra.args", args, arg,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user