01-03-2020, 12:16 PM
01-03-2020, 11:10 PM
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;