More code reorg... big time restructure likely coming sometime soon
This commit is contained in:
parent
d5ae44e2ea
commit
d9f35518b1
|
@ -129,10 +129,10 @@ Begin
|
||||||
Halt(1);
|
Halt(1);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Read (CF, bbsConfig);
|
Read (CF, bbsCfg);
|
||||||
Close (CF);
|
Close (CF);
|
||||||
|
|
||||||
If bbsConfig.DataChanged <> mysDataChanged Then Begin
|
If bbsCfg.DataChanged <> mysDataChanged Then Begin
|
||||||
ProcessName ('Load configuration', False);
|
ProcessName ('Load configuration', False);
|
||||||
ProcessStatus ('Version mismatch', True);
|
ProcessStatus ('Version mismatch', True);
|
||||||
ProcessResult (rFATAL, False);
|
ProcessResult (rFATAL, False);
|
||||||
|
@ -140,7 +140,7 @@ Begin
|
||||||
Halt(1);
|
Halt(1);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
TempPath := bbsConfig.SystemPath + 'temputil' + PathChar;
|
TempPath := bbsCfg.SystemPath + 'temputil' + PathChar;
|
||||||
|
|
||||||
GetDIR (0, StartPath);
|
GetDIR (0, StartPath);
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ Begin
|
||||||
LogFile := INI.ReadString(Header_GENERAL, 'logfile', '');
|
LogFile := INI.ReadString(Header_GENERAL, 'logfile', '');
|
||||||
|
|
||||||
If (LogFile <> '') and (Pos(PathChar, LogFile) = 0) Then
|
If (LogFile <> '') and (Pos(PathChar, LogFile) = 0) Then
|
||||||
LogFile := bbsConfig.LogsPath + LogFile;
|
LogFile := bbsCfg.LogsPath + LogFile;
|
||||||
|
|
||||||
LogLevel := INI.ReadInteger(Header_GENERAL, 'loglevel', 1);
|
LogLevel := INI.ReadInteger(Header_GENERAL, 'loglevel', 1);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@ Uses
|
||||||
m_FileIO,
|
m_FileIO,
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
BBS_Records;
|
BBS_Records,
|
||||||
|
BBS_DataBase;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
TotalFiles : Cardinal = 0;
|
TotalFiles : Cardinal = 0;
|
||||||
|
@ -49,7 +50,7 @@ Begin
|
||||||
Exit;
|
Exit;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Assign (BaseFile, bbsConfig.DataPath + 'fbases.dat');
|
Assign (BaseFile, bbsCfg.DataPath + 'fbases.dat');
|
||||||
|
|
||||||
If Not ioReset (BaseFile, SizeOf(RecFileBase), fmRWDN) Then Begin
|
If Not ioReset (BaseFile, SizeOf(RecFileBase), fmRWDN) Then Begin
|
||||||
ProcessStatus ('Cannot open fbases.dat', True);
|
ProcessStatus ('Cannot open fbases.dat', True);
|
||||||
|
@ -68,8 +69,8 @@ Begin
|
||||||
|
|
||||||
// If Excludedbase then continue;
|
// If Excludedbase then continue;
|
||||||
|
|
||||||
Assign (ListFile, bbsConfig.DataPath + Base.FileName + '.dir');
|
Assign (ListFile, bbsCfg.DataPath + Base.FileName + '.dir');
|
||||||
Assign (DescFile, bbsConfig.DataPath + Base.FileName + '.des');
|
Assign (DescFile, bbsCfg.DataPath + Base.FileName + '.des');
|
||||||
|
|
||||||
If Not ioReset (ListFile, SizeOf(RecFileList), fmRWDN) Then Continue;
|
If Not ioReset (ListFile, SizeOf(RecFileList), fmRWDN) Then Continue;
|
||||||
|
|
||||||
|
|
|
@ -9,18 +9,17 @@ Uses
|
||||||
m_IniReader,
|
m_IniReader,
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
BBS_Records,
|
BBS_Records,
|
||||||
|
BBS_DataBase,
|
||||||
BBS_MsgBase_ABS,
|
BBS_MsgBase_ABS,
|
||||||
BBS_MsgBase_Squish,
|
BBS_MsgBase_Squish,
|
||||||
BBS_MsgBase_JAM;
|
BBS_MsgBase_JAM;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
Console : TOutput;
|
|
||||||
INI : TINIReader;
|
INI : TINIReader;
|
||||||
BarOne : TStatusBar;
|
BarOne : TStatusBar;
|
||||||
BarAll : TStatusBar;
|
BarAll : TStatusBar;
|
||||||
ProcessTotal : Byte = 0;
|
ProcessTotal : Byte = 0;
|
||||||
ProcessPos : Byte = 0;
|
ProcessPos : Byte = 0;
|
||||||
bbsConfig : RecConfig;
|
|
||||||
TempPath : String;
|
TempPath : String;
|
||||||
StartPath : String;
|
StartPath : String;
|
||||||
LogFile : String;
|
LogFile : String;
|
||||||
|
@ -50,8 +49,6 @@ Function IsDupeMBase (FN: String) : Boolean;
|
||||||
Function IsDupeFBase (FN: String) : Boolean;
|
Function IsDupeFBase (FN: String) : Boolean;
|
||||||
Procedure AddMessageBase (Var MBase: RecMessageBase);
|
Procedure AddMessageBase (Var MBase: RecMessageBase);
|
||||||
Procedure AddFileBase (Var FBase: RecFileBase);
|
Procedure AddFileBase (Var FBase: RecFileBase);
|
||||||
Function ShellDOS (ExecPath: String; Command: String) : LongInt;
|
|
||||||
Procedure ExecuteArchive (FName: String; Temp: String; Mask: String; Mode: Byte);
|
|
||||||
Function GetMBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean;
|
Function GetMBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean;
|
||||||
Function GetMBaseByTag (Tag: String; Var TempBase: RecMessageBase) : Boolean;
|
Function GetMBaseByTag (Tag: String; Var TempBase: RecMessageBase) : Boolean;
|
||||||
Function GetMBaseByNetZone (Zone: Word; Var TempBase: RecMessageBase) : Boolean;
|
Function GetMBaseByNetZone (Zone: Word; Var TempBase: RecMessageBase) : Boolean;
|
||||||
|
@ -108,7 +105,7 @@ End;
|
||||||
|
|
||||||
Function GetUserBaseSize : Cardinal;
|
Function GetUserBaseSize : Cardinal;
|
||||||
Begin
|
Begin
|
||||||
Result := FileByteSize(bbsConfig.DataPath + 'users.dat');
|
Result := FileByteSize(bbsCfg.DataPath + 'users.dat');
|
||||||
|
|
||||||
If Result > 0 Then Result := Result DIV SizeOf(RecUser);
|
If Result > 0 Then Result := Result DIV SizeOf(RecUser);
|
||||||
End;
|
End;
|
||||||
|
@ -120,7 +117,7 @@ Var
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat');
|
Assign (MBaseFile, bbsCfg.DataPath + 'mbases.dat');
|
||||||
{$I-} Reset (MBaseFile); {$I+}
|
{$I-} Reset (MBaseFile); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then Exit;
|
If IoResult <> 0 Then Exit;
|
||||||
|
@ -144,7 +141,7 @@ Var
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Assign (FBaseFile, bbsConfig.DataPath + 'fbases.dat');
|
Assign (FBaseFile, bbsCfg.DataPath + 'fbases.dat');
|
||||||
{$I-} Reset (FBaseFile); {$I+}
|
{$I-} Reset (FBaseFile); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then Exit;
|
If IoResult <> 0 Then Exit;
|
||||||
|
@ -166,7 +163,7 @@ Var
|
||||||
MBaseFile : File of RecMessageBase;
|
MBaseFile : File of RecMessageBase;
|
||||||
MBase : RecMessageBase;
|
MBase : RecMessageBase;
|
||||||
Begin
|
Begin
|
||||||
Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat');
|
Assign (MBaseFile, bbsCfg.DataPath + 'mbases.dat');
|
||||||
Reset (MBaseFile);
|
Reset (MBaseFile);
|
||||||
|
|
||||||
Result := FileSize(MBaseFile);
|
Result := FileSize(MBaseFile);
|
||||||
|
@ -188,7 +185,7 @@ Var
|
||||||
FBaseFile : File of RecFileBase;
|
FBaseFile : File of RecFileBase;
|
||||||
FBase : RecFileBase;
|
FBase : RecFileBase;
|
||||||
Begin
|
Begin
|
||||||
Assign (FBaseFile, bbsConfig.DataPath + 'fbases.dat');
|
Assign (FBaseFile, bbsCfg.DataPath + 'fbases.dat');
|
||||||
Reset (FBaseFile);
|
Reset (FBaseFile);
|
||||||
|
|
||||||
Result := FileSize(FBaseFile);
|
Result := FileSize(FBaseFile);
|
||||||
|
@ -209,7 +206,7 @@ Procedure AddMessageBase (Var MBase: RecMessageBase);
|
||||||
Var
|
Var
|
||||||
MBaseFile : File of RecMessageBase;
|
MBaseFile : File of RecMessageBase;
|
||||||
Begin
|
Begin
|
||||||
Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat');
|
Assign (MBaseFile, bbsCfg.DataPath + 'mbases.dat');
|
||||||
Reset (MBaseFile);
|
Reset (MBaseFile);
|
||||||
Seek (MBaseFile, FileSize(MBaseFile));
|
Seek (MBaseFile, FileSize(MBaseFile));
|
||||||
Write (MBaseFile, MBase);
|
Write (MBaseFile, MBase);
|
||||||
|
@ -220,106 +217,20 @@ Procedure AddFileBase (Var FBase: RecFileBase);
|
||||||
Var
|
Var
|
||||||
FBaseFile : File of RecFileBase;
|
FBaseFile : File of RecFileBase;
|
||||||
Begin
|
Begin
|
||||||
Assign (FBaseFile, bbsConfig.DataPath + 'fbases.dat');
|
Assign (FBaseFile, bbsCfg.DataPath + 'fbases.dat');
|
||||||
Reset (FBaseFile);
|
Reset (FBaseFile);
|
||||||
Seek (FBaseFile, FileSize(FBaseFile));
|
Seek (FBaseFile, FileSize(FBaseFile));
|
||||||
Write (FBaseFile, FBase);
|
Write (FBaseFile, FBase);
|
||||||
Close (FBaseFile);
|
Close (FBaseFile);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function ShellDOS (ExecPath: String; Command: String) : LongInt;
|
|
||||||
Var
|
|
||||||
Image : TConsoleImageRec;
|
|
||||||
Begin
|
|
||||||
Console.GetScreenImage(1, 1, 80, 25, Image);
|
|
||||||
|
|
||||||
If ExecPath <> '' Then DirChange(ExecPath);
|
|
||||||
|
|
||||||
{$IFDEF UNIX}
|
|
||||||
Result := Shell(Command);
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
{$IFDEF WINDOWS}
|
|
||||||
If Command <> '' Then Command := '/C' + Command;
|
|
||||||
|
|
||||||
Exec (GetEnv('COMSPEC'), Command);
|
|
||||||
|
|
||||||
Result := DosExitCode;
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
DirChange(StartPath);
|
|
||||||
|
|
||||||
Console.PutScreenImage(Image);
|
|
||||||
End;
|
|
||||||
|
|
||||||
Procedure ExecuteArchive (FName: String; Temp: String; Mask: String; Mode: Byte);
|
|
||||||
Var
|
|
||||||
ArcFile : File of RecArchive;
|
|
||||||
Arc : RecArchive;
|
|
||||||
Count : LongInt;
|
|
||||||
Str : String;
|
|
||||||
Begin
|
|
||||||
If Temp <> '' Then
|
|
||||||
Temp := strUpper(Temp)
|
|
||||||
Else
|
|
||||||
Temp := strUpper(JustFileExt(FName));
|
|
||||||
|
|
||||||
Assign (ArcFile, bbsConfig.DataPath + 'archive.dat');
|
|
||||||
{$I-} Reset (ArcFile); {$I+}
|
|
||||||
|
|
||||||
If IoResult <> 0 Then Exit;
|
|
||||||
|
|
||||||
Repeat
|
|
||||||
If Eof(ArcFile) Then Begin
|
|
||||||
Close (ArcFile);
|
|
||||||
|
|
||||||
Exit;
|
|
||||||
End;
|
|
||||||
|
|
||||||
Read (ArcFile, Arc);
|
|
||||||
|
|
||||||
If (Not Arc.Active) or ((Arc.OSType <> OSType) and (Arc.OSType <> 3)) Then Continue;
|
|
||||||
|
|
||||||
If strUpper(Arc.Ext) = Temp Then Break;
|
|
||||||
Until False;
|
|
||||||
|
|
||||||
Close (ArcFile);
|
|
||||||
|
|
||||||
Case Mode of
|
|
||||||
1 : Str := Arc.Pack;
|
|
||||||
2 : Str := Arc.Unpack;
|
|
||||||
End;
|
|
||||||
|
|
||||||
If Str = '' Then Exit;
|
|
||||||
|
|
||||||
Temp := '';
|
|
||||||
Count := 1;
|
|
||||||
|
|
||||||
While Count <= Length(Str) Do Begin
|
|
||||||
If Str[Count] = '%' Then Begin
|
|
||||||
Inc (Count);
|
|
||||||
|
|
||||||
If Str[Count] = '1' Then Temp := Temp + FName Else
|
|
||||||
If Str[Count] = '2' Then Temp := Temp + Mask Else
|
|
||||||
If Str[Count] = '3' Then Temp := Temp + TempPath;
|
|
||||||
End Else
|
|
||||||
Temp := Temp + Str[Count];
|
|
||||||
|
|
||||||
Inc (Count);
|
|
||||||
End;
|
|
||||||
|
|
||||||
Log (3, '!', 'Arc Result (' + strI2S(ShellDOS('', Temp)) + ') ' + Temp);
|
|
||||||
|
|
||||||
// ShellDOS ('', Temp);
|
|
||||||
End;
|
|
||||||
|
|
||||||
Function GetMBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean;
|
Function GetMBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean;
|
||||||
Var
|
Var
|
||||||
F : File;
|
F : File;
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Assign (F, bbsConfig.DataPath + 'mbases.dat');
|
Assign (F, bbsCfg.DataPath + 'mbases.dat');
|
||||||
|
|
||||||
If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit;
|
If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit;
|
||||||
|
|
||||||
|
@ -341,7 +252,7 @@ Var
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Assign (F, bbsConfig.DataPath + 'mbases.dat');
|
Assign (F, bbsCfg.DataPath + 'mbases.dat');
|
||||||
|
|
||||||
If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit;
|
If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit;
|
||||||
|
|
||||||
|
@ -366,7 +277,7 @@ Var
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Assign (F, bbsConfig.DataPath + 'mbases.dat');
|
Assign (F, bbsCfg.DataPath + 'mbases.dat');
|
||||||
|
|
||||||
If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit;
|
If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit;
|
||||||
|
|
||||||
|
@ -377,7 +288,7 @@ Begin
|
||||||
One := TempBase;
|
One := TempBase;
|
||||||
GotOne := True;
|
GotOne := True;
|
||||||
|
|
||||||
If Zone = bbsConfig.NetAddress[TempBase.NetAddr].Zone Then Begin
|
If Zone = bbsCfg.NetAddress[TempBase.NetAddr].Zone Then Begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
|
||||||
Break;
|
Break;
|
||||||
|
@ -434,19 +345,19 @@ Begin
|
||||||
If mArea.NetType > 0 Then Begin
|
If mArea.NetType > 0 Then Begin
|
||||||
If mArea.NetType = 2 Then Begin
|
If mArea.NetType = 2 Then Begin
|
||||||
Msg^.SetMailType (mmtNetMail);
|
Msg^.SetMailType (mmtNetMail);
|
||||||
Msg^.SetCrash (bbsConfig.netCrash);
|
Msg^.SetCrash (bbsCfg.netCrash);
|
||||||
Msg^.SetHold (bbsConfig.netHold);
|
Msg^.SetHold (bbsCfg.netHold);
|
||||||
Msg^.SetKillSent (bbsConfig.netKillSent);
|
Msg^.SetKillSent (bbsCfg.netKillSent);
|
||||||
Msg^.SetDest (mAddr);
|
Msg^.SetDest (mAddr);
|
||||||
End Else
|
End Else
|
||||||
Msg^.SetMailType (mmtEchoMail);
|
Msg^.SetMailType (mmtEchoMail);
|
||||||
|
|
||||||
Msg^.SetOrig(bbsConfig.NetAddress[mArea.NetAddr]);
|
Msg^.SetOrig(bbsCfg.NetAddress[mArea.NetAddr]);
|
||||||
|
|
||||||
Case mArea.NetType of
|
Case mArea.NetType of
|
||||||
1 : Assign (SemFile, bbsConfig.SemaPath + fn_SemFileEcho);
|
1 : Assign (SemFile, bbsCfg.SemaPath + fn_SemFileEcho);
|
||||||
2 : Assign (SemFile, bbsConfig.SemaPath + fn_SemFileNews);
|
2 : Assign (SemFile, bbsCfg.SemaPath + fn_SemFileNews);
|
||||||
3 : Assign (SemFile, bbsConfig.SemaPath + fn_SemFileNet);
|
3 : Assign (SemFile, bbsCfg.SemaPath + fn_SemFileNet);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
ReWrite (SemFile);
|
ReWrite (SemFile);
|
||||||
|
@ -466,7 +377,7 @@ Begin
|
||||||
|
|
||||||
If mArea.NetType > 0 Then Begin
|
If mArea.NetType > 0 Then Begin
|
||||||
Msg^.DoStringLn (#13 + '--- ' + mysSoftwareID + ' BBS v' + mysVersion + ' (' + OSID + ')');
|
Msg^.DoStringLn (#13 + '--- ' + mysSoftwareID + ' BBS v' + mysVersion + ' (' + OSID + ')');
|
||||||
Msg^.DoStringLn (' * Origin: ' + mArea.Origin + ' (' + strAddr2Str(bbsConfig.NetAddress[mArea.NetAddr]) + ')');
|
Msg^.DoStringLn (' * Origin: ' + mArea.Origin + ' (' + strAddr2Str(bbsCfg.NetAddress[mArea.NetAddr]) + ')');
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Msg^.WriteMsg;
|
Msg^.WriteMsg;
|
||||||
|
@ -515,9 +426,9 @@ Var
|
||||||
Count : Byte;
|
Count : Byte;
|
||||||
Begin
|
Begin
|
||||||
For Count := 1 to 30 Do
|
For Count := 1 to 30 Do
|
||||||
If (strUpper(EchoNode.Domain) = strUpper(bbsConfig.NetDomain[Count])) and
|
If (strUpper(EchoNode.Domain) = strUpper(bbsCfg.NetDomain[Count])) and
|
||||||
(EchoNode.Address.Zone = bbsConfig.NetAddress[Count].Zone) and
|
(EchoNode.Address.Zone = bbsCfg.NetAddress[Count].Zone) and
|
||||||
(bbsConfig.NetPrimary[Count]) Then Begin
|
(bbsCfg.NetPrimary[Count]) Then Begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
|
||||||
Exit;
|
Exit;
|
||||||
|
@ -529,9 +440,9 @@ End;
|
||||||
Function GetFTNOutPath (EchoNode: RecEchoMailNode) : String;
|
Function GetFTNOutPath (EchoNode: RecEchoMailNode) : String;
|
||||||
Begin;
|
Begin;
|
||||||
If IsFTNPrimary(EchoNode) Then
|
If IsFTNPrimary(EchoNode) Then
|
||||||
Result := bbsConfig.OutboundPath
|
Result := bbsCfg.OutboundPath
|
||||||
Else
|
Else
|
||||||
Result := DirLast(bbsConfig.OutboundPath) + strLower(EchoNode.Domain + '.' + strPadL(strI2H(EchoNode.Address.Zone, 3), 3, '0')) + PathChar;
|
Result := DirLast(bbsCfg.OutboundPath) + strLower(EchoNode.Domain + '.' + strPadL(strI2H(EchoNode.Address.Zone, 3), 3, '0')) + PathChar;
|
||||||
|
|
||||||
If EchoNode.Address.Point <> 0 Then
|
If EchoNode.Address.Point <> 0 Then
|
||||||
Result := Result + strI2H((EchoNode.Address.Net SHL 16) OR EchoNode.Address.Node, 8) + '.pnt' + PathChar;
|
Result := Result + strI2H((EchoNode.Address.Net SHL 16) OR EchoNode.Address.Node, 8) + '.pnt' + PathChar;
|
||||||
|
@ -543,7 +454,7 @@ Var
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Assign (F, bbsConfig.DataPath + 'echonode.dat');
|
Assign (F, bbsCfg.DataPath + 'echonode.dat');
|
||||||
|
|
||||||
If Not ioReset(F, SizeOf(RecEchoMailNode), fmRWDN) Then Exit;
|
If Not ioReset(F, SizeOf(RecEchoMailNode), fmRWDN) Then Exit;
|
||||||
|
|
||||||
|
@ -658,7 +569,7 @@ Var
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Assign (F, bbsConfig.DataPath + 'echonode.dat');
|
Assign (F, bbsCfg.DataPath + 'echonode.dat');
|
||||||
|
|
||||||
If Not ioReset(F, SizeOf(RecEchoMailNode), fmRWDN) Then Exit;
|
If Not ioReset(F, SizeOf(RecEchoMailNode), fmRWDN) Then Exit;
|
||||||
|
|
||||||
|
@ -682,9 +593,9 @@ Begin
|
||||||
// this? research it someday
|
// this? research it someday
|
||||||
|
|
||||||
For Count := 1 to 30 Do Begin
|
For Count := 1 to 30 Do Begin
|
||||||
Result := (bbsConfig.NetAddress[Count].Zone = Zone) And
|
Result := (bbsCfg.NetAddress[Count].Zone = Zone) And
|
||||||
(bbsConfig.NetAddress[Count].Net = Net) And
|
(bbsCfg.NetAddress[Count].Net = Net) And
|
||||||
(bbsConfig.NetAddress[Count].Node = Node);
|
(bbsCfg.NetAddress[Count].Node = Node);
|
||||||
|
|
||||||
If Result Then Break;
|
If Result Then Break;
|
||||||
End;
|
End;
|
||||||
|
|
|
@ -10,6 +10,7 @@ Uses
|
||||||
m_Strings,
|
m_Strings,
|
||||||
m_DateTime,
|
m_DateTime,
|
||||||
BBS_Records,
|
BBS_Records,
|
||||||
|
BBS_DataBase,
|
||||||
mUtil_Common;
|
mUtil_Common;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
|
@ -132,7 +133,7 @@ Begin
|
||||||
|
|
||||||
GetMem (DupeData, MaxDupes * SizeOf(RecMsgDupe));
|
GetMem (DupeData, MaxDupes * SizeOf(RecMsgDupe));
|
||||||
|
|
||||||
Assign (F, bbsConfig.DataPath + 'echodupes.dat');
|
Assign (F, bbsCfg.DataPath + 'echodupes.dat');
|
||||||
{$I-} Reset (F, 1); {$I+}
|
{$I-} Reset (F, 1); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then ReWrite (F, 1);
|
If IoResult <> 0 Then ReWrite (F, 1);
|
||||||
|
@ -179,7 +180,7 @@ Destructor TPKTDupe.Destroy;
|
||||||
Var
|
Var
|
||||||
F : File;
|
F : File;
|
||||||
Begin
|
Begin
|
||||||
Assign (F, bbsConfig.DataPath + 'echodupes.dat');
|
Assign (F, bbsCfg.DataPath + 'echodupes.dat');
|
||||||
ReWrite (F, 1);
|
ReWrite (F, 1);
|
||||||
BlockWrite (F, DupeData^, TotalDupes * SizeOf(RecMsgDupe));
|
BlockWrite (F, DupeData^, TotalDupes * SizeOf(RecMsgDupe));
|
||||||
Close (F);
|
Close (F);
|
||||||
|
|
|
@ -10,7 +10,6 @@ Implementation
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
DOS,
|
DOS,
|
||||||
MKCRAP,
|
|
||||||
m_Strings,
|
m_Strings,
|
||||||
m_FileIO,
|
m_FileIO,
|
||||||
m_DateTime,
|
m_DateTime,
|
||||||
|
@ -18,6 +17,7 @@ Uses
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
mUtil_EchoCore,
|
mUtil_EchoCore,
|
||||||
BBS_Records,
|
BBS_Records,
|
||||||
|
BBS_DataBase,
|
||||||
BBS_MsgBase_ABS,
|
BBS_MsgBase_ABS,
|
||||||
BBS_MsgBase_JAM,
|
BBS_MsgBase_JAM,
|
||||||
BBS_MsgBase_Squish;
|
BBS_MsgBase_Squish;
|
||||||
|
@ -104,7 +104,7 @@ Begin
|
||||||
|
|
||||||
BundleName[Length(BundleName)] := '0';
|
BundleName[Length(BundleName)] := '0';
|
||||||
|
|
||||||
ExecuteArchive (BundleName, EchoNode.ArcType, TempPath + PKTName, 1);
|
ExecuteArchive (TempPath, BundleName, EchoNode.ArcType, TempPath + PKTName, 1);
|
||||||
FileErase (TempPath + PKTName);
|
FileErase (TempPath + PKTName);
|
||||||
AddToFLOQueue (FLOName, BundleName);
|
AddToFLOQueue (FLOName, BundleName);
|
||||||
End;
|
End;
|
||||||
|
@ -291,14 +291,14 @@ Begin
|
||||||
|
|
||||||
DirClean (TempPath, '');
|
DirClean (TempPath, '');
|
||||||
|
|
||||||
If Not DirExists(bbsConfig.OutboundPath) Then Begin
|
If Not DirExists(bbsCfg.OutboundPath) Then Begin
|
||||||
ProcessStatus ('Outbound directory does not exist', True);
|
ProcessStatus ('Outbound directory does not exist', True);
|
||||||
ProcessResult (rFATAL, True);
|
ProcessResult (rFATAL, True);
|
||||||
|
|
||||||
Exit;
|
Exit;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat');
|
Assign (MBaseFile, bbsCfg.DataPath + 'mbases.dat');
|
||||||
|
|
||||||
If ioReset(MBaseFile, SizeOf(RecMessageBase), fmRWDN) Then Begin
|
If ioReset(MBaseFile, SizeOf(RecMessageBase), fmRWDN) Then Begin
|
||||||
While Not Eof(MBaseFile) Do Begin
|
While Not Eof(MBaseFile) Do Begin
|
||||||
|
|
|
@ -33,7 +33,7 @@ Var
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Assign (F, bbsConfig.DataPath + 'echonode.dat');
|
Assign (F, bbsCfg.DataPath + 'echonode.dat');
|
||||||
|
|
||||||
If Not ioReset(F, SizeOf(RecEchoMailNode), fmRWDN) Then Exit;
|
If Not ioReset(F, SizeOf(RecEchoMailNode), fmRWDN) Then Exit;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Uses
|
||||||
m_Strings,
|
m_Strings,
|
||||||
AView,
|
AView,
|
||||||
BBS_Records,
|
BBS_Records,
|
||||||
|
BBS_DataBase,
|
||||||
BBS_MsgBase_ABS,
|
BBS_MsgBase_ABS,
|
||||||
BBS_MsgBase_JAM,
|
BBS_MsgBase_JAM,
|
||||||
BBS_MsgBase_Squish,
|
BBS_MsgBase_Squish,
|
||||||
|
@ -168,8 +169,8 @@ Var
|
||||||
|
|
||||||
If Not CreateBases Then Continue;
|
If Not CreateBases Then Continue;
|
||||||
|
|
||||||
If FileExist(bbsConfig.MsgsPath + PKT.MsgArea + '.sqd') or
|
If FileExist(bbsCfg.MsgsPath + PKT.MsgArea + '.sqd') or
|
||||||
FileExist(bbsConfig.MsgsPath + PKT.MsgArea + '.jhr') Then Continue;
|
FileExist(bbsCfg.MsgsPath + PKT.MsgArea + '.jhr') Then Continue;
|
||||||
|
|
||||||
FillChar (MBase, SizeOf(MBase), #0);
|
FillChar (MBase, SizeOf(MBase), #0);
|
||||||
|
|
||||||
|
@ -179,14 +180,14 @@ Var
|
||||||
MBase.NewsName := PKT.MsgArea;
|
MBase.NewsName := PKT.MsgArea;
|
||||||
MBase.FileName := PKT.MsgArea;
|
MBase.FileName := PKT.MsgArea;
|
||||||
MBase.EchoTag := PKT.MsgArea;
|
MBase.EchoTag := PKT.MsgArea;
|
||||||
MBase.Path := bbsConfig.MsgsPath;
|
MBase.Path := bbsCfg.MsgsPath;
|
||||||
MBase.NetType := 1;
|
MBase.NetType := 1;
|
||||||
MBase.ColQuote := bbsConfig.ColorQuote;
|
MBase.ColQuote := bbsCfg.ColorQuote;
|
||||||
MBase.ColText := bbsConfig.ColorText;
|
MBase.ColText := bbsCfg.ColorText;
|
||||||
MBase.ColTear := bbsConfig.ColorTear;
|
MBase.ColTear := bbsCfg.ColorTear;
|
||||||
MBase.ColOrigin := bbsConfig.ColorOrigin;
|
MBase.ColOrigin := bbsCfg.ColorOrigin;
|
||||||
MBase.ColKludge := bbsConfig.ColorKludge;
|
MBase.ColKludge := bbsCfg.ColorKludge;
|
||||||
MBase.Origin := bbsConfig.Origin;
|
MBase.Origin := bbsCfg.Origin;
|
||||||
MBase.BaseType := INI.ReadInteger(Header_ECHOIMPORT, 'base_type', 0);
|
MBase.BaseType := INI.ReadInteger(Header_ECHOIMPORT, 'base_type', 0);
|
||||||
MBase.ListACS := INI.ReadString (Header_ECHOIMPORT, 'acs_list', '');
|
MBase.ListACS := INI.ReadString (Header_ECHOIMPORT, 'acs_list', '');
|
||||||
MBase.ReadACS := INI.ReadString (Header_ECHOIMPORT, 'acs_read', '');
|
MBase.ReadACS := INI.ReadString (Header_ECHOIMPORT, 'acs_read', '');
|
||||||
|
@ -203,7 +204,7 @@ Var
|
||||||
MBase.NetAddr := 1;
|
MBase.NetAddr := 1;
|
||||||
|
|
||||||
For Count := 1 to 30 Do
|
For Count := 1 to 30 Do
|
||||||
If bbsConfig.NetAddress[Count].Zone = PKT.PKTHeader.DestZone Then Begin
|
If bbsCfg.NetAddress[Count].Zone = PKT.PKTHeader.DestZone Then Begin
|
||||||
MBase.NetAddr := Count;
|
MBase.NetAddr := Count;
|
||||||
Break;
|
Break;
|
||||||
End;
|
End;
|
||||||
|
@ -273,14 +274,14 @@ Var
|
||||||
Begin
|
Begin
|
||||||
PKTMatched := False;
|
PKTMatched := False;
|
||||||
|
|
||||||
Assign (NodeFile, bbsConfig.DataPath + 'echonode.dat');
|
Assign (NodeFile, bbsCfg.DataPath + 'echonode.dat');
|
||||||
|
|
||||||
If ioReset(NodeFile, Sizeof(RecEchoMailNode), fmRWDN) Then Begin
|
If ioReset(NodeFile, Sizeof(RecEchoMailNode), fmRWDN) Then Begin
|
||||||
While Not Eof(NodeFile) Do Begin
|
While Not Eof(NodeFile) Do Begin
|
||||||
Read (NodeFile, EchoNode);
|
Read (NodeFile, EchoNode);
|
||||||
|
|
||||||
For Count := 1 to 30 Do Begin
|
For Count := 1 to 30 Do Begin
|
||||||
If strUpper(JustFileName(PktBundle)) = strUpper(GetFTNArchiveName(EchoNode.Address, bbsConfig.NetAddress[Count])) Then Begin
|
If strUpper(JustFileName(PktBundle)) = strUpper(GetFTNArchiveName(EchoNode.Address, bbsCfg.NetAddress[Count])) Then Begin
|
||||||
PKTMatched := True;
|
PKTMatched := True;
|
||||||
ArcType := EchoNode.ArcType;
|
ArcType := EchoNode.ArcType;
|
||||||
|
|
||||||
|
@ -293,7 +294,7 @@ Var
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If Not PKTMatched Then Begin
|
If Not PKTMatched Then Begin
|
||||||
Case GetArchiveType(bbsConfig.InboundPath + PktBundle) of
|
Case GetArchiveType(bbsCfg.InboundPath + PktBundle) of
|
||||||
'A' : ArcType := 'ARJ';
|
'A' : ArcType := 'ARJ';
|
||||||
'R' : ArcType := 'RAR';
|
'R' : ArcType := 'RAR';
|
||||||
'Z' : ArcType := 'ZIP';
|
'Z' : ArcType := 'ZIP';
|
||||||
|
@ -309,7 +310,7 @@ Var
|
||||||
|
|
||||||
ProcessStatus ('Extracting ' + PktBundle, False);
|
ProcessStatus ('Extracting ' + PktBundle, False);
|
||||||
|
|
||||||
ExecuteArchive (bbsConfig.InboundPath + PktBundle, ArcType, '*', 2);
|
ExecuteArchive (TempPath, bbsCfg.InboundPath + PktBundle, ArcType, '*', 2);
|
||||||
|
|
||||||
FindFirst (TempPath + '*', AnyFile, DirInfo);
|
FindFirst (TempPath + '*', AnyFile, DirInfo);
|
||||||
|
|
||||||
|
@ -330,7 +331,7 @@ Var
|
||||||
If Not PKTFound Then
|
If Not PKTFound Then
|
||||||
Log (2, '!', ' Unable to extract bundle; skipping')
|
Log (2, '!', ' Unable to extract bundle; skipping')
|
||||||
Else
|
Else
|
||||||
FileErase (bbsConfig.InboundPath + PktBundle);
|
FileErase (bbsCfg.InboundPath + PktBundle);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
|
@ -347,7 +348,7 @@ Begin
|
||||||
|
|
||||||
DirClean (TempPath, '');
|
DirClean (TempPath, '');
|
||||||
|
|
||||||
If Not DirExists(bbsConfig.InboundPath) Then Begin
|
If Not DirExists(bbsCfg.InboundPath) Then Begin
|
||||||
ProcessStatus ('Inbound directory does not exist', True);
|
ProcessStatus ('Inbound directory does not exist', True);
|
||||||
ProcessResult (rFATAL, True);
|
ProcessResult (rFATAL, True);
|
||||||
|
|
||||||
|
@ -385,14 +386,14 @@ Begin
|
||||||
If Not GetMBaseByIndex (DupeIndex, DupeMBase) Then
|
If Not GetMBaseByIndex (DupeIndex, DupeMBase) Then
|
||||||
DupeIndex := -1;
|
DupeIndex := -1;
|
||||||
|
|
||||||
FindFirst (bbsConfig.InboundPath + '*', AnyFile, DirInfo);
|
FindFirst (bbsCfg.InboundPath + '*', AnyFile, DirInfo);
|
||||||
|
|
||||||
While DosError = 0 Do Begin
|
While DosError = 0 Do Begin
|
||||||
If DirInfo.Attr And Directory = 0 Then Begin
|
If DirInfo.Attr And Directory = 0 Then Begin
|
||||||
FileExt := Copy(strUpper(JustFileExt(DirInfo.Name)), 1, 2);
|
FileExt := Copy(strUpper(JustFileExt(DirInfo.Name)), 1, 2);
|
||||||
|
|
||||||
If FileExt = 'PK' Then
|
If FileExt = 'PK' Then
|
||||||
ImportPacketFile(bbsConfig.InboundPath + DirInfo.Name)
|
ImportPacketFile(bbsCfg.InboundPath + DirInfo.Name)
|
||||||
Else
|
Else
|
||||||
If (FileExt = 'SU') or
|
If (FileExt = 'SU') or
|
||||||
(FileExt = 'MO') or
|
(FileExt = 'MO') or
|
||||||
|
|
|
@ -14,7 +14,8 @@ Uses
|
||||||
m_DateTime,
|
m_DateTime,
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
BBS_Records;
|
BBS_Records,
|
||||||
|
BBS_DataBase;
|
||||||
|
|
||||||
Procedure uImportFilesBBS;
|
Procedure uImportFilesBBS;
|
||||||
Var
|
Var
|
||||||
|
@ -43,9 +44,9 @@ Var
|
||||||
Var
|
Var
|
||||||
Count : Byte;
|
Count : Byte;
|
||||||
Begin
|
Begin
|
||||||
Assign (DescFile, bbsConfig.DataPath + Base.FileName + '.des');
|
Assign (DescFile, bbsCfg.DataPath + Base.FileName + '.des');
|
||||||
|
|
||||||
If FileExist(bbsConfig.DataPath + Base.FileName + '.des') Then
|
If FileExist(bbsCfg.DataPath + Base.FileName + '.des') Then
|
||||||
Reset (DescFile, 1)
|
Reset (DescFile, 1)
|
||||||
Else
|
Else
|
||||||
ReWrite (DescFile, 1);
|
ReWrite (DescFile, 1);
|
||||||
|
@ -70,7 +71,7 @@ Var
|
||||||
|
|
||||||
If FSize = -1 Then Exit;
|
If FSize = -1 Then Exit;
|
||||||
|
|
||||||
Assign (ListFile, bbsConfig.DataPath + Base.FileName + '.dir');
|
Assign (ListFile, bbsCfg.DataPath + Base.FileName + '.dir');
|
||||||
{$I-} Reset(ListFile); {$I+}
|
{$I-} Reset(ListFile); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then ReWrite(ListFile);
|
If IoResult <> 0 Then ReWrite(ListFile);
|
||||||
|
@ -127,7 +128,7 @@ Begin
|
||||||
|
|
||||||
If DescChar = '' Then DescChar := ' ';
|
If DescChar = '' Then DescChar := ' ';
|
||||||
|
|
||||||
Assign (BaseFile, bbsConfig.DataPath + 'fbases.dat');
|
Assign (BaseFile, bbsCfg.DataPath + 'fbases.dat');
|
||||||
{$I-} Reset (BaseFile); {$I+}
|
{$I-} Reset (BaseFile); {$I+}
|
||||||
|
|
||||||
If IoResult = 0 Then Begin
|
If IoResult = 0 Then Begin
|
||||||
|
@ -157,7 +158,7 @@ Begin
|
||||||
DescLines := 1;
|
DescLines := 1;
|
||||||
Desc[1] := strStripB(Copy(OneLine, strWordPos(2, OneLine, ' '), 255), ' ');
|
Desc[1] := strStripB(Copy(OneLine, strWordPos(2, OneLine, ' '), 255), ' ');
|
||||||
End Else Begin
|
End Else Begin
|
||||||
If DescLines < bbsConfig.MaxFileDesc Then Begin
|
If DescLines < bbsCfg.MaxFileDesc Then Begin
|
||||||
Inc (DescLines);
|
Inc (DescLines);
|
||||||
Desc[DescLines] := strStripB(Copy(OneLine, DescPos, 255), ' ');
|
Desc[DescLines] := strStripB(Copy(OneLine, DescPos, 255), ' ');
|
||||||
End;
|
End;
|
||||||
|
|
|
@ -14,7 +14,8 @@ Uses
|
||||||
m_Strings,
|
m_Strings,
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
BBS_Records;
|
BBS_Records,
|
||||||
|
BBS_DataBase;
|
||||||
|
|
||||||
Procedure uImportMessageBases;
|
Procedure uImportMessageBases;
|
||||||
Var
|
Var
|
||||||
|
@ -28,7 +29,7 @@ Begin
|
||||||
ProcessName ('Import Message Bases', True);
|
ProcessName ('Import Message Bases', True);
|
||||||
ProcessResult (rWORKING, False);
|
ProcessResult (rWORKING, False);
|
||||||
|
|
||||||
FindFirst (bbsConfig.MsgsPath + '*', AnyFile, Info);
|
FindFirst (bbsCfg.MsgsPath + '*', AnyFile, Info);
|
||||||
|
|
||||||
While DosError = 0 Do Begin
|
While DosError = 0 Do Begin
|
||||||
BaseName := JustFileName(Info.Name);
|
BaseName := JustFileName(Info.Name);
|
||||||
|
@ -46,14 +47,14 @@ Begin
|
||||||
MBase.NewsName := strReplace(BaseName, ' ', '.');
|
MBase.NewsName := strReplace(BaseName, ' ', '.');
|
||||||
MBase.EchoTag := BaseName;
|
MBase.EchoTag := BaseName;
|
||||||
MBase.FileName := BaseName;
|
MBase.FileName := BaseName;
|
||||||
MBase.Path := bbsConfig.MsgsPath;
|
MBase.Path := bbsCfg.MsgsPath;
|
||||||
MBase.NetType := INI.ReadInteger(Header_IMPORTMB, 'net_type', 0);
|
MBase.NetType := INI.ReadInteger(Header_IMPORTMB, 'net_type', 0);
|
||||||
MBase.ColQuote := bbsConfig.ColorQuote;
|
MBase.ColQuote := bbsCfg.ColorQuote;
|
||||||
MBase.ColText := bbsConfig.ColorText;
|
MBase.ColText := bbsCfg.ColorText;
|
||||||
MBase.ColTear := bbsConfig.ColorTear;
|
MBase.ColTear := bbsCfg.ColorTear;
|
||||||
MBase.ColOrigin := bbsConfig.ColorOrigin;
|
MBase.ColOrigin := bbsCfg.ColorOrigin;
|
||||||
MBase.ColKludge := bbsConfig.ColorKludge;
|
MBase.ColKludge := bbsCfg.ColorKludge;
|
||||||
MBase.Origin := bbsConfig.Origin;
|
MBase.Origin := bbsCfg.Origin;
|
||||||
MBase.BaseType := Ord(BaseExt = 'SQD');
|
MBase.BaseType := Ord(BaseExt = 'SQD');
|
||||||
MBase.ListACS := INI.ReadString(Header_IMPORTMB, 'acs_list', '');
|
MBase.ListACS := INI.ReadString(Header_IMPORTMB, 'acs_list', '');
|
||||||
MBase.ReadACS := INI.ReadString(Header_IMPORTMB, 'acs_read', '');
|
MBase.ReadACS := INI.ReadString(Header_IMPORTMB, 'acs_read', '');
|
||||||
|
@ -70,7 +71,7 @@ Begin
|
||||||
MBase.NetAddr := 1;
|
MBase.NetAddr := 1;
|
||||||
|
|
||||||
For Count := 1 to 30 Do
|
For Count := 1 to 30 Do
|
||||||
If strAddr2Str(bbsConfig.NetAddress[Count]) = INI.ReadString(Header_IMPORTNA, 'netaddress', '') Then Begin
|
If strAddr2Str(bbsCfg.NetAddress[Count]) = INI.ReadString(Header_IMPORTNA, 'netaddress', '') Then Begin
|
||||||
MBase.NetAddr := Count;
|
MBase.NetAddr := Count;
|
||||||
|
|
||||||
Break;
|
Break;
|
||||||
|
|
|
@ -12,7 +12,8 @@ Uses
|
||||||
m_Strings,
|
m_Strings,
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
BBS_Records;
|
BBS_Records,
|
||||||
|
BBS_DataBase;
|
||||||
|
|
||||||
Procedure uImportNA;
|
Procedure uImportNA;
|
||||||
Var
|
Var
|
||||||
|
@ -62,14 +63,14 @@ Begin
|
||||||
MBase.NewsName := strReplace(BaseName, ' ', '.');
|
MBase.NewsName := strReplace(BaseName, ' ', '.');
|
||||||
MBase.EchoTag := TagName;
|
MBase.EchoTag := TagName;
|
||||||
MBase.FileName := TagName;
|
MBase.FileName := TagName;
|
||||||
MBase.Path := bbsConfig.MsgsPath;
|
MBase.Path := bbsCfg.MsgsPath;
|
||||||
MBase.NetType := 1;
|
MBase.NetType := 1;
|
||||||
MBase.ColQuote := bbsConfig.ColorQuote;
|
MBase.ColQuote := bbsCfg.ColorQuote;
|
||||||
MBase.ColText := bbsConfig.ColorText;
|
MBase.ColText := bbsCfg.ColorText;
|
||||||
MBase.ColTear := bbsConfig.ColorTear;
|
MBase.ColTear := bbsCfg.ColorTear;
|
||||||
MBase.ColOrigin := bbsConfig.ColorOrigin;
|
MBase.ColOrigin := bbsCfg.ColorOrigin;
|
||||||
MBase.ColKludge := bbsConfig.ColorKludge;
|
MBase.ColKludge := bbsCfg.ColorKludge;
|
||||||
MBase.Origin := bbsConfig.Origin;
|
MBase.Origin := bbsCfg.Origin;
|
||||||
MBase.BaseType := strS2I(INI.ReadString(Header_IMPORTNA, 'base_format', '0'));
|
MBase.BaseType := strS2I(INI.ReadString(Header_IMPORTNA, 'base_format', '0'));
|
||||||
MBase.ListACS := INI.ReadString(Header_IMPORTNA, 'acs_list', '');
|
MBase.ListACS := INI.ReadString(Header_IMPORTNA, 'acs_list', '');
|
||||||
MBase.ReadACS := INI.ReadString(Header_IMPORTNA, 'acs_read', '');
|
MBase.ReadACS := INI.ReadString(Header_IMPORTNA, 'acs_read', '');
|
||||||
|
@ -86,7 +87,7 @@ Begin
|
||||||
MBase.NetAddr := 1;
|
MBase.NetAddr := 1;
|
||||||
|
|
||||||
For Count := 1 to 30 Do
|
For Count := 1 to 30 Do
|
||||||
If strAddr2Str(bbsConfig.NetAddress[Count]) = INI.ReadString(Header_IMPORTNA, 'netaddress', '') Then Begin
|
If strAddr2Str(bbsCfg.NetAddress[Count]) = INI.ReadString(Header_IMPORTNA, 'netaddress', '') Then Begin
|
||||||
MBase.NetAddr := Count;
|
MBase.NetAddr := Count;
|
||||||
Break;
|
Break;
|
||||||
End;
|
End;
|
||||||
|
|
|
@ -13,6 +13,7 @@ Uses
|
||||||
m_FileIO,
|
m_FileIO,
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
|
BBS_DataBase,
|
||||||
bbs_MsgBase_ABS,
|
bbs_MsgBase_ABS,
|
||||||
bbs_MsgBase_JAM,
|
bbs_MsgBase_JAM,
|
||||||
bbs_MsgBase_Squish;
|
bbs_MsgBase_Squish;
|
||||||
|
@ -248,7 +249,7 @@ Begin
|
||||||
ProcessName ('Packing Message Bases', True);
|
ProcessName ('Packing Message Bases', True);
|
||||||
ProcessResult (rWORKING, False);
|
ProcessResult (rWORKING, False);
|
||||||
|
|
||||||
Assign (BaseFile, bbsConfig.DataPath + 'mbases.dat');
|
Assign (BaseFile, bbsCfg.DataPath + 'mbases.dat');
|
||||||
|
|
||||||
If ioReset (BaseFile, SizeOf(Base), fmRWDN) Then Begin
|
If ioReset (BaseFile, SizeOf(Base), fmRWDN) Then Begin
|
||||||
While Not Eof(BaseFile) Do Begin
|
While Not Eof(BaseFile) Do Begin
|
||||||
|
|
|
@ -14,6 +14,7 @@ Uses
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
bbs_Records,
|
bbs_Records,
|
||||||
|
BBS_DataBase,
|
||||||
bbs_MsgBase_ABS,
|
bbs_MsgBase_ABS,
|
||||||
bbs_MsgBase_JAM,
|
bbs_MsgBase_JAM,
|
||||||
bbs_MsgBase_Squish;
|
bbs_MsgBase_Squish;
|
||||||
|
@ -29,7 +30,7 @@ Begin
|
||||||
ProcessName ('Purging Message Bases', True);
|
ProcessName ('Purging Message Bases', True);
|
||||||
ProcessResult (rWORKING, False);
|
ProcessResult (rWORKING, False);
|
||||||
|
|
||||||
Assign (BaseFile, bbsConfig.DataPath + 'mbases.dat');
|
Assign (BaseFile, bbsCfg.DataPath + 'mbases.dat');
|
||||||
{$I-} Reset (BaseFile); {$I+}
|
{$I-} Reset (BaseFile); {$I+}
|
||||||
|
|
||||||
If IoResult = 0 Then Begin
|
If IoResult = 0 Then Begin
|
||||||
|
|
|
@ -26,7 +26,8 @@ Implementation
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
m_Strings,
|
m_Strings,
|
||||||
mutil_Common;
|
BBS_DataBase,
|
||||||
|
mUtil_Common;
|
||||||
|
|
||||||
Procedure ProcessName (Str: String; Start: Boolean);
|
Procedure ProcessName (Str: String; Start: Boolean);
|
||||||
Begin
|
Begin
|
||||||
|
|
|
@ -14,7 +14,8 @@ Uses
|
||||||
m_FileIO,
|
m_FileIO,
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
BBS_Records;
|
BBS_Records,
|
||||||
|
BBS_DataBase;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
TopListType = (TopCall, TopPost, TopDL, TopUL, TopPCR);
|
TopListType = (TopCall, TopPost, TopDL, TopUL, TopPCR);
|
||||||
|
@ -181,7 +182,7 @@ Begin
|
||||||
|
|
||||||
Sort := TQuickSort.Create;
|
Sort := TQuickSort.Create;
|
||||||
|
|
||||||
Assign (UserFile, bbsConfig.DataPath + 'users.dat');
|
Assign (UserFile, bbsCfg.DataPath + 'users.dat');
|
||||||
|
|
||||||
If ioReset(UserFile, SizeOf(RecUser), fmRWDN) Then Begin
|
If ioReset(UserFile, SizeOf(RecUser), fmRWDN) Then Begin
|
||||||
While Not EOF(UserFile) Do Begin
|
While Not EOF(UserFile) Do Begin
|
||||||
|
|
|
@ -13,7 +13,8 @@ Uses
|
||||||
m_DateTime,
|
m_DateTime,
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status,
|
mUtil_Status,
|
||||||
BBS_Records;
|
BBS_Records,
|
||||||
|
BBS_DataBase;
|
||||||
|
|
||||||
Procedure uMassUpload;
|
Procedure uMassUpload;
|
||||||
Var
|
Var
|
||||||
|
@ -68,7 +69,7 @@ Begin
|
||||||
|
|
||||||
// get the show on the road
|
// get the show on the road
|
||||||
|
|
||||||
Assign (BaseFile, bbsConfig.DataPath + 'fbases.dat');
|
Assign (BaseFile, bbsCfg.DataPath + 'fbases.dat');
|
||||||
{$I-} Reset (BaseFile); {$I+}
|
{$I-} Reset (BaseFile); {$I+}
|
||||||
|
|
||||||
If IoResult = 0 Then Begin
|
If IoResult = 0 Then Begin
|
||||||
|
@ -91,9 +92,9 @@ Begin
|
||||||
|
|
||||||
// should technically rename the file like Mystic does if > 70 chars
|
// should technically rename the file like Mystic does if > 70 chars
|
||||||
|
|
||||||
Assign (ListFile, bbsConfig.DataPath + Base.FileName + '.dir');
|
Assign (ListFile, bbsCfg.DataPath + Base.FileName + '.dir');
|
||||||
|
|
||||||
If FileExist(bbsConfig.DataPath + Base.FileName + '.dir') Then
|
If FileExist(bbsCfg.DataPath + Base.FileName + '.dir') Then
|
||||||
ioReset (ListFile, SizeOf(RecFileList), fmRWDN)
|
ioReset (ListFile, SizeOf(RecFileList), fmRWDN)
|
||||||
Else
|
Else
|
||||||
ReWrite (ListFile);
|
ReWrite (ListFile);
|
||||||
|
@ -135,7 +136,7 @@ Begin
|
||||||
|
|
||||||
If INI.ReadString(Header_UPLOAD, 'import_fileid', '1') = '1' Then Begin
|
If INI.ReadString(Header_UPLOAD, 'import_fileid', '1') = '1' Then Begin
|
||||||
|
|
||||||
ExecuteArchive (Base.Path + List.FileName, '', 'file_id.diz', 2);
|
ExecuteArchive (TempPath, Base.Path + List.FileName, '', 'file_id.diz', 2);
|
||||||
|
|
||||||
DizName := FileFind(TempPath + 'file_id.diz');
|
DizName := FileFind(TempPath + 'file_id.diz');
|
||||||
|
|
||||||
|
@ -153,7 +154,7 @@ Begin
|
||||||
|
|
||||||
If Length(Desc[List.DescLines]) > mysMaxFileDescLen Then Desc[List.DescLines][0] := Chr(mysMaxFileDescLen);
|
If Length(Desc[List.DescLines]) > mysMaxFileDescLen Then Desc[List.DescLines][0] := Chr(mysMaxFileDescLen);
|
||||||
|
|
||||||
If List.DescLines = bbsConfig.MaxFileDesc Then Break;
|
If List.DescLines = bbsCfg.MaxFileDesc Then Break;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Close (DizFile);
|
Close (DizFile);
|
||||||
|
@ -174,9 +175,9 @@ Begin
|
||||||
Desc[1] := INI.ReadString(Header_UPLOAD, 'no_description', 'No Description');
|
Desc[1] := INI.ReadString(Header_UPLOAD, 'no_description', 'No Description');
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Assign (DescFile, bbsConfig.DataPath + Base.FileName + '.des');
|
Assign (DescFile, bbsCfg.DataPath + Base.FileName + '.des');
|
||||||
|
|
||||||
If FileExist(bbsConfig.DataPath + Base.FileName + '.des') Then
|
If FileExist(bbsCfg.DataPath + Base.FileName + '.des') Then
|
||||||
Reset (DescFile, 1)
|
Reset (DescFile, 1)
|
||||||
Else
|
Else
|
||||||
ReWrite (DescFile, 1);
|
ReWrite (DescFile, 1);
|
||||||
|
|
Loading…
Reference in New Issue