1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
shaoying 2020-09-24 08:16:40 +08:00
parent 8f8c671bfb
commit ef946ab109
2 changed files with 12 additions and 4 deletions

View File

@ -259,6 +259,14 @@ func init() {
_action_list(m, arg[0], arg[1])
return
}
if len(arg) > 2 && arg[2] == "order" {
for _, k := range arg[3:] {
m.Cmdy(ctx.COMMAND, k)
m.Push("action", k)
m.Push("index", k)
}
return
}
_action_show(m, arg[0], arg[1], arg[2], arg[3:]...)
}},
}}, nil)

View File

@ -15,8 +15,8 @@ func _river_list(m *ice.Message) {
if m.Option("share") != "" && m.Option("share") != "" {
m.Option(ice.MSG_RIVER, m.Option("river"))
if m.Cmd(AUTH, m.Option("share")).Append(kit.MDB_TYPE) == USER {
if m.Cmd(USER, m.Option(ice.MSG_USERNAME)).Append(ice.MSG_USERNAME) == "" {
m.Cmd(USER, mdb.INSERT, aaa.USERNAME, m.Option(ice.MSG_USERNAME))
if m.Cmd(m.Prefix(USER), m.Option(ice.MSG_USERNAME)).Append(ice.MSG_USERNAME) == "" {
m.Cmd(m.Prefix(USER), mdb.INSERT, aaa.USERNAME, m.Option(ice.MSG_USERNAME))
// 加入群组
}
}
@ -165,7 +165,7 @@ func init() {
return
}
m.Option(mdb.FIELDS, "time,id,pod,ctx,cmd,help")
m.Option(mdb.FIELDS, "time,id,pod,ctx,cmd,arg")
msg := m.Cmd(mdb.SELECT, RIVER, kit.Keys(kit.MDB_HASH, m.Option(ice.MSG_RIVER), TOOL, kit.MDB_HASH, arg[0]), mdb.LIST, kit.MDB_ID, kit.Select("", arg, 1))
if len(msg.Appendv(CMD)) == 0 && len(arg) > 1 {
msg.Push(CMD, arg[1])
@ -215,7 +215,7 @@ func init() {
m.Conf(RIVER, kit.Keys(kit.MDB_HASH, h, USER, kit.MDB_META, kit.MDB_SHORT), aaa.USERNAME)
m.Conf(RIVER, kit.Keys(kit.MDB_HASH, h, NODE, kit.MDB_META, kit.MDB_SHORT), kit.MDB_NAME)
m.Cmd(USER, mdb.INSERT, aaa.USERNAME, m.Option(ice.MSG_USERNAME))
m.Cmd(m.Prefix(USER), mdb.INSERT, aaa.USERNAME, m.Option(ice.MSG_USERNAME))
kit.Fetch(m.Confv(RIVER, kit.Keys("meta.template", "base")), func(storm string, value interface{}) {
h := m.Cmdx(TOOL, mdb.CREATE, kit.MDB_TYPE, "public", kit.MDB_NAME, storm, kit.MDB_TEXT, storm)