irc proxy checker
- From: Janie <janie@xxxxxxxxxxx>
- Date: Sat, 30 Dec 2006 09:51:13 +0000
i'm trying to write my own irc proxy checker. here's my code
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
host, port, line: String;
f: TextFile;
Count: Integer;
ProxyHandler: TidIOHandlerSocket;
begin
Count := 0;
AssignFile(f, 'irc.txt');
Rewrite(f);
for i := 0 to Memo1.Lines.Count - 1 do
begin
line := Memo1.Lines[i];
host := Copy(line, 1, Pos(':', line) - 1);
port := Copy(line, Pos(':', line) + 1, 6);
ProxyHandler := TidIOHandlerSocket.Create(nil);
ProxyHandler.Host := host;
ProxyHandler.Port := StrToInt(port);
irc.IOHandler := ProxyHandler;
Caption := 'Trying ' + host;
try
if not ProxyHandler.Connected then
begin
irc.Connect('buffy.afsmg.co.uk');
ProxyHandler.Open;
end;
if ProxyHandler.Connected then
begin
ProgressBar1.Step := 1;
WriteLn(f, line);
ProgressBar1.StepIt;
Inc(Count);
Label1.Caption := IntToStr(Count) + ' good proxies found.';
end;
except
on exception do
begin
Caption := host + ' is a bad proxy';
Sleep(5000);
end;
end;
Caption := 'Trying teh next server'; //stops here
Sleep(5000);
irc.Disconnect;
Continue;
ProxyHandler.Free;
end;
CloseFile(f);
Caption := 'Done !';
end;
what have i done wrong?
.
- Prev by Date: Re: Opendialog problem
- Next by Date: where to put a public const in my unit
- Previous by thread: TMonthCalendar Update
- Next by thread: where to put a public const in my unit
- Index(es):