home *** CD-ROM | disk | FTP | other *** search
- program Terminal_WhoIs;
- var evnt,i,x:integer;
- s,s1,s2,s3:string;
- v1,v2:integer;
- begin
- setstatus('Connected to WhoIs server '+nv_remoteip);
- textbackground($000000);
- textfont(0);setoemcp(0);
- setbackcolor($000000);
- textbackground($FFFFFF);
- writeln(' ');
- textbackground($000000);
- textcolor($00FFFF);
- writeln('>Type in any text field below address, about which you wish to see information');
- writeln('>If specified server doesn''t has information try another server');
- s:='';
- repeat
- evnt:=waitevent(v1,v2);
- if evnt=1 then
- begin
- s:=s+recv;
- x:=pos(chr(13),s);if x=0 then x:=pos(chr(10),s);
- while x<>0 do
- begin
- textcolor($00FF00);
- writeln(copy(s,1,x-1));
- delete(s,1,x);
- x:=pos(chr(13),s);if x=0 then x:=pos(chr(10),s);
- end;
- end;
- if evnt=5 then
- begin
- s:=chr(v2);
- {if(v2=13)then s:=s+chr(10);}
- send(s);
- end;
-
- if evnt=6 then
- begin
- s1:='';s2:='';
- i:=getinputtext(s1,s2);
-
- if(v2<>0)then begin s3:=s1+s2; setinputtext(2,'');end
- else begin s3:=s1; setinputtext(1,'');end;
- textcolor($FFFF00);
- writeln('>'+s3);
- if(i and 1)<>0 then s3:=s3+chr(13)+chr(10);
- send(s3);
- end;
- until evnt=0;
- end.
-