]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transfer.go
Read banner once at startup
[rbdr/mobius] / hotline / transfer.go
index 543b00c727240ea1e43890e95d2093f23f36263c..1257f8a33825285d2501373e4b44f870c21fa416 100644 (file)
@@ -5,8 +5,6 @@ import (
        "encoding/binary"
        "errors"
        "io"
        "encoding/binary"
        "errors"
        "io"
-       "os"
-       "path/filepath"
 )
 
 type transfer struct {
 )
 
 type transfer struct {
@@ -57,14 +55,3 @@ func receiveFile(r io.Reader, targetFile, resForkFile, infoFork, counterWriter i
        }
        return nil
 }
        }
        return nil
 }
-
-// TODO: read the banner once on startup instead of once per banner fetch
-func (s *Server) bannerDownload(w io.Writer) error {
-       bannerBytes, err := os.ReadFile(filepath.Join(s.ConfigDir, s.Config.BannerFile))
-       if err != nil {
-               return err
-       }
-       _, err = w.Write(bannerBytes)
-
-       return err
-}