5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 14:10:28 +00:00

Update admin.go

This commit is contained in:
Arceliar 2018-05-05 20:20:38 -05:00 committed by GitHub
parent cdedd304af
commit 3a1b67da8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ func (a *admin) init(c *Core, listenaddr string) {
a.addHandler("getSessions", nil, func(out *[]byte, _ ...string) {
*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 {
*out = []byte("Adding peer: " + saddr[0] + "\n")
} else {