]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cfg.go
.hdr files
[nncp.git] / src / cfg.go
index 9d94953d319a1ae1ecee17cf9d64d090ad5fab4f..6e781d19e62a0ca1d6f0e628466f91be8af22a6d 100644 (file)
@@ -119,6 +119,7 @@ type CfgJSON struct {
        Umask string `json:"umask,omitempty"`
 
        OmitPrgrs bool `json:"noprogress,omitempty"`
+       NoHdr     bool `json:"nohdr,omitempty"`
 
        Notify *NotifyJSON `json:"notify,omitempty"`
 
@@ -463,11 +464,16 @@ func CfgParse(data []byte) (*Ctx, error) {
        if cfgJSON.OmitPrgrs {
                showPrgrs = false
        }
+       hdrUsage := true
+       if cfgJSON.NoHdr {
+               hdrUsage = false
+       }
        ctx := Ctx{
                Spool:      spoolPath,
                LogPath:    logPath,
                UmaskForce: umaskForce,
                ShowPrgrs:  showPrgrs,
+               HdrUsage:   hdrUsage,
                Self:       self,
                Neigh:      make(map[NodeId]*Node, len(cfgJSON.Neigh)),
                Alias:      make(map[string]*NodeId),