1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
root 2025-01-22 15:32:30 +08:00
parent d9fcacd679
commit 50ba5c3a3f
3 changed files with 47 additions and 2 deletions

View File

@ -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)
}
}
})

View File

@ -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{}) }

11
core/chat/password.go Normal file
View File

@ -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")
}},
})
}