forked from x/icebergs
add some
This commit is contained in:
parent
83fdeae371
commit
df4575cf2e
@ -199,7 +199,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
code.XTERM: {Hand: func(m *ice.Message, arg ...string) {
|
code.XTERM: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
ctx.Process(m, code.XTERM, []string{SSH + lex.SP + m.Option(mdb.NAME)}, arg...)
|
ctx.ProcessField(m, code.XTERM, kit.JoinWord(SSH, m.Option(mdb.NAME)), arg...)
|
||||||
}},
|
}},
|
||||||
}, mdb.StatusHashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,name,username,private,host,port"), mdb.ImportantHashAction()), Hand: func(m *ice.Message, arg ...string) {
|
}, mdb.StatusHashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,name,username,private,host,port"), mdb.ImportantHashAction()), Hand: func(m *ice.Message, arg ...string) {
|
||||||
if mdb.HashSelect(m, arg...).PushAction(code.XTERM, DIRECT, SESSION, mdb.REMOVE); len(arg) == 0 {
|
if mdb.HashSelect(m, arg...).PushAction(code.XTERM, DIRECT, SESSION, mdb.REMOVE); len(arg) == 0 {
|
||||||
|
@ -93,12 +93,12 @@ func (s relay) Inputs(m *ice.Message, arg ...string) {
|
|||||||
switch s.Hash.Inputs(m, arg...); arg[0] {
|
switch s.Hash.Inputs(m, arg...); arg[0] {
|
||||||
case MACHINE:
|
case MACHINE:
|
||||||
if m.Option(ctx.ACTION) == mdb.CREATE {
|
if m.Option(ctx.ACTION) == mdb.CREATE {
|
||||||
m.Copy(m.Cmd(web.SPIDE).CutTo(web.CLIENT_NAME, arg[0]))
|
m.Message.Copy(m.Cmd(web.SPIDE).CutTo(web.CLIENT_NAME, arg[0]))
|
||||||
}
|
}
|
||||||
case aaa.USERNAME:
|
case aaa.USERNAME:
|
||||||
m.Copy(m.Cmd(aaa.USER).Cut(aaa.USERNAME).Push(arg[0], aaa.ROOT).Push(arg[0], ice.SHY))
|
m.Message.Copy(m.Cmd(aaa.USER).Cut(aaa.USERNAME).Push(arg[0], aaa.ROOT).Push(arg[0], ice.SHY))
|
||||||
case tcp.HOST:
|
case tcp.HOST:
|
||||||
m.Copy(m.Options(ice.MSG_FIELDS, web.CLIENT_HOSTNAME).Cmd(web.SPIDE).CutTo(web.CLIENT_HOSTNAME, arg[0]))
|
m.Message.Copy(m.Options(ice.MSG_FIELDS, web.CLIENT_HOSTNAME).Cmd(web.SPIDE).CutTo(web.CLIENT_HOSTNAME, arg[0]))
|
||||||
case tcp.PORT:
|
case tcp.PORT:
|
||||||
m.Push(arg[0], tcp.PORT_22, tcp.PORT_9022)
|
m.Push(arg[0], tcp.PORT_22, tcp.PORT_9022)
|
||||||
case web.PORTAL:
|
case web.PORTAL:
|
||||||
@ -165,7 +165,7 @@ func (s relay) Dream(m *ice.Message) {
|
|||||||
if strings.HasPrefix(res, "status") {
|
if strings.HasPrefix(res, "status") {
|
||||||
}
|
}
|
||||||
_msg := m.Spawn().SplitIndex(res)
|
_msg := m.Spawn().SplitIndex(res)
|
||||||
m.Copy(_msg.Table(func(value ice.Maps) {
|
m.Message.Copy(_msg.Table(func(value ice.Maps) {
|
||||||
switch _msg.Push(MACHINE, msg.Option(MACHINE)).Push(tcp.HOST, msg.Option(tcp.HOST)); msg.Option(web.PORTAL) {
|
switch _msg.Push(MACHINE, msg.Option(MACHINE)).Push(tcp.HOST, msg.Option(tcp.HOST)); msg.Option(web.PORTAL) {
|
||||||
case "":
|
case "":
|
||||||
_msg.Push(web.LINK, "")
|
_msg.Push(web.LINK, "")
|
||||||
@ -183,7 +183,7 @@ func (s relay) Dream(m *ice.Message) {
|
|||||||
m.Push(mdb.TYPE, web.SERVER).Push(mdb.STATUS, web.ONLINE).Push(web.LINK, web.UserHost(m.Message))
|
m.Push(mdb.TYPE, web.SERVER).Push(mdb.STATUS, web.ONLINE).Push(web.LINK, web.UserHost(m.Message))
|
||||||
}
|
}
|
||||||
if _msg := m.Spawn().SplitIndex(m.Cmdx(cli.SYSTEM, kit.Split(s.admin(m, web.ROUTE)))); _msg.Length() > 0 {
|
if _msg := m.Spawn().SplitIndex(m.Cmdx(cli.SYSTEM, kit.Split(s.admin(m, web.ROUTE)))); _msg.Length() > 0 {
|
||||||
m.Copy(_msg.Table(func(value ice.Maps) {
|
m.Message.Copy(_msg.Table(func(value ice.Maps) {
|
||||||
_msg.Push(MACHINE, tcp.LOCALHOST).Push(tcp.HOST, tcp.PublishLocalhost(m.Message, tcp.LOCALHOST))
|
_msg.Push(MACHINE, tcp.LOCALHOST).Push(tcp.HOST, tcp.PublishLocalhost(m.Message, tcp.LOCALHOST))
|
||||||
_msg.Push(web.LINK, web.UserHost(m.Message)+web.S(value[web.SPACE]))
|
_msg.Push(web.LINK, web.UserHost(m.Message)+web.S(value[web.SPACE]))
|
||||||
}).Cut(fields))
|
}).Cut(fields))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user