mirror of
https://github.com/ChronosX88/yans.git
synced 2024-11-24 12:32:17 +00:00
Make all newsgroups temporary anonymous
This commit is contained in:
parent
3bedb48945
commit
75df0d6bdf
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user