This commit is contained in:
g00r00 2013-09-29 20:25:56 -04:00
parent fc1e81d7be
commit 7b6fd8db0c
9 changed files with 68 additions and 62 deletions

View File

@ -92,22 +92,27 @@ Begin
Result := Temp; Result := Temp;
End; End;
Function Str2Addr (S : String; Var Addr: RecEchoMailAddr) : Boolean; Function Str2Addr (S: String; Var Addr: RecEchoMailAddr) : Boolean;
Var Var
A : Byte; A : Byte;
B : Byte; B : Byte;
C : Byte; C : Byte;
D : Byte;
Point : Boolean; Point : Boolean;
Begin Begin
Result := False; Result := False;
Point := True; Point := True;
D := Pos('@', S);
A := Pos(':', S); A := Pos(':', S);
B := Pos('/', S); B := Pos('/', S);
C := Pos('.', S); C := Pos('.', S);
If (A = 0) or (B <= A) Then Exit; If (A = 0) or (B <= A) Then Exit;
If D > 0 Then
Delete (S, D, 255);
If C = 0 Then Begin If C = 0 Then Begin
Point := False; Point := False;
C := Length(S) + 1; C := Length(S) + 1;

View File

@ -83,11 +83,11 @@ Uses
// BBS_Records, // BBS_Records,
// BBS_Common, // BBS_Common,
BBS_DataBase, BBS_DataBase,
bbs_Core, BBS_Core,
bbs_User, BBS_User,
bbs_NodeInfo, BBS_NodeInfo,
bbs_NodeList, BBS_NodeList,
bbs_cfg_UserEdit; BBS_cfg_UserEdit;
Const Const
QwkControlName = 'MYSTICQWK'; QwkControlName = 'MYSTICQWK';
@ -1351,7 +1351,9 @@ Begin
Until False; Until False;
If ReplyBase.NetType = 3 Then Begin If ReplyBase.NetType = 3 Then Begin
MsgBase^.GetOrig(Addr); // If ReplyID <> '' Then
If Not Str2Addr(strWordGet(1, ReplyID, ' '), Addr) Then
MsgBase^.GetOrig(Addr);
TempStr := NetmailLookup(False, ToWho, Addr2Str(Addr)); TempStr := NetmailLookup(False, ToWho, Addr2Str(Addr));
@ -1781,6 +1783,7 @@ Var
While Not MsgBase^.EOM Do Begin While Not MsgBase^.EOM Do Begin
Temp := MsgBase^.GetString(79); Temp := MsgBase^.GetString(79);
If Temp[1] <> #1 Then WriteLn (TF, Temp); If Temp[1] <> #1 Then WriteLn (TF, Temp);
End; End;
@ -2025,12 +2028,16 @@ Var
CurMsg := MsgBase^.GetMsgNum; CurMsg := MsgBase^.GetMsgNum;
Lines := 0; Lines := 0;
PageStart := 1; PageStart := 1;
ReplyID := '';
If CurMsg > LastRead Then LastRead := CurMsg; If CurMsg > LastRead Then LastRead := CurMsg;
Session.io.AllowArrow := True; Session.io.AllowArrow := True;
// create ReadMessageText function? // create ReadMessageText function? This can also be used in the
// ASCII reader and in fact should be used, because if a more prompt
// is interrupted, its possible for a ReplyID to not be set. RepID
// is also not nulled prior to loading a new message.
MsgBase^.MsgTxtStartUp; MsgBase^.MsgTxtStartUp;
@ -2272,6 +2279,7 @@ Var
End; End;
'?' : Begin '?' : Begin
Session.io.OutFile ('amsghlp2', True, 0); Session.io.OutFile ('amsghlp2', True, 0);
Break; Break;
End; End;
End; End;
@ -2665,6 +2673,10 @@ Var
WereMsgs := True; WereMsgs := True;
Session.io.AllowPause := True; Session.io.AllowPause := True;
// should be entirely read in and then filtered for kludge
// then displayed based on what was read in. replyID should
// be reset here
While Not MsgBase^.EOM Do Begin While Not MsgBase^.EOM Do Begin
Str := MsgBase^.GetString(79); Str := MsgBase^.GetString(79);

View File

@ -17,7 +17,6 @@ Var
Function SearchForUser (UN: String; Var Rec: RecUser; Var RecPos: LongInt) : Boolean; Function SearchForUser (UN: String; Var Rec: RecUser; Var RecPos: LongInt) : Boolean;
Function CheckAccess (User: RecUser; IgnoreGroup: Boolean; Str: String) : Boolean; Function CheckAccess (User: RecUser; IgnoreGroup: Boolean; Str: String) : Boolean;
Function GetSecurityLevel (Level: Byte; SecLevel: RecSecurity) : Boolean; Function GetSecurityLevel (Level: Byte; SecLevel: RecSecurity) : Boolean;
//Function strAddr2Str (Addr : RecEchoMailAddr) : String;
Implementation Implementation
@ -213,17 +212,4 @@ Begin
Result := True; Result := True;
End; End;
(*
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
Var
Temp : String[20];
Begin
Temp := strI2S(Addr.Zone) + ':' + strI2S(Addr.Net) + '/' +
strI2S(Addr.Node);
If Addr.Point <> 0 Then Temp := Temp + '.' + strI2S(Addr.Point);
Result := Temp;
End;
*)
End. End.

View File

@ -42,7 +42,6 @@ Const
Header_NODELIST = 'MergeNodeLists'; Header_NODELIST = 'MergeNodeLists';
Procedure Log (Level: Byte; Code: Char; Str: String); Procedure Log (Level: Byte; Code: Char; Str: String);
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
Function GetUserBaseSize : Cardinal; Function GetUserBaseSize : Cardinal;
Function GenerateMBaseIndex : LongInt; Function GenerateMBaseIndex : LongInt;
Function GenerateFBaseIndex : LongInt; Function GenerateFBaseIndex : LongInt;
@ -92,18 +91,6 @@ Begin
Close (T); Close (T);
End; End;
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
Var
Temp : String[20];
Begin
Temp := strI2S(Addr.Zone) + ':' + strI2S(Addr.Net) + '/' +
strI2S(Addr.Node);
If Addr.Point <> 0 Then Temp := Temp + '.' + strI2S(Addr.Point);
Result := Temp;
End;
Function GetUserBaseSize : Cardinal; Function GetUserBaseSize : Cardinal;
Begin Begin
Result := FileByteSize(bbsCfg.DataPath + 'users.dat'); Result := FileByteSize(bbsCfg.DataPath + 'users.dat');
@ -377,14 +364,14 @@ Begin
Msg^.SetSubj (mSubj); Msg^.SetSubj (mSubj);
If (mArea.NetType > 0) and (mArea.QwkNetID = 0) Then If (mArea.NetType > 0) and (mArea.QwkNetID = 0) Then
Msg^.DoStringLn (#1 + 'MSGID: ' + strAddr2Str(bbsCfg.NetAddress[mArea.NetAddr]) + ' ' + strI2H(CurDateDos, 8)); Msg^.DoStringLn (#1 + 'MSGID: ' + Addr2Str(bbsCfg.NetAddress[mArea.NetAddr]) + ' ' + strI2H(CurDateDos, 8));
For Count := 1 to mLines Do For Count := 1 to mLines Do
Msg^.DoStringLn(mText[Count]); Msg^.DoStringLn(mText[Count]);
If mArea.NetType > 0 Then Begin If mArea.NetType > 0 Then Begin
Msg^.DoStringLn (#13 + '--- ' + mysSoftwareID + ' BBS v' + mysVersion + ' (' + OSID + ')'); Msg^.DoStringLn (#13 + '--- ' + mysSoftwareID + ' v' + mysVersion + ' (' + OSID + ')');
Msg^.DoStringLn (' * Origin: ' + mArea.Origin + ' (' + strAddr2Str(bbsCfg.NetAddress[mArea.NetAddr]) + ')'); Msg^.DoStringLn (' * Origin: ' + mArea.Origin + ' (' + Addr2Str(bbsCfg.NetAddress[mArea.NetAddr]) + ')');
End; End;
Msg^.WriteMsg; Msg^.WriteMsg;

View File

@ -93,8 +93,10 @@ Type
TPKTReader = Class TPKTReader = Class
PKTHeader : RecPKTHeader; PKTHeader : RecPKTHeader;
Orig : RecEchoMailAddr; PKTOrig : RecEchoMailAddr;
Dest : RecEchoMailAddr; PKTDest : RecEchoMailAddr;
MsgOrig : RecEchoMailAddr;
MsgDest : RecEchoMailAddr;
MsgHdr : RecPKTMessageHdr; MsgHdr : RecPKTMessageHdr;
MsgFile : TFileBuffer; MsgFile : TFileBuffer;
MsgTo : String[50]; MsgTo : String[50];
@ -105,9 +107,10 @@ Type
MsgText : Array[1..mysMaxMsgLines] of ^RecMsgLine; MsgText : Array[1..mysMaxMsgLines] of ^RecMsgLine;
MsgSize : LongInt; MsgSize : LongInt;
MsgLines : LongInt; MsgLines : LongInt;
MsgArea : String; MsgArea : String[60];
MsgCRC : RecMsgDupe; MsgCRC : RecMsgDupe;
Opened : Boolean; Opened : Boolean;
//IsNetMail : Boolean;
Constructor Create; Constructor Create;
Destructor Destroy; Override; Destructor Destroy; Override;
@ -237,14 +240,14 @@ Begin
Opened := False; Opened := False;
End Else Begin End Else Begin
Orig.Zone := PKTHeader.OrigZone; PKTOrig.Zone := PKTHeader.OrigZone;
Orig.Net := PKTHeader.OrigNet; PKTOrig.Net := PKTHeader.OrigNet;
Orig.Node := PKTHeader.OrigNode; PKTOrig.Node := PKTHeader.OrigNode;
Dest.Zone := PKTHeader.DestZone; PKTDest.Zone := PKTHeader.DestZone;
Dest.Net := PKTHeader.DestNet; PKTDest.Net := PKTHeader.DestNet;
Dest.Node := PKTHeader.DestNode; PKTDest.Node := PKTHeader.DestNode;
Result := True; Result := True;
Opened := True; Opened := True;
End; End;
End; End;
@ -283,6 +286,8 @@ Begin
MsgFrom := GetStr (#0); MsgFrom := GetStr (#0);
MsgSubj := GetStr (#0); MsgSubj := GetStr (#0);
MsgTime := Copy(MsgDate, 12, 5); MsgTime := Copy(MsgDate, 12, 5);
MsgOrig := PKTOrig;
MsgDest := PKTDest;
Tmp := strUpper(Copy(MsgDate, 4, 3)); Tmp := strUpper(Copy(MsgDate, 4, 3));
@ -297,6 +302,7 @@ Begin
DisposeText; DisposeText;
First := True; First := True;
// IsNetmail := False;
MsgSize := 0; MsgSize := 0;
Result := True; Result := True;
MsgLines := 1; MsgLines := 1;
@ -331,10 +337,20 @@ Begin
MsgText[MsgLines]^ := ''; MsgText[MsgLines]^ := '';
Continue; Continue;
End Else End Else Begin
MsgArea := 'NETMAIL'; MsgArea := 'NETMAIL';
// IsNetMail := True;
End;
End; End;
(*
If MsgText[MsgLines]^[1] = #1 Then Begin
If Copy(MsgText[MsgLines]^, 2, 4) = 'INTL' Then
Str2Addr(strWordGet(2, MsgText[MsgLines]^, ' '), MsgDest)
Else
If (Copy(MsgText[MsgLines]^, 2, 5) = 'MSGID') Then
Str2Addr(strWordGet(2, MsgText[MsgLines]^, ' '), MsgOrig);
End;
*)
Inc (MsgSize, Length(MsgText[MsgLines]^)); Inc (MsgSize, Length(MsgText[MsgLines]^));
Inc (MsgLines); Inc (MsgLines);

View File

@ -95,7 +95,7 @@ Begin
BundleName := BundlePath + GetFTNArchiveName(OrigAddr, EchoNode.Address) + '.' + strLower(DayString[DayOfWeek(CurDateDos)]); BundleName := BundlePath + GetFTNArchiveName(OrigAddr, EchoNode.Address) + '.' + strLower(DayString[DayOfWeek(CurDateDos)]);
BundleName[Length(BundleName)] := '0'; BundleName[Length(BundleName)] := '0';
(* (*
BundleName := BundlePath + GetFTNBundleExt(False, GetFTNArchiveName(OrigAddr, EchoNode.Address) + '.' + Copy(strLower(DayString[DayOfWeek(CurDateDos)]), 1, 2) + '0'); BundleName := BundlePath + GetFTNBundleExt(False, GetFTNArchiveName(OrigAddr, EchoNode.Address) + '.' + Copy(strLower(DayString[DayOfWeek(CurDateDos)]), 1, 2) + '0');
@ -184,7 +184,7 @@ Var
If IsValidAKA(MsgBase^.GetDestAddr.Zone, MsgBase^.GetDestAddr.Net, MsgBase^.GetDestAddr.Node) Then If IsValidAKA(MsgBase^.GetDestAddr.Zone, MsgBase^.GetDestAddr.Net, MsgBase^.GetDestAddr.Node) Then
Exit; Exit;
Log (2, '+', ' Export #' + strI2S(MsgBase^.GetMsgNum) + ' to ' + strAddr2Str(EchoNode.Address)); Log (2, '+', ' Export #' + strI2S(MsgBase^.GetMsgNum) + ' to ' + Addr2Str(EchoNode.Address));
GetDate (DT.Year, DT.Month, DT.Day, Temp); GetDate (DT.Year, DT.Month, DT.Day, Temp);
GetTime (DT.Hour, DT.Min, DT.Sec, Temp); GetTime (DT.Hour, DT.Min, DT.Sec, Temp);
@ -287,8 +287,7 @@ Var
WriteStr ('AREA:' + MBase.EchoTag, #13); WriteStr ('AREA:' + MBase.EchoTag, #13);
If MBase.NetType = 3 Then Begin If MBase.NetType = 3 Then Begin
WriteStr (#1 + 'INTL ' + strAddr2Str(MsgBase^.GetDestAddr) + ' ' + strAddr2Str(MsgBase^.GetOrigAddr), #13); WriteStr (#1 + 'INTL ' + Addr2Str(MsgBase^.GetDestAddr) + ' ' + Addr2Str(MsgBase^.GetOrigAddr), #13);
// Add Via here and do an ELSE TID for nettype <> 3?
End; End;
WriteStr (#1 + 'TID: ' + mysSoftwareID + ' ' + mysVersion, #13); WriteStr (#1 + 'TID: ' + mysSoftwareID + ' ' + mysVersion, #13);
@ -311,7 +310,8 @@ Var
WriteStr (TempStr1, #13); WriteStr (TempStr1, #13);
WriteStr (#1 + 'PATH: ' + strI2S(MsgBase^.GetOrigAddr.Net) + '/' + strI2S(MsgBase^.GetOrigAddr.Node), #13); WriteStr (#1 + 'PATH: ' + strI2S(MsgBase^.GetOrigAddr.Net) + '/' + strI2S(MsgBase^.GetOrigAddr.Node), #13);
End; End;// Else
// WriteStr (#1 + 'Via ' + Addr2Str(MsgBase^.GetOrigAddr) + ' @' + FormatDate(CurDateDT, 'YYYYMMDD.HHIISS') + '.UTC ' + mysSoftwareID + ' ' + mysVersion, #13);
WriteStr (#0#0, #0); WriteStr (#0#0, #0);
Close (F); Close (F);

View File

@ -40,8 +40,8 @@ Begin
MB^.SetMailType (mmtEchoMail); MB^.SetMailType (mmtEchoMail);
MB^.SetLocal (False); MB^.SetLocal (False);
MB^.SetOrig (PKT.Orig); MB^.SetOrig (PKT.PKTOrig);
MB^.SetDest (PKT.Dest); MB^.SetDest (PKT.PKTDest);
MB^.SetPriv ((PKT.MsgHDR.Attribute AND pktPrivate <> 0) OR NetMail); MB^.SetPriv ((PKT.MsgHDR.Attribute AND pktPrivate <> 0) OR NetMail);
MB^.SetCrash (PKT.MsgHDR.Attribute AND pktCrash <> 0); MB^.SetCrash (PKT.MsgHDR.Attribute AND pktCrash <> 0);
@ -93,7 +93,7 @@ Var
Exit; Exit;
End; End;
If Not IsValidAKA(PKT.Dest.Zone, PKT.Dest.Net, PKT.Dest.Node) Then Begin If Not IsValidAKA(PKT.PKTDest.Zone, PKT.PKTDest.Net, PKT.PKTDest.Node) Then Begin
Log (3, '!', ' ' + JustFile(PktFN) + ' does not match an AKA'); Log (3, '!', ' ' + JustFile(PktFN) + ' does not match an AKA');
PKT.Close; PKT.Close;

View File

@ -74,7 +74,7 @@ Begin
MBase.FileName := strReplace(MBase.FileName, '\', '_'); MBase.FileName := strReplace(MBase.FileName, '\', '_');
For Count := 1 to 30 Do For Count := 1 to 30 Do
If strAddr2Str(bbsCfg.NetAddress[Count]) = INI.ReadString(Header_IMPORTNA, 'netaddress', '') Then Begin If Addr2Str(bbsCfg.NetAddress[Count]) = INI.ReadString(Header_IMPORTNA, 'netaddress', '') Then Begin
MBase.NetAddr := Count; MBase.NetAddr := Count;
Break; Break;

View File

@ -96,7 +96,7 @@ Begin
MBase.FileName := strReplace(MBase.FileName, '\', '_'); MBase.FileName := strReplace(MBase.FileName, '\', '_');
For Count := 1 to 30 Do For Count := 1 to 30 Do
If strAddr2Str(bbsCfg.NetAddress[Count]) = INI.ReadString(Header_IMPORTNA, 'netaddress', '') Then Begin If Addr2Str(bbsCfg.NetAddress[Count]) = INI.ReadString(Header_IMPORTNA, 'netaddress', '') Then Begin
MBase.NetAddr := Count; MBase.NetAddr := Count;
Break; Break;
End; End;