/*
  Command from RFC-4644

  Syntax
      CHECK message-id

   Responses
      238 message-id   Send article to be transferred
      431 message-id   Transfer not possible; try again later
      438 message-id   Article not wanted

   Parameters
      message-id = Article message-id
*/
Command from RFC-4644

Syntax
CHECK message-id

Responses
238 message-id   Send article to be transferred
431 message-id   Transfer not possible; try again later
438 message-id   Article not wanted

Parameters
message-id = Article message-id
/ * Command from RFC - 4644 Syntax CHECK message - id Responses 238 message - id Send article to be transferred 431 message - id Transfer not possible ; try again later 438 message - id Article not wanted Parameters message - id = Article message - id * /
func handleCheck(args []string, s *session, c *textproto.Conn) error {
	if len(args)<1 {
		return ErrSyntax
	}
	if !s.backend.AllowPost() {
		return c.PrintfLine("438 %s",args[0])
	}
	var article *nntp.Article
	var err error
	if s.beIhave!=nil { goto way_use_beIhave }
	article, err = s.backend.GetArticleWithNoGroup(args[0])
	if article != nil {
		return c.PrintfLine("438 %s",args[0])
	}
	return c.PrintfLine("238 %s",args[0])
	way_use_beIhave:
	err = s.beIhave.IHaveWantArticle(args[0])
	if err != nil {
		return c.PrintfLine("438 %s",args[0])
	}
	return c.PrintfLine("238 %s",args[0])
}
func handleCheck ( args [ ] string , s * session , c * textproto . Conn ) error { if len ( args ) < 1 { return ErrSyntax } if ! s . backend . AllowPost ( ) { return c . PrintfLine ( " " , args [ 0 ] ) } var article * nntp . Article var err error if s . beIhave != nil { goto way_use_beIhave } article , err = s . backend . GetArticleWithNoGroup ( args [ 0 ] ) if article != nil { return c . PrintfLine ( " " , args [ 0 ] ) } return c . PrintfLine ( " " , args [ 0 ] ) way_use_beIhave : err = s . beIhave . IHaveWantArticle ( args [ 0 ] ) if err != nil { return c . PrintfLine ( " " , args [ 0 ] ) } return c . PrintfLine ( " " , args [ 0 ] ) }
Command from RFC-4644
Command from RFC - 4644
// See if we have it. // See if we have it.