mirror of
https://shylinux.com/x/icebergs
synced 2025-05-03 03:57:01 +08:00
opt some
This commit is contained in:
parent
3b7a24d662
commit
48fe6bfe83
@ -70,7 +70,7 @@ func _action_list(m *ice.Message, river, storm string) {
|
||||
if p := m.Option(POD); p != "" {
|
||||
m.Option(POD, "")
|
||||
// 代理列表
|
||||
m.Cmdy(web.SPACE, p, "web.chat./action", river, storm)
|
||||
m.Cmdy(web.SPACE, p, "web.chat./action")
|
||||
}
|
||||
if m.Option("share") != "" {
|
||||
// 共享列表
|
||||
@ -131,6 +131,12 @@ func _action_show(m *ice.Message, river, storm, index string, arg ...string) {
|
||||
return
|
||||
}
|
||||
if len(cmds) == 0 {
|
||||
if p := m.Option(POD); p != "" {
|
||||
m.Option(POD, "")
|
||||
// 代理列表
|
||||
m.Cmdy(web.SPACE, p, "web.chat./action", index, arg)
|
||||
return
|
||||
}
|
||||
m.Render("status", 404, "not found")
|
||||
return
|
||||
}
|
||||
|
@ -112,16 +112,26 @@ var Index = &ice.Context{Name: "chat", Help: "聊天中心",
|
||||
})
|
||||
switch m.Option(ice.MSG_USERURL) {
|
||||
case "/action":
|
||||
arg = arg[2:]
|
||||
case "/storm":
|
||||
if len(arg) > 0 {
|
||||
m.Option(ice.MSG_RIVER, arg[0])
|
||||
arg = arg[1:]
|
||||
}
|
||||
if len(arg) > 0 {
|
||||
m.Option(ice.MSG_STORM, arg[0])
|
||||
arg = arg[1:]
|
||||
}
|
||||
case "/storm":
|
||||
if len(arg) > 0 {
|
||||
m.Option(ice.MSG_RIVER, arg[0])
|
||||
arg = arg[1:]
|
||||
}
|
||||
if len(arg) > 0 {
|
||||
m.Option(ice.MSG_STORM, arg[0])
|
||||
arg = arg[1:]
|
||||
}
|
||||
case "/river":
|
||||
if len(arg) > 0 {
|
||||
m.Option(ice.MSG_RIVER, arg[0])
|
||||
arg = arg[1:]
|
||||
}
|
||||
if len(arg) > 1 && arg[1] == "storm" {
|
||||
|
@ -12,6 +12,12 @@ import (
|
||||
func _river_list(m *ice.Message) {
|
||||
m.Set(ice.MSG_OPTION, kit.MDB_KEY)
|
||||
m.Set(ice.MSG_OPTION, kit.MDB_NAME)
|
||||
|
||||
if p := m.Option(POD); p != "" {
|
||||
m.Option(POD, "")
|
||||
// 代理列表
|
||||
m.Cmdy(web.SPACE, p, "web.chat./river")
|
||||
}
|
||||
m.Richs(RIVER, nil, kit.MDB_FOREACH, func(key string, value map[string]interface{}) {
|
||||
m.Richs(RIVER, kit.Keys(kit.MDB_HASH, key, USER), m.Option(ice.MSG_USERNAME), func(k string, val map[string]interface{}) {
|
||||
m.Push(key, value[kit.MDB_META], []string{kit.MDB_KEY, kit.MDB_NAME}, val[kit.MDB_META])
|
||||
|
@ -11,6 +11,12 @@ func _storm_list(m *ice.Message, river string) {
|
||||
m.Set(ice.MSG_OPTION, kit.MDB_KEY)
|
||||
m.Set(ice.MSG_OPTION, kit.MDB_NAME)
|
||||
m.Set(ice.MSG_OPTION, kit.MDB_COUNT)
|
||||
|
||||
if p := m.Option(POD); p != "" {
|
||||
m.Option(POD, "")
|
||||
// 代理列表
|
||||
m.Cmdy(web.SPACE, p, "web.chat./storm")
|
||||
}
|
||||
m.Richs(RIVER, kit.Keys(kit.MDB_HASH, river, USER), m.Option(ice.MSG_USERNAME), func(k string, val map[string]interface{}) {
|
||||
m.Richs(RIVER, kit.Keys(kit.MDB_HASH, river, TOOL), kit.MDB_FOREACH, func(key string, value map[string]interface{}) {
|
||||
m.Push(key, value[kit.MDB_META], []string{kit.MDB_KEY, kit.MDB_NAME, kit.MDB_COUNT}, val[kit.MDB_META])
|
||||
|
Loading…
x
Reference in New Issue
Block a user