Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NNTP group info
#2
You have to send the server a 'LIST NEWSGROUPS' command. However, TIdNNTP does not implement that particular command at this time (it currently only implements 'LIST', 'LIST OVERVIEW.FMT', and 'LIST EXTENSIONS'), so you will have to send the command manually and then parse the response yourself, eg:

Code:
var
  LResponse: TStringList;
  I, J: Integer;
  LName, LDesc: string;
begin
  LResponse := TStringList.Create;
  try
    IdNNTP1.SendCmd('LIST NEWSGROUPS', 215);
    IdNNTP1.IOHandler.Capture(LResponse, IndyTextEncoding_8Bit);
    for I := 0 to LResponse.Count-1 do
    begin
      J := FindFirstOf(' '#9, LResponse[I]);
      LName := Copy(LResponse[I], 1, J-1);
      LDesc := Copy(LResponse[I], J+1, MaxInt);
      ...
    end;
  finally
    LResponse.Free;
  end;
end;

Reply


Messages In This Thread
NNTP group info - by AndrzejB - 01-03-2020, 12:16 PM
RE: NNTP group info - by rlebeau - 01-03-2020, 11:10 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)