This commit is contained in:
mysticbbs 2013-09-21 12:53:04 -04:00
parent 99663660ae
commit 2d0cb7a1cc
7 changed files with 149 additions and 59 deletions

View File

@ -131,6 +131,55 @@ Begin
Close (F);
End;
Procedure EditSessionInfo (Var Node: RecEchoMailNode);
Var
Box : TAnsiMenuBox;
Form : TAnsiMenuForm;
Topic : String;
Begin
Topic := '|03(|09Echomail Session|03) |01-|09> |15';
Box := TAnsiMenuBox.Create;
Form := TAnsiMenuForm.Create;
Case Node.ProtType of
0 : Begin
Box.Header := ' BINKP ';
Box.Open (17, 7, 63, 15);
VerticalLine (30, 9, 13);
Form.AddStr ('H', ' Host' , 24, 9, 32, 9, 6, 20, 60, @Node.binkHost, Topic + '<hostname>:<port>');
Form.AddMask ('S', ' Password' , 20, 10, 32, 10, 10, 20, 20, @Node.binkPass, Topic);
Form.AddWord ('T', ' TimeOut' , 21, 11, 32, 11, 9, 4, 10, 9999, @Node.binkTimeOut, Topic + 'Inactive session timeout (seconds)');
Form.AddWord ('B', ' BlockSize' , 19, 12, 32, 12, 11, 5, 4096, 30720, @Node.binkBlock, Topic + 'Blocksize in bytes');
Form.AddTog ('M', ' CRAM-MD5' , 20, 13, 32, 13, 10, 6, 0, 2, 'No Yes Forced', @Node.binkMD5, Topic);
Form.Execute;
Box.Close;
End;
2 : Begin
Box.Header := ' DIRECTORY ';
Box.Open (15, 8, 64, 13);
VerticalLine (31, 10, 11);
Form.AddPath ('O', ' Outbound Dir', 17, 10, 33, 10, 14, 30, 60, @Node.DirOutDir, Topic);
Form.AddPath ('I', ' Inbound Dir' , 18, 11, 33, 11, 13, 30, 60, @Node.DirInDir, Topic);
Form.Execute;
Box.Close;
End;
End;
Form.Free;
Box.Free;
End;
Procedure EditNode (Var Node: RecEchoMailNode);
Var
Box : TAnsiMenuBox;
@ -142,40 +191,33 @@ Begin
Form := TAnsiMenuForm.Create;
Box.Header := ' Index ' + strI2S(Node.Index) + ' ';
Box.Shadow := False;
Box.Open (3, 5, 76, 22);
Box.Open (10, 5, 70, 17);
VerticalLine (19, 7, 14);
VerticalLine (19, 17, 21);
VerticalLine (53, 7, 11);
// VerticalLine (53, 14, 19);
VerticalLine (27, 7, 13);
VerticalLine (59, 7, 11);
WriteXY (13, 16, 112, 'BINKP');
// WriteXY (49, 13, 112, 'FTP');
Form.AddStr ('D', ' Description' , 14, 7, 29, 7, 13, 23, 35, @Node.Description, Topic + 'Node description');
Form.AddBol ('A', ' Active' , 19, 8, 29, 8, 8, 3, @Node.Active, Topic + 'Is node active?');
Form.AddStr ('R', ' Archive Type' , 13, 9, 29, 9, 14, 4, 4, @Node.ArcType, Topic + 'Archive type for packets');
Form.AddTog ('Y', ' Export Type' , 14, 10, 29, 10, 13, 6, 0, 3, 'Normal Crash Direct Hold', @Node.MailType, Topic);
Form.AddPass ('F', ' AllFix PW' , 16, 11, 29, 11, 11, 20, 20, @Node.AreaFixPass, Topic + 'Password for Area/FileFix');
Form.AddTog ('T', ' Session Type' , 13, 12, 29, 12, 14, 9, 0, 2, 'BinkP FTP Directory', @Node.ProtType, Topic + 'Transfer using BinkP, FTP, or to a file directory');
Form.AddStr ('U', ' Route Info' , 15, 13, 29, 13, 12, 40, 128, @Node.RouteInfo, Topic + 'Route info (ie "2:* 3:*")');
Form.AddStr ('D', ' Description' , 6, 7, 21, 7, 13, 23, 35, @Node.Description, Topic + 'Node description');
Form.AddBol ('A', ' Active' , 11, 8, 21, 8, 8, 3, @Node.Active, Topic + 'Is node active?');
Form.AddStr ('R', ' Archive Type' , 5, 9, 21, 9, 14, 4, 4, @Node.ArcType, Topic + 'Archive type for packets');
// Form.AddTog ('E', ' Network Type' , 5, 10, 21, 10, 14, 7, 0, 1, 'FidoNet QWK', @Node.NetType, Topic);
Form.AddTog ('L', ' Session Type' , 5, 11, 21, 11, 14, 5, 0, 1, 'BinkP FTP', @Node.ProtType, Topic);
Form.AddTog ('Y', ' Export Type' , 6, 12, 21, 12, 13, 6, 0, 3, 'Normal Crash Direct Hold', @Node.MailType, Topic);
Form.AddStr ('W', ' *Fix Password', 4, 13, 21, 13, 15, 20, 20, @Node.AreaFixPass, Topic + 'Password required for Area/FileFix');
Form.AddStr ('U', ' Route Info' , 7, 14, 21, 14, 12, 54, 128, @Node.RouteInfo, Topic + 'Route info (ie "2:* 3:*")');
Form.AddNone ('S', ' Session Options', 32, 15, 32, 15, 17, Topic);
Form.AddStr ('H', ' Host' , 13, 17, 21, 17, 6, 20, 60, @Node.binkHost, Topic + '<hostname>:<port>');
Form.AddMask ('S', ' Password' , 9, 18, 21, 18, 10, 20, 20, @Node.binkPass, Topic);
Form.AddWord ('T', ' TimeOut' , 10, 19, 21, 19, 9, 4, 10, 9999, @Node.binkTimeOut, Topic + 'Inactive session timeout (seconds)');
Form.AddWord ('B', ' BlockSize' , 8, 20, 21, 20, 11, 5, 4096, 30720, @Node.binkBlock, Topic + 'Blocksize in bytes');
Form.AddTog ('M', ' CRAM-MD5' , 9, 21, 21, 21, 10, 6, 0, 2, 'No Yes Forced', @Node.binkMD5, Topic);
Form.AddWord ('Z', ' Zone' , 53, 7, 61, 7, 6, 5, 0, 65535, @Node.Address.Zone, Topic + 'Network Zone');
Form.AddWord ('N', ' Net' , 54, 8, 61, 8, 5, 5, 0, 65535, @Node.Address.Net, Topic + 'Network Net');
Form.AddWord ('O', ' Node' , 53, 9, 61, 9, 6, 5, 0, 65535, @Node.Address.Node, Topic + 'Network Node');
Form.AddWord ('P', ' Point' , 52, 10, 61, 10, 7, 5, 0, 65535, @Node.Address.Point, Topic + 'Network Point');
Form.AddStr ('I', ' Domain' , 51, 11, 61, 11, 8, 8, 8, @Node.Domain, Topic + 'Network Domain');
Form.AddWord ('Z', ' Zone' , 47, 7, 55, 7, 6, 5, 0, 65535, @Node.Address.Zone, Topic + 'Network Zone');
Form.AddWord ('N', ' Net' , 48, 8, 55, 8, 5, 5, 0, 65535, @Node.Address.Net, Topic + 'Network Net');
Form.AddWord ('O', ' Node' , 47, 9, 55, 9, 6, 5, 0, 65535, @Node.Address.Node, Topic + 'Network Node');
Form.AddWord ('P', ' Point' , 46, 10, 55, 10, 7, 5, 0, 65535, @Node.Address.Point, Topic + 'Network Point');
Form.AddStr ('I', ' Domain' , 45, 11, 55, 11, 8, 8, 8, @Node.Domain, Topic + 'Network Domain');
Repeat
If Form.Execute <> 'S' Then Break;
Form.Execute;
EditSessionInfo(Node);
Until False;
Box.Close;

View File

@ -17,7 +17,7 @@ Uses
Var
TempPath : String;
Procedure BinkPStatus (Owner: Pointer; Level: Byte; Str: String);
Procedure PrintStatus (Owner: Pointer; Level: Byte; Str: String);
Var
TF : Text;
Begin
@ -42,7 +42,29 @@ Begin
End;
End;
Function PollNode (OnlyNew: Boolean; Var Queue: TProtocolQueue; Var EchoNode: RecEchoMailNode) : Boolean;
Function PollNodeDirectory (OnlyNew: Boolean; Var Queue: TProtocolQueue; Var EchoNode: RecEchoMailNode) : Boolean;
Begin
Result := False;
End;
Function PollNodeFTP (OnlyNew: Boolean; Var Queue: TProtocolQueue; Var EchoNode: RecEchoMailNode) : Boolean;
Begin
Result := False;
Queue.Clear;
PrintStatus(NIL, 1, 'Scanning ' + Addr2Str(EchoNode.Address));
QueueByNode (Queue, True, EchoNode);
PrintStatus(NIL, 1, 'Queued ' + strI2S(Queue.QSize) + ' files (' + strI2S(Queue.QFSize) + ' bytes) to ' + Addr2Str(EchoNode.Address));
If OnlyNew and (Queue.QSize = 0) Then Exit;
PrintStatus(NIL, 1, 'Polling FTP node ' + Addr2Str(EchoNode.Address));
End;
Function PollNodeBINKP (OnlyNew: Boolean; Var Queue: TProtocolQueue; Var EchoNode: RecEchoMailNode) : Boolean;
Var
BinkP : TBinkP;
Client : TIOSocket;
@ -50,44 +72,42 @@ Var
Begin
Result := False;
If Not (EchoNode.Active and (EchoNode.ProtType = 0)) Then Exit;
Queue.Clear;
BinkPStatus(NIL, 1, 'Scanning ' + Addr2Str(EchoNode.Address));
PrintStatus(NIL, 1, 'Scanning ' + Addr2Str(EchoNode.Address));
QueueByNode (Queue, True, EchoNode);
BinkPStatus(NIL, 1, 'Queued ' + strI2S(Queue.QSize) + ' files (' + strI2S(Queue.QFSize) + ' bytes) to ' + Addr2Str(EchoNode.Address));
PrintStatus(NIL, 1, 'Queued ' + strI2S(Queue.QSize) + ' files (' + strI2S(Queue.QFSize) + ' bytes) to ' + Addr2Str(EchoNode.Address));
If OnlyNew and (Queue.QSize = 0) Then Exit;
BinkPStatus(NIL, 1, 'Polling node ' + Addr2Str(EchoNode.Address));
PrintStatus(NIL, 1, 'Polling BINKP node ' + Addr2Str(EchoNode.Address));
Client := TIOSocket.Create;
Client.FTelnetClient := False;
Client.FTelnetServer := False;
BinkPStatus (NIL, 1, 'Connecting to ' + EchoNode.binkHost);
PrintStatus (NIL, 1, 'Connecting to ' + EchoNode.binkHost);
Port := strS2I(strWordGet(2, EchoNode.binkHost, ':'));
If Port = 0 Then Port := 24554;
If Not Client.Connect (strWordGet(1, EchoNode.binkHost, ':'), Port) Then Begin
BinkPStatus (NIL, 1, 'UNABLE TO CONNECT');
PrintStatus (NIL, 1, 'UNABLE TO CONNECT');
Client.Free;
Exit;
End;
BinkPStatus(NIL, 1, 'Connected');
PrintStatus(NIL, 1, 'Connected');
BinkP := TBinkP.Create(Client, Client, Queue, True, EchoNode.binkTimeOut * 100);
BinkP.StatusUpdate := @BinkPStatus;
BinkP.StatusUpdate := @PrintStatus;
BinkP.SetOutPath := GetFTNOutPath(EchoNode);
BinkP.SetPassword := EchoNode.binkPass;
BinkP.SetBlockSize := EchoNode.binkBlock;
@ -115,12 +135,20 @@ Begin
Result := GetNodeByAddress(Addr, EchoNode);
If Result Then
If PollNode(False, Queue, EchoNode) Then Begin
EchoNode.LastSent := PollTime;
// needs to save updated polltime
If Result And EchoNode.Active Then Begin
Case EchoNode.ProtType of
0 : If PollNodeBINKP(False, Queue, EchoNode) Then
EchoNode.LastSent := PollTime;
1 : If PollNodeFTP(False, Queue, EchoNode) Then
EchoNode.LastSent := PollTime;
2 : If PollNodeDirectory(False, Queue, EchoNode) Then
EchoNode.LastSent := PollTime;
End;
// needs to save updated polltime
End Else
Result := False;
Queue.Free;
End;
@ -134,7 +162,7 @@ Var
Begin
PollTime := CurDateDos;
WriteLn ('Polling BINKP nodes...');
WriteLn ('Polling nodes...');
WriteLn;
Total := 0;
@ -148,10 +176,15 @@ Begin
While Not Eof(EchoFile) Do Begin
Read (EchoFile, EchoNode);
If PollNode(OnlyNew, Queue, EchoNode) Then Begin
Inc (Total);
EchoNode.LastSent := PollTime;
If EchoNode.Active Then Begin
Case EchoNode.ProtType of
0 : If PollNodeBINKP(OnlyNew, Queue, EchoNode) Then
EchoNode.LastSent := PollTime;
1 : If PollNodeFTP(OnlyNew, Queue, EchoNode) Then
EchoNode.LastSent := PollTime;
2 : If PollNodeDirectory(False, Queue, EchoNode) Then
EchoNode.LastSent := PollTime;
End;
Seek (EchoFile, FilePos(EchoFile) - 1);
Write (EchoFile, EchoNode);
@ -163,7 +196,7 @@ Begin
Queue.Free;
WriteLn;
BinkPStatus (NIL, 1, 'Polled ' + strI2S(Total) + ' nodes');
PrintStatus (NIL, 1, 'Polled ' + strI2S(Total) + ' nodes');
End;
Var
@ -208,5 +241,5 @@ Begin
PollAll (Str = 'SEND')
Else
If Not PollByAddress(Str) Then
BinkPStatus (NIL, 1, 'Invalid command line or address');
PrintStatus (NIL, 1, 'Invalid command line or address');
End.

View File

@ -161,6 +161,12 @@ Var
(EchoNode.Address.Node = MsgBase^.GetOrigAddr.Node) and
(EchoNode.Address.Point = MsgBase^.GetOrigAddr.Point) Then Exit;
// if netmail is TO someone on this system do not export
If MBase.NetType = 3 Then
If IsValidAKA(MsgBase^.GetDestAddr.Zone, MsgBase^.GetDestAddr.Net, MsgBase^.GetDestAddr.Node) Then
Exit;
Log (2, '+', ' Export #' + strI2S(MsgBase^.GetMsgNum) + ' to ' + strAddr2Str(EchoNode.Address));
GetDate (DT.Year, DT.Month, DT.Day, Temp);
@ -216,6 +222,7 @@ Var
PH.DestZone := EchoNode.Address.Zone;
PH.DestNet := EchoNode.Address.Net;
PH.DestNode := EchoNode.Address.Node;
// ^^ does this need to change for netmail too?
PH.Year := DT.Year;
PH.Month := DT.Month;
PH.Day := DT.Day;
@ -261,8 +268,10 @@ Var
If MBase.NetType <> 3 Then
WriteStr ('AREA:' + MBase.EchoTag, #13);
If MBase.NetType = 3 Then
If MBase.NetType = 3 Then Begin
WriteStr (#1 + 'INTL ' + strAddr2Str(MsgBase^.GetDestAddr) + ' ' + strAddr2Str(MsgBase^.GetOrigAddr), #13);
// Add Via here and do an ELSE TID for nettype <> 3?
End;
WriteStr (#1 + 'TID: ' + mysSoftwareID + ' ' + mysVersion, #13);

View File

@ -47,6 +47,7 @@ Begin
MB^.SetCrash (PKT.MsgHDR.Attribute AND pktCrash <> 0);
MB^.SetRcvd (PKT.MsgHDR.Attribute AND pktReceived <> 0);
//MB^.SetSent (PKT.MsgHDR.Attribute AND pktSent <> 0);
// MB^.SetSent (NetMail);
MB^.SetSent (False); // force to send to downlinks?
MB^.SetHold (PKT.MsgHDR.Attribute AND pktHold <> 0);
MB^.SetKillSent (PKT.MsgHDR.Attribute AND pktKillSent <> 0);

View File

@ -224,13 +224,13 @@ Begin
WriteLn ('Syntax: QWKPOLL [ALL]');
WriteLn (' [Qwk Network Index]');
WriteLn;
WriteLn (' [EXPORT] [QwkNet Index] [PATH TO CREATE REP]');
WriteLn (' [IMPORT] [QwkNet Index] [PATH OF QWK PACKET]');
WriteLn (' [EXPORT] [Index/ALL] [PATH TO CREATE REP]');
WriteLn (' [IMPORT] [Index/ALL] [PATH OF QWK PACKET]');
WriteLn;
WriteLn ('Ex: QWKPOLL ALL - Exchange with ALL QWK hubs via FTP');
WriteLn (' QWKPOLL 1 - Exchange with only Qwk Network #1');
WriteLn (' QWKPOLL 1 EXPORT /bbs/qwknet - Create REP packet in /bbs/qwknet');
WriteLn (' QWKPOLL 1 IMPORT /bbs/qwknet - Import QWK packet from /bbs/qwknet');
WriteLn ('Ex: QWKPOLL ALL - Exchange with ALL QWK hubs via FTP');
WriteLn (' QWKPOLL 1 - Exchange with only Qwk Network #1');
WriteLn (' QWKPOLL 1 EXPORT /bbs/qwknet - Create REP packet in /bbs/qwknet');
WriteLn (' QWKPOLL ALL IMPORT /bbs/qwknet - Import QWK packets from /bbs/qwknet');
WriteLn;
WriteLn ('NOTE: QWKPOLL automatically deals with QWK and REP packets during polling');
WriteLn (' The export and import functions are not needed, and only provided');

View File

@ -106,7 +106,7 @@ Type
Address : RecEchoMailAddr;
Domain : String[8];
ArcType : String[4];
MailType : Byte;
MailType : Byte; // 0=BINKP,1=FTP,2=Dir
binkHost : String[60];
UNUSED1 : Byte;
ProtType : Byte;
@ -114,7 +114,7 @@ Type
binkBlock : Word;
binkMD5 : Byte;
ftpOutHost : String[60];
ftpOutPort : Word;
UNUSED2 : Word;
ftpOutLogin : String[20];
ftpOutPass : String[20];
ftpInDir : String[60];
@ -130,7 +130,9 @@ Type
binkPass : String[20];
RouteInfo : String[128];
AreaFixPass : String[20];
Res : Array[1..341] of Byte;
DirInDir : String[60];
DirOutDir : String[60];
Res : Array[1..219] of Byte;
End;
RecQwkNetwork = Record

View File

@ -3812,4 +3812,7 @@
+ Mystic's netmail fowarding will now strip leading and trailing spaces in
case of typos in the .INI.
! Netmail messages will no longer export from MUTIL if their destination
address is one of your configured AKA addresses.
<ALPHA 38 RELEASED>