Change default capabilities list to transit mode

This commit is contained in:
ChronosX88 2022-01-18 20:47:32 +03:00
parent e85fb43d50
commit c5eaa65de9
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A
2 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,9 @@ func (h *Handler) handleModeReader(s *Session, arguments []string) error {
} }
(&s.capabilities).Remove(protocol.ModeReaderCapability) (&s.capabilities).Remove(protocol.ModeReaderCapability)
(&s.capabilities).Remove(protocol.ListCapability)
(&s.capabilities).Add(protocol.Capability{Type: protocol.ReaderCapability}) (&s.capabilities).Add(protocol.Capability{Type: protocol.ReaderCapability})
(&s.capabilities).Add(protocol.Capability{Type: protocol.ListCapability, Params: "ACTIVE NEWSGROUPS"})
s.mode = SessionModeReader s.mode = SessionModeReader
return s.tconn.PrintfLine(protocol.MessageReaderModePostingProhibited) // TODO vary on auth status return s.tconn.PrintfLine(protocol.MessageReaderModePostingProhibited) // TODO vary on auth status

View File

@ -21,7 +21,6 @@ var (
{Type: protocol.VersionCapability, Params: "2"}, {Type: protocol.VersionCapability, Params: "2"},
{Type: protocol.ImplementationCapability, Params: fmt.Sprintf("%s %s", common.ServerName, common.ServerVersion)}, {Type: protocol.ImplementationCapability, Params: fmt.Sprintf("%s %s", common.ServerName, common.ServerVersion)},
{Type: protocol.ModeReaderCapability}, {Type: protocol.ModeReaderCapability},
{Type: protocol.ListCapability, Params: "ACTIVE NEWSGROUPS"},
} }
) )