mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-08-13 22:37:28 +00:00
fix(news): stop IHAVE when duplicate lookup fails (#89)
Co-authored-by: SabFabDev <SabFabDev@users.noreply.github.com>
This commit is contained in:
parent
c2a06f1cdf
commit
21630c2d17
3 changed files with 49 additions and 4 deletions
|
|
@ -88,7 +88,6 @@ type Server struct {
|
|||
// ErrLog, when non-nil, receives connection-level errors. Protocol verbs
|
||||
// are never logged (a public server should not log every command).
|
||||
ErrLog *log.Logger
|
||||
group *nntp.Group
|
||||
}
|
||||
|
||||
// NewServer builds a server bound to a backend.
|
||||
|
|
@ -371,6 +370,9 @@ func handleIHave(args []string, s *session, c *textproto.Conn) error {
|
|||
return ErrSyntax
|
||||
}
|
||||
article, err := s.backend.GetArticle(nil, args[0])
|
||||
if err != nil && err != ErrInvalidMessageID && err != ErrInvalidArticleNumber {
|
||||
return err
|
||||
}
|
||||
if article != nil {
|
||||
return ErrNotWanted
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue