home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 April / CHIP_CD_2005-04.iso / software / netv / NVinst.exe / $INSTDIR / Scripts / Terminal / whois.nvs < prev   
Encoding:
Text File  |  2005-02-22  |  1.3 KB  |  52 lines

  1. program Terminal_WhoIs;
  2. var evnt,i,x:integer;
  3.     s,s1,s2,s3:string;
  4.     v1,v2:integer;
  5. begin
  6. setstatus('Connected to WhoIs server '+nv_remoteip);
  7. textbackground($000000);
  8. textfont(0);setoemcp(0);
  9. setbackcolor($000000);
  10. textbackground($FFFFFF);
  11. writeln('                                                                              ');
  12. textbackground($000000);
  13. textcolor($00FFFF);
  14. writeln('>Type in any text field below address, about which you wish to see information');
  15. writeln('>If specified server doesn''t has information try another server');                                                                          
  16. s:='';
  17. repeat
  18. evnt:=waitevent(v1,v2);
  19. if evnt=1 then
  20. begin
  21. s:=s+recv;
  22. x:=pos(chr(13),s);if x=0 then x:=pos(chr(10),s);
  23. while x<>0 do
  24. begin
  25. textcolor($00FF00);
  26. writeln(copy(s,1,x-1));
  27. delete(s,1,x);
  28. x:=pos(chr(13),s);if x=0 then x:=pos(chr(10),s);
  29. end;
  30. end;
  31. if evnt=5 then
  32. begin
  33. s:=chr(v2);
  34. {if(v2=13)then s:=s+chr(10);}
  35. send(s);
  36. end;
  37.  
  38. if evnt=6 then
  39. begin
  40. s1:='';s2:='';
  41. i:=getinputtext(s1,s2);
  42.  
  43. if(v2<>0)then begin s3:=s1+s2; setinputtext(2,'');end
  44.          else begin s3:=s1; setinputtext(1,'');end;
  45. textcolor($FFFF00);
  46. writeln('>'+s3);
  47. if(i and 1)<>0 then s3:=s3+chr(13)+chr(10);
  48. send(s3);
  49. end;
  50. until evnt=0;
  51. end.
  52.