(* This unit is made by judge dredd to get info on telnet info          *)
(* this is used so certain things will happen when telnet is being used *)
(* Copyright 1998 - Dedrick Allen & Allen Software Technologies         *)

unit netmodem;
interface

Type

 { Server stats report structor. }
 { Filename: NetModem.ISF }

 TServerRecord = Packed Record
  Version: String;
  xBuild: string;
  Registered: Boolean;
  LocalHostname: string;
  LocalIP: string;
  FutureUseA: LongInt;
  FutureUseB: LongInt;
  FutureUseC: string;
  FutureUseD: string;
 End;

 { Individual node stats report structor. }
 { Filename: NetModem.INF }
 { Note: This file maintains a record for each NetModem/32 node. }

 TNodeInfoRecord = Packed Record
  Connected: Boolean;
  RemoteHostname: string;
  RemoteIP: string;
  FutureUseA: LongInt;
  FutureUseB: LongInt;
  FutureUseC: string;
  FutureUseD: string;
 End;

 { Connections list structor. }
 { Filename: NetModem.ICL }

 TCallRecord = Packed Record
  CallDate: string;
  CallTime: string;
  Node: Byte;
  From: string;
 End;

 { Block list structor. }
 { Filename: NetModem.IBL }

 TBlockRecord = Packed Record
  Address: string;
  Created: string;
 End;
                
 { Node & Comport configuration structor. }
 { Filename: NetModem.ICF }
 { Note: Stored in the Windows directory, which may not be C:\Windows
         on everyones system. }

 TNodeRecord = Packed Record
  Node: Byte;
  Comport: Byte;
  BaudRate: Word;
  Note: string;
 End;

 procedure loadtcpip;
 procedure showtcpip;

 var
      isf          : tserverrecord;    { Server Info }
      netmodempath : string;           { Path for NetModem }
      running      : boolean;

 implementation

 uses dos,crt,genstr,io,filehandle;

 procedure loadtcpip;
 var isff:file;  { local tcp/ip info }

 begin
 running:=false;
 { this needs to be changed to get the right directory to where netmodem is
   installed , just to lazy to fix for now }
 assign(isff,'c:\net\netmodem.isf');
 {$i-} reset(isff,1); {$i+}
 if ioresult<>0 then exit;
 blockread(isff,isf,sizeof(isf));
 close(isff);
 running:=true;
 end;

 procedure showtcpip;
 var x:byte;
 begin
 textattr:=7;
 clrscr;

 pipewrite('|B0|13N|05e|08tModem/32 Beta 2 by Dedrick Allen info file reader by Judge Dredd'+#10#13);
 for x:=1 to 80 do write(#196);
 if running=false then begin
                       pipewrite('|13N|05e|08t Modem Not running');
                       exit;
                       end;
 pipewrite('|13V|05e|08rsion         '+isf.version+#10#13);
 pipewrite('|13B|05u|08ild           '+isf.xbuild+#10#13);
 pipewrite('|13R|05e|08gistered      '+yn(isf.registered)+#10#13);
 writeln;
 pipewrite('|13L|05o|08cal Host Name '+isf.localhostname+#10#13);
 pipewrite('|13L|05o|08cal IP        '+isf.localip+#10#13);
 writeln;
{ pipewrite('|13C|05o|08nnected       '+yn(ipf.connected)+#10#13);
 pipewrite('|13R|05e|08moteHostName  '+ipf.remotehostname+#10#13);
 pipewrite('|13R|05e|08moteIP        '+ipf.remoteip+#10#13);
 writeln;
 pipewrite('|13S|05e|08rver Port     '+strr(icp.serverport)+#10#13);
 pipewrite('|13C|05o|08mport         '+strr(icp.comport)+#10#13);
 pipewrite('|13B|05a|08udrate        '+strr(icp.baudrate)+#10#13);
 pipewrite('|13N|05o|08te            '+icp.note+#10#13);}
 end;

begin
end.
