X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=blobdiff_plain;f=src%2Fcfg.go;h=615e382410a6f52bd067e40717356a3b9c6e0950;hp=edc132a37ffc403a09dd55221871ceb07fb15a27;hb=1d2ce674b042d07fd9b37a46578c8b62bb0345b7;hpb=b2e36aeaa5dc1c9649c6895d938208d92ddc3fa3 diff --git a/src/cfg.go b/src/cfg.go index edc132a..615e382 100644 --- a/src/cfg.go +++ b/src/cfg.go @@ -108,6 +108,8 @@ type CfgJSON struct { Log string `json:"log"` Umask string `json:"umask",omitempty` + OmitPrgrs bool `json:"noprogress",omitempty` + Notify *NotifyJSON `json:"notify,omitempty"` Self *NodeOurJSON `json:"self"` @@ -423,10 +425,15 @@ func CfgParse(data []byte) (*Ctx, error) { rInt := int(r) umaskForce = &rInt } + showPrgrs := true + if cfgJSON.OmitPrgrs { + showPrgrs = false + } ctx := Ctx{ Spool: spoolPath, LogPath: logPath, UmaskForce: umaskForce, + ShowPrgrs: showPrgrs, Self: self, Neigh: make(map[NodeId]*Node, len(cfgJSON.Neigh)), Alias: make(map[string]*NodeId),