mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-10 06:20:26 +00:00
Update admin.go
This commit is contained in:
parent
cdedd304af
commit
3a1b67da8c
@ -58,7 +58,7 @@ func (a *admin) init(c *Core, listenaddr string) {
|
|||||||
a.addHandler("getSessions", nil, func(out *[]byte, _ ...string) {
|
a.addHandler("getSessions", nil, func(out *[]byte, _ ...string) {
|
||||||
*out = []byte(a.printInfos(a.getData_getSessions()))
|
*out = []byte(a.printInfos(a.getData_getSessions()))
|
||||||
})
|
})
|
||||||
a.addHandler("addPeer", []string{"<port>"}, func(out *[]byte, saddr ...string) {
|
a.addHandler("addPeer", []string{"<proto://address:port>"}, func(out *[]byte, saddr ...string) {
|
||||||
if a.addPeer(saddr[0]) == nil {
|
if a.addPeer(saddr[0]) == nil {
|
||||||
*out = []byte("Adding peer: " + saddr[0] + "\n")
|
*out = []byte("Adding peer: " + saddr[0] + "\n")
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user