diff --git a/base/web/serve.go b/base/web/serve.go index 0fc13d2b..f181fe18 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -47,9 +47,9 @@ func _serve_start(m *ice.Message) { } if msg := m.Cmd(SPIDE, dev); msg.Append(TOKEN) == "" { if m.Option(TOKEN) != "" { - m.Sleep30ms(SPACE, tcp.DIAL, ice.DEV, dev, TOKEN, m.Option(TOKEN)) + m.Sleep300ms(SPACE, tcp.DIAL, ice.DEV, dev, TOKEN, m.Option(TOKEN)) } else { - m.Sleep30ms(SPACE, tcp.DIAL, ice.DEV, dev) + m.Sleep300ms(SPACE, tcp.DIAL, ice.DEV, dev) } } }) diff --git a/core/chat/center/center.go b/core/chat/center/center.go new file mode 100644 index 00000000..3b436f02 --- /dev/null +++ b/core/chat/center/center.go @@ -0,0 +1,34 @@ +package center + +import ( + "shylinux.com/x/ice" + "shylinux.com/x/icebergs/base/ctx" + "shylinux.com/x/icebergs/base/mdb" + "shylinux.com/x/icebergs/base/nfs" + "shylinux.com/x/icebergs/base/web" + kit "shylinux.com/x/toolkits" +) + +type center struct { + list string `name:"list name auto" help:"示例"` +} + +func (s center) List(m *ice.Message, arg ...string) { + if len(arg) > 1 { + m.Cmdy(web.SPACE, arg[0], m.PrefixKey()).Table(func(value ice.Maps) { + m.Push(nfs.FILE, kit.Keys(arg[0], value[mdb.NAME])) + }) + if m.Length() == 0 { + m.Push(web.SPACE, arg[0]).Push(ctx.INDEX, web.DESKTOP) + } + return + } + m.Cmd(web.SPACE).Table(func(value ice.Maps) { + if value[mdb.TYPE] == web.SERVER { + m.PushRecord(value, mdb.NAME, mdb.ICONS, nfs.MODULE, nfs.VERSION) + } + }) + m.Display("/plugin/story/spides.js?split=.").Option(nfs.DIR_ROOT, ice.Info.NodeName) +} + +func init() { ice.Cmd("web.chat.center.center", center{}) } diff --git a/core/chat/password.go b/core/chat/password.go new file mode 100644 index 00000000..2aeef28a --- /dev/null +++ b/core/chat/password.go @@ -0,0 +1,11 @@ +package chat + +import ice "shylinux.com/x/icebergs" + +func init() { + Index.MergeCommands(ice.Commands{ + "password": {Name: "password", Hand: func(m *ice.Message, arg ...string) { + m.Echo("hello world") + }}, + }) +}