Subj : help
To   : All
From : Chris Hoppman
Date : Sun Aug 18 2002 08:35 am

I was wondering what would I pass to these procedures.
I have tired to pass just:
Cli.HeadByNo(10234,'alt.bbs');

The same for Id, but it didn't ruturn
what I thought it would.


 PROCEDURE TAbsNNTPClient.HeadByNo(No: Integer; Head: TStringList);
 BEGIN
   SendCommand('HEAD '+IntToStr(No));
   IF LastResponseCode<>221 THEN
     RAISE EAbsNNTPClient.Create('HeadByNo', LastResponse);
   GetMsgLines(Head);
 END;

 PROCEDURE TAbsNNTPClient.BodyById(Id: STRING; Body: TStringList);
 BEGIN
   SendCommand('BODY <'+Id+'>');
   IF LastResponseCode<>222 THEN
     RAISE EAbsNNTPClient.Create('BodyById', LastResponse);
   GetMsgLines(Body);
 END;


Also, how would I send say a string to this so I can
read a text file and then post that to a newsgroup.

 PROCEDURE TAbsNNTPClient.Post(Article: TStringList);
 VAR
   I : Integer;
 BEGIN
   SendCommand('POST');
   IF LastResponseCode<>340 THEN
     RAISE EAbsNNTPClient.Create('Post', LastResponse);
   FOR I:=0 TO Article.Count-1 DO
   BEGIN
     IF Copy(Article[I],1,1)='.' THEN Article[I]:='.'+Article[I];
     Socket.WriteLn(Article[I]);
   END;
   Socket.WriteLn('.');
   GetResponse(Nil);
   IF LastResponseCode<>240 THEN
     RAISE EAbsNNTPClient.Create('Post: After transfer', LastResponse);
 END;






Thanks
chris

--- Renegade vY2Ka2
* Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)