From 75df0d6bdf57c222bf94c91dc79af932724bb285 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Thu, 14 Apr 2022 20:38:51 +0300 Subject: [PATCH] Make all newsgroups temporary anonymous --- internal/server/handler.go | 4 ++-- internal/server/session.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/server/handler.go b/internal/server/handler.go index fb87ed2..cc58874 100644 --- a/internal/server/handler.go +++ b/internal/server/handler.go @@ -116,9 +116,9 @@ func (h *Handler) handleList(s *Session, command string, arguments []string, id if err != nil { return err } - dw.Write([]byte(fmt.Sprintf("%s %d %d n"+protocol.CRLF, v.GroupName, highWaterMark, lowWaterMark))) + dw.Write([]byte(fmt.Sprintf("%s %d %d y"+protocol.CRLF, v.GroupName, highWaterMark, lowWaterMark))) } else { - dw.Write([]byte(fmt.Sprintf("%s 0 1 n"+protocol.CRLF, v.GroupName))) + dw.Write([]byte(fmt.Sprintf("%s 0 1 y"+protocol.CRLF, v.GroupName))) } } return dw.Close() diff --git a/internal/server/session.go b/internal/server/session.go index 5ccd8b8..373772d 100644 --- a/internal/server/session.go +++ b/internal/server/session.go @@ -75,7 +75,7 @@ func (s *Session) loop() { close(s.closed) }() - err := s.tconn.PrintfLine(protocol.NNTPResponse{Code: 201, Message: "YANS NNTP Service Ready, posting prohibited"}.String()) // by default access mode is read-only + err := s.tconn.PrintfLine(protocol.NNTPResponse{Code: 201, Message: "YANS NNTP Service Ready, posting allowed"}.String()) // by default access mode is read-only if err != nil { s.conn.Close() return