mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
add some
This commit is contained in:
parent
d9fcacd679
commit
50ba5c3a3f
@ -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)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
34
core/chat/center/center.go
Normal file
34
core/chat/center/center.go
Normal 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
11
core/chat/password.go
Normal 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")
|
||||
}},
|
||||
})
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user