X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcall.go;h=295e7c8805c62eaee4cf0d3fd5051e4e86fb2251;hb=2e59e1d8da61bc5dee797d351e50e8ed114aa4c7;hp=c52fc419ecafe6a75e45afaf9a14e99bd8c5a6ee;hpb=0367cce2741e1ce6a89a49fd5c4e9df6005c9744;p=nncp.git diff --git a/src/call.go b/src/call.go index c52fc41..295e7c8 100644 --- a/src/call.go +++ b/src/call.go @@ -22,10 +22,12 @@ import ( "fmt" "net" "os" + "strings" "time" "github.com/dustin/go-humanize" "github.com/gorhill/cronexpr" + nncpYggdrasil "go.cypherpunks.ru/nncp/v8/yggdrasil" ) type Call struct { @@ -48,6 +50,7 @@ type Call struct { AutoTossNoExec bool AutoTossNoTrns bool AutoTossNoArea bool + AutoTossNoACK bool } func (ctx *Ctx) CallNode( @@ -83,11 +86,13 @@ func (ctx *Ctx) CallNode( if addr == "" { addr = UCSPITCPClient } + } else if strings.HasPrefix(addr, "yggdrasilc://") { + conn, err = nncpYggdrasil.NewConn(ctx.YggdrasilAliases, addr) } else { conn, err = net.Dial("tcp", addr) } if err != nil { - ctx.LogD("calling", append(les, LE{"Err", err}), func(les LEs) string { + ctx.LogE("calling", les, err, func(les LEs) string { return fmt.Sprintf("Calling %s (%s)", node.Name, addr) }) continue