mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
mac mod auth tree同步0.1.0权限树修改
This commit is contained in:
parent
e1d3288b40
commit
af344228ed
@ -115,9 +115,9 @@ var Index = &ctx.Context{Name: "tcp", Help: "网络连接",
|
||||
"listen": &ctx.Command{Name: "listen [address [security]]", Help: "监听连接", Hand: func(c *ctx.Context, m *ctx.Message, key string, arg ...string) string {
|
||||
switch len(arg) { // {{{
|
||||
case 0:
|
||||
m.Target.Travel(func(c *ctx.Context) bool {
|
||||
if tcp, ok := c.Server.(*TCP); ok && tcp.l != nil {
|
||||
m.Echo("%s %v\n", c.Name, tcp.l.Addr())
|
||||
m.Travel(m.Target, func(m *ctx.Message) bool {
|
||||
if tcp, ok := m.Target.Server.(*TCP); ok && tcp.l != nil {
|
||||
m.Echo("%s %v\n", m.Target.Name, tcp.l.Addr())
|
||||
}
|
||||
return true
|
||||
})
|
||||
@ -130,9 +130,9 @@ var Index = &ctx.Context{Name: "tcp", Help: "网络连接",
|
||||
"dial": &ctx.Command{Name: "dial [address [security]]", Help: "建立连接", Hand: func(c *ctx.Context, m *ctx.Message, key string, arg ...string) string {
|
||||
switch len(arg) { // {{{
|
||||
case 0:
|
||||
m.Target.Travel(func(c *ctx.Context) bool {
|
||||
if tcp, ok := c.Server.(*TCP); ok && tcp.c != nil {
|
||||
m.Echo("%s %v->%v\n", c.Name, tcp.c.LocalAddr(), tcp.c.RemoteAddr())
|
||||
m.Travel(m.Target, func(m *ctx.Message) bool {
|
||||
if tcp, ok := m.Target.Server.(*TCP); ok && tcp.c != nil {
|
||||
m.Echo("%s %v->%v\n", m.Target.Name, tcp.c.LocalAddr(), tcp.c.RemoteAddr())
|
||||
}
|
||||
return true
|
||||
})
|
||||
@ -155,6 +155,13 @@ var Index = &ctx.Context{Name: "tcp", Help: "网络连接",
|
||||
// }}}
|
||||
}},
|
||||
},
|
||||
Index: map[string]*ctx.Context{
|
||||
"void": &ctx.Context{
|
||||
Commands: map[string]*ctx.Command{
|
||||
"listen": &ctx.Command{},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user