Logging added
This commit is contained in:
parent
f1187f30eb
commit
ecaa0883d2
|
@ -4795,14 +4795,16 @@
|
||||||
comments (and was created on an Amiga?)
|
comments (and was created on an Amiga?)
|
||||||
|
|
||||||
+ CTRL-Z and [ESCAPE] now both bring up the full screen editor prompt to
|
+ CTRL-Z and [ESCAPE] now both bring up the full screen editor prompt to
|
||||||
save, etc.
|
save, etc. I did a lot of research with old softwares and editors, and
|
||||||
|
found this approach to be the common ground between everything ever. :)
|
||||||
|
|
||||||
+ Revampped message quoting a little bit. Quoted text will now be auto
|
+ Revampped message quoting a little bit. Quoted text will now be auto
|
||||||
reformatted if adding the initials would cut off text in the original
|
reformatted if adding the initials would cut off text in the original
|
||||||
message EXCEPT when quoting quoted text.
|
message EXCEPT when quoting quoted text.
|
||||||
|
|
||||||
Quote initials will always be 2 characters now. If the User handle has a
|
Quote initials will always be 2 characters now. In an effort to better
|
||||||
single word handle, Mystic will use the first two letters of their name.
|
"standardize" quoting: If the User handle has a single word handle, Mystic
|
||||||
|
will now use the first two letters of their name instead of one.
|
||||||
|
|
||||||
! Fixed a bug that could corrupt a message and/or crash when editing a
|
! Fixed a bug that could corrupt a message and/or crash when editing a
|
||||||
message with a lot of lines.
|
message with a lot of lines.
|
||||||
|
@ -4822,15 +4824,15 @@
|
||||||
End
|
End
|
||||||
|
|
||||||
+ The GE menu command (edit user settings) option 14 (select theme) can now
|
+ The GE menu command (edit user settings) option 14 (select theme) can now
|
||||||
have a section option which specifies the base filename of a theme. For
|
have an option which specifies the base filename of a theme. For example
|
||||||
example, if the theme filename is "english" you can do:
|
if the theme filename is "english" you can do:
|
||||||
|
|
||||||
Menu command: GE
|
Menu command: GE
|
||||||
Data: 14 english
|
Data: 14 english
|
||||||
|
|
||||||
This will cause the theme to be selected automatically, without prompting
|
This will cause the theme to be selected automatically, without prompting
|
||||||
the user for anything. If a second parameter is not supplied, the user
|
the user for anything. If a second parameter is not supplied, the user
|
||||||
will be prompted to select a theme.
|
will be prompted to select a theme as usual.
|
||||||
|
|
||||||
+ Copy/Paste is now added/fixed for menu commands and menu execution lists
|
+ Copy/Paste is now added/fixed for menu commands and menu execution lists
|
||||||
in the new menu editor.
|
in the new menu editor.
|
||||||
|
@ -4850,3 +4852,37 @@
|
||||||
|
|
||||||
[General]
|
[General]
|
||||||
autosnoop=1
|
autosnoop=1
|
||||||
|
|
||||||
|
+ Renamed the default mutil.cfg to mutil.ini since it is indeed an INI
|
||||||
|
format file. This is just in case someone has .ini files associated with
|
||||||
|
an editor on their OS. EXISTING USERS WILL NEED TO RENAME MUTIL.CFG TO
|
||||||
|
MUTIL.INI unless you are supplying the filename on the command line.
|
||||||
|
|
||||||
|
+ Added logging into MUTIL. Add the following crap below into the
|
||||||
|
[GENERAL] section of your configutation files if you want to use it. If
|
||||||
|
you would like some things logged that are not please let me know, and
|
||||||
|
vice versa. Anyway, from the new default mutil.ini:
|
||||||
|
|
||||||
|
; Logging option. If no directory is specified in the logfile
|
||||||
|
; name, mUtil will attempt to use the configured LOGS directory from
|
||||||
|
; in Mystic's configuration. To disable logging, leave the logfile
|
||||||
|
; option commented out or set to a blank value.
|
||||||
|
|
||||||
|
logfile=mutil.log
|
||||||
|
|
||||||
|
; Level 1 = basic process logging
|
||||||
|
; Level 2 = verbose
|
||||||
|
|
||||||
|
loglevel=1
|
||||||
|
|
||||||
|
An example of loglevel=1 logging for mUtil configured for a single
|
||||||
|
process (mass upload) follows. I haven't tested the logging with all
|
||||||
|
processes to get them where I want them, so please give feedback if you
|
||||||
|
have something to suggest! :)
|
||||||
|
|
||||||
|
+ 09/24/12 23:11 Startup using mutil.ini
|
||||||
|
+ 09/24/12 23:11 Process: Mass Upload Files
|
||||||
|
+ 09/24/12 23:11 Add: mbbs_104.zip To: New File Base
|
||||||
|
+ 09/24/12 23:11 Add: SPOT1_3B.LHA To: New File Base
|
||||||
|
+ 09/24/12 23:11 Result: Uploaded 2 file(s)
|
||||||
|
+ 09/24/12 23:11 Shutdown
|
||||||
|
|
|
@ -63,11 +63,17 @@ Begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
|
||||||
Inc (ProcessTotal);
|
Inc (ProcessTotal);
|
||||||
End;
|
|
||||||
|
Log (2, '+', ' EXEC ' + pName);
|
||||||
|
End Else
|
||||||
|
Log (2, '+', ' SKIP ' + pName);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure ApplicationShutdown;
|
Procedure ApplicationShutdown;
|
||||||
Begin
|
Begin
|
||||||
|
Log (1, '+', 'Shutdown');
|
||||||
|
Log (1, '+', '');
|
||||||
|
|
||||||
If Assigned(Console) Then Begin
|
If Assigned(Console) Then Begin
|
||||||
Console.SetWindow (1, 1, 80, 25, False);
|
Console.SetWindow (1, 1, 80, 25, False);
|
||||||
Console.CursorXY (3, 22);
|
Console.CursorXY (3, 22);
|
||||||
|
@ -98,11 +104,11 @@ Begin
|
||||||
If FileExist(ParamStr(1)) Then
|
If FileExist(ParamStr(1)) Then
|
||||||
FN := ParamStr(1)
|
FN := ParamStr(1)
|
||||||
Else
|
Else
|
||||||
If FileExist('mutil.cfg') Then
|
If FileExist('mutil.ini') Then
|
||||||
FN := 'mutil.cfg'
|
FN := 'mutil.ini'
|
||||||
Else Begin
|
Else Begin
|
||||||
ProcessName ('Load configuration', False);
|
ProcessName ('Load configuration', False);
|
||||||
ProcessStatus ('Missing file');
|
ProcessStatus ('Missing file', True);
|
||||||
ProcessResult (rFATAL, False);
|
ProcessResult (rFATAL, False);
|
||||||
|
|
||||||
Halt(1);
|
Halt(1);
|
||||||
|
@ -118,7 +124,7 @@ Begin
|
||||||
|
|
||||||
If IoResult <> 0 Then Begin
|
If IoResult <> 0 Then Begin
|
||||||
ProcessName ('Load configuration', False);
|
ProcessName ('Load configuration', False);
|
||||||
ProcessStatus ('Missing MYSTIC.DAT');
|
ProcessStatus ('Missing MYSTIC.DAT', True);
|
||||||
ProcessResult (rFATAL, False);
|
ProcessResult (rFATAL, False);
|
||||||
|
|
||||||
Halt(1);
|
Halt(1);
|
||||||
|
@ -129,7 +135,7 @@ Begin
|
||||||
|
|
||||||
If bbsConfig.DataChanged <> mysDataChanged Then Begin
|
If bbsConfig.DataChanged <> mysDataChanged Then Begin
|
||||||
ProcessName ('Load configuration', False);
|
ProcessName ('Load configuration', False);
|
||||||
ProcessStatus ('Version mismatch');
|
ProcessStatus ('Version mismatch', True);
|
||||||
ProcessResult (rFATAL, False);
|
ProcessResult (rFATAL, False);
|
||||||
|
|
||||||
Halt(1);
|
Halt(1);
|
||||||
|
@ -147,6 +153,13 @@ Begin
|
||||||
|
|
||||||
DirClean (TempPath, '');
|
DirClean (TempPath, '');
|
||||||
|
|
||||||
|
LogFile := INI.ReadString(Header_GENERAL, 'logfile', '');
|
||||||
|
|
||||||
|
If (LogFile <> '') and (Pos(PathChar, LogFile) = 0) Then
|
||||||
|
LogFile := bbsConfig.LogsPath + LogFile;
|
||||||
|
|
||||||
|
LogLevel := INI.ReadInteger(Header_GENERAL, 'loglevel', 1);
|
||||||
|
|
||||||
BarOne := TStatusBar.Create(3);
|
BarOne := TStatusBar.Create(3);
|
||||||
BarAll := TStatusBar.Create(6);
|
BarAll := TStatusBar.Create(6);
|
||||||
End;
|
End;
|
||||||
|
@ -163,6 +176,8 @@ Var
|
||||||
Begin
|
Begin
|
||||||
ApplicationStartup;
|
ApplicationStartup;
|
||||||
|
|
||||||
|
Log (1, '+', 'Startup using ' + JustFile(INI.FileName));
|
||||||
|
|
||||||
// Build process list
|
// Build process list
|
||||||
|
|
||||||
DoImportNA := CheckProcess(Header_IMPORTNA);
|
DoImportNA := CheckProcess(Header_IMPORTNA);
|
||||||
|
@ -178,7 +193,7 @@ Begin
|
||||||
|
|
||||||
If ProcessTotal = 0 Then Begin
|
If ProcessTotal = 0 Then Begin
|
||||||
ProcessName ('Load configuration', False);
|
ProcessName ('Load configuration', False);
|
||||||
ProcessStatus ('No processes configured!');
|
ProcessStatus ('No processes configured!', True);
|
||||||
ProcessResult (rFATAL, False);
|
ProcessResult (rFATAL, False);
|
||||||
|
|
||||||
Halt(1);
|
Halt(1);
|
||||||
|
|
|
@ -42,7 +42,7 @@ Begin
|
||||||
ReWrite (OutFile);
|
ReWrite (OutFile);
|
||||||
|
|
||||||
If IoResult <> 0 Then Begin
|
If IoResult <> 0 Then Begin
|
||||||
ProcessStatus ('Cannot create output file');
|
ProcessStatus ('Cannot create output file', True);
|
||||||
ProcessResult (rWARN, True);
|
ProcessResult (rWARN, True);
|
||||||
|
|
||||||
Exit;
|
Exit;
|
||||||
|
@ -51,7 +51,7 @@ Begin
|
||||||
Assign (BaseFile, bbsConfig.DataPath + 'fbases.dat');
|
Assign (BaseFile, bbsConfig.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');
|
ProcessStatus ('Cannot open fbases.dat', True);
|
||||||
ProcessResult (rWARN, True);
|
ProcessResult (rWARN, True);
|
||||||
|
|
||||||
Close (OutFile);
|
Close (OutFile);
|
||||||
|
@ -135,8 +135,8 @@ Begin
|
||||||
Close (BaseFile);
|
Close (BaseFile);
|
||||||
Close (OutFile);
|
Close (OutFile);
|
||||||
|
|
||||||
ProcessStatus ('Added |15' + strI2S(TotalFiles) + ' |07file(s)');
|
ProcessStatus ('Added |15' + strI2S(TotalFiles) + ' |07file(s)', True);
|
||||||
ProcessResult (rDONE, True);
|
ProcessResult (rDONE, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
|
|
@ -21,6 +21,8 @@ Var
|
||||||
bbsConfig : RecConfig;
|
bbsConfig : RecConfig;
|
||||||
TempPath : String;
|
TempPath : String;
|
||||||
StartPath : String;
|
StartPath : String;
|
||||||
|
LogFile : String;
|
||||||
|
LogLevel : Byte = 1;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
Header_GENERAL = 'General';
|
Header_GENERAL = 'General';
|
||||||
|
@ -33,6 +35,7 @@ Const
|
||||||
Header_MSGPURGE = 'PurgeMessageBases';
|
Header_MSGPURGE = 'PurgeMessageBases';
|
||||||
Header_MSGPACK = 'PackMessageBases';
|
Header_MSGPACK = 'PackMessageBases';
|
||||||
|
|
||||||
|
Procedure Log (Level: Byte; Code: Char; Str: String);
|
||||||
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
|
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
|
||||||
Function GenerateMBaseIndex : LongInt;
|
Function GenerateMBaseIndex : LongInt;
|
||||||
Function GenerateFBaseIndex : LongInt;
|
Function GenerateFBaseIndex : LongInt;
|
||||||
|
@ -52,8 +55,33 @@ Uses
|
||||||
DOS,
|
DOS,
|
||||||
m_Types,
|
m_Types,
|
||||||
m_Strings,
|
m_Strings,
|
||||||
|
m_DateTime,
|
||||||
m_FileIO;
|
m_FileIO;
|
||||||
|
|
||||||
|
Procedure Log (Level: Byte; Code: Char; Str: String);
|
||||||
|
Var
|
||||||
|
T : Text;
|
||||||
|
Begin
|
||||||
|
If LogFile = '' Then Exit;
|
||||||
|
|
||||||
|
If LogLevel < Level Then Exit;
|
||||||
|
|
||||||
|
FileMode := 66;
|
||||||
|
|
||||||
|
Assign (T, LogFile);
|
||||||
|
Append (T);
|
||||||
|
|
||||||
|
If IoResult <> 0 Then
|
||||||
|
If IoResult = 5 Then Exit Else ReWrite(T);
|
||||||
|
|
||||||
|
If Str = '' Then
|
||||||
|
WriteLn (T, '')
|
||||||
|
Else
|
||||||
|
WriteLn (T, Code + ' ' + DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, False) + ' ' + Str);
|
||||||
|
|
||||||
|
Close (T);
|
||||||
|
End;
|
||||||
|
|
||||||
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
|
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
|
||||||
Var
|
Var
|
||||||
Temp : String[20];
|
Temp : String[20];
|
||||||
|
|
|
@ -35,7 +35,7 @@ Begin
|
||||||
{$I-} Reset(InFile); {$I+}
|
{$I-} Reset(InFile); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then Begin
|
If IoResult <> 0 Then Begin
|
||||||
ProcessStatus ('Cannot find NA file');
|
ProcessStatus ('Cannot find NA file', True);
|
||||||
ProcessResult (rWARN, True);
|
ProcessResult (rWARN, True);
|
||||||
|
|
||||||
Exit;
|
Exit;
|
||||||
|
@ -44,14 +44,14 @@ Begin
|
||||||
RootDir := DirSlash(INI.ReadString(Header_FILEBONE, 'root_dir', ''));
|
RootDir := DirSlash(INI.ReadString(Header_FILEBONE, 'root_dir', ''));
|
||||||
|
|
||||||
If RootDir = PathSep Then Begin
|
If RootDir = PathSep Then Begin
|
||||||
ProcessStatus ('No root directory');
|
ProcessStatus ('No root directory', True);
|
||||||
ProcessResult (rFATAL, True);
|
ProcessResult (rFATAL, True);
|
||||||
|
|
||||||
Exit;
|
Exit;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If Not DirExists(RootDir) Then Begin
|
If Not DirExists(RootDir) Then Begin
|
||||||
ProcessStatus ('Root directory does not exist');
|
ProcessStatus ('Root directory does not exist', True);
|
||||||
ProcessResult (rFATAL, True);
|
ProcessResult (rFATAL, True);
|
||||||
|
|
||||||
// While DirCreate can 'recursively' create, this is added to prevent
|
// While DirCreate can 'recursively' create, this is added to prevent
|
||||||
|
@ -72,7 +72,7 @@ Begin
|
||||||
BaseName := strStripLow(strStripB(Copy(Str, strWordPos(5, str, ' '), 255), ' '));
|
BaseName := strStripLow(strStripB(Copy(Str, strWordPos(5, str, ' '), 255), ' '));
|
||||||
BaseTag := strStripLow(strWordGet(2, Str, ' '));
|
BaseTag := strStripLow(strWordGet(2, Str, ' '));
|
||||||
|
|
||||||
ProcessStatus (BaseName);
|
ProcessStatus (BaseName, False);
|
||||||
|
|
||||||
If Not IsDupeFBase(BaseTag) Then Begin
|
If Not IsDupeFBase(BaseTag) Then Begin
|
||||||
FillChar (FBase, SizeOf(FBase), 0);
|
FillChar (FBase, SizeOf(FBase), 0);
|
||||||
|
@ -109,7 +109,7 @@ Begin
|
||||||
|
|
||||||
Close (InFile);
|
Close (InFile);
|
||||||
|
|
||||||
ProcessStatus ('Created |15' + strI2S(CreatedBases) + ' |07base(s)');
|
ProcessStatus ('Created |15' + strI2S(CreatedBases) + ' |07base(s)', True);
|
||||||
ProcessResult (rDONE, True);
|
ProcessResult (rDONE, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ Begin
|
||||||
Close (BaseFile);
|
Close (BaseFile);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
ProcessStatus ('Uploaded |15' + strI2S(FilesAdded) + ' |07file(s)');
|
ProcessStatus ('Uploaded |15' + strI2S(FilesAdded) + ' |07file(s)', True);
|
||||||
ProcessResult (rDONE, True);
|
ProcessResult (rDONE, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ Begin
|
||||||
{$I-} Reset(InFile); {$I+}
|
{$I-} Reset(InFile); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then Begin
|
If IoResult <> 0 Then Begin
|
||||||
ProcessStatus ('Cannot find NA file');
|
ProcessStatus ('Cannot find NA file', True);
|
||||||
ProcessResult (rWARN, True);
|
ProcessResult (rWARN, True);
|
||||||
|
|
||||||
Exit;
|
Exit;
|
||||||
|
@ -49,7 +49,7 @@ Begin
|
||||||
TagName := strStripLow(strWordGet(1, Str, ' '));
|
TagName := strStripLow(strWordGet(1, Str, ' '));
|
||||||
BaseName := strStripLow(strStripB(Copy(Str, Pos(' ', Str), 255), ' '));
|
BaseName := strStripLow(strStripB(Copy(Str, Pos(' ', Str), 255), ' '));
|
||||||
|
|
||||||
ProcessStatus (BaseName);
|
ProcessStatus (BaseName, False);
|
||||||
|
|
||||||
If Not IsDupeMBase(TagName) Then Begin
|
If Not IsDupeMBase(TagName) Then Begin
|
||||||
FillChar (MBase, SizeOf(MBase), #0);
|
FillChar (MBase, SizeOf(MBase), #0);
|
||||||
|
@ -110,7 +110,7 @@ Begin
|
||||||
|
|
||||||
Close (InFile);
|
Close (InFile);
|
||||||
|
|
||||||
ProcessStatus ('Created |15' + strI2S(CreatedBases) + ' |07base(s)');
|
ProcessStatus ('Created |15' + strI2S(CreatedBases) + ' |07base(s)', True);
|
||||||
ProcessResult (rDONE, True);
|
ProcessResult (rDONE, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ Begin
|
||||||
ProcessName ('Packing Message Bases', True);
|
ProcessName ('Packing Message Bases', True);
|
||||||
ProcessResult (rWORKING, False);
|
ProcessResult (rWORKING, False);
|
||||||
|
|
||||||
ProcessStatus ('Complete');
|
ProcessStatus ('Removed X Msgs in X Bases', True);
|
||||||
ProcessResult (rDONE, True);
|
ProcessResult (rDONE, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ Begin
|
||||||
ProcessName ('Purging Message Bases', True);
|
ProcessName ('Purging Message Bases', True);
|
||||||
ProcessResult (rWORKING, False);
|
ProcessResult (rWORKING, False);
|
||||||
|
|
||||||
ProcessStatus ('Complete');
|
ProcessStatus ('Complete', True);
|
||||||
ProcessResult (rDONE, True);
|
ProcessResult (rDONE, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ Type
|
||||||
TProcessResult = (rDONE, rWARN, rWORKING, rFATAL);
|
TProcessResult = (rDONE, rWARN, rWORKING, rFATAL);
|
||||||
|
|
||||||
Procedure ProcessName (Str: String; Start: Boolean);
|
Procedure ProcessName (Str: String; Start: Boolean);
|
||||||
Procedure ProcessStatus (Str: String);
|
Procedure ProcessStatus (Str: String; Last: Boolean);
|
||||||
Procedure ProcessResult (Res: TProcessResult; Done: Boolean);
|
Procedure ProcessResult (Res: TProcessResult; Done: Boolean);
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
@ -36,21 +36,36 @@ Begin
|
||||||
Inc (ProcessPos);
|
Inc (ProcessPos);
|
||||||
|
|
||||||
BarOne.Reset;
|
BarOne.Reset;
|
||||||
|
|
||||||
|
Log (1, '+', 'Process: ' + Str);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure ProcessStatus (Str: String);
|
Procedure ProcessStatus (Str: String; Last: Boolean);
|
||||||
Begin
|
Begin
|
||||||
Console.WriteXYPipe (33, Console.CursorY, 7, 31, Str);
|
Console.WriteXYPipe (33, Console.CursorY, 7, 31, Str);
|
||||||
|
|
||||||
|
If Last Then
|
||||||
|
Log (1, '+', 'Result: ' + strStripPipe(Str))
|
||||||
|
Else
|
||||||
|
Log (2, '+', ' ' + Str);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure ProcessResult (Res: TProcessResult; Done: Boolean);
|
Procedure ProcessResult (Res: TProcessResult; Done: Boolean);
|
||||||
Begin
|
Begin
|
||||||
Case Res of
|
Case Res of
|
||||||
rDONE : Console.WriteXYPipe(66, Console.CursorY, 10, 11, 'DONE');
|
rDONE : Console.WriteXYPipe(66, Console.CursorY, 10, 11, 'DONE');
|
||||||
rWARN : Console.WriteXYPipe(66, Console.CursorY, 12, 11, 'WARNING');
|
rWARN : Begin
|
||||||
|
Console.WriteXYPipe(66, Console.CursorY, 12, 11, 'WARNING');
|
||||||
|
|
||||||
|
Log (2, '!', 'Status: WARNING');
|
||||||
|
End;
|
||||||
rWORKING : Console.WriteXYPipe(66, Console.CursorY, 15, 11, 'WORKING');
|
rWORKING : Console.WriteXYPipe(66, Console.CursorY, 15, 11, 'WORKING');
|
||||||
rFATAL : Console.WriteXYPipe(66, Console.CursorY, 12, 11, 'FATAL');
|
rFATAL : Begin
|
||||||
|
Console.WriteXYPipe(66, Console.CursorY, 12, 11, 'FATAL');
|
||||||
|
|
||||||
|
Log (1, '!', 'Status: FATAL');
|
||||||
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If Done Then Begin
|
If Done Then Begin
|
||||||
|
|
|
@ -93,7 +93,7 @@ Var
|
||||||
DataLen := INI.ReadInteger (Header_TopLists, 'top' + CfgName + 'datalen', 10);
|
DataLen := INI.ReadInteger (Header_TopLists, 'top' + CfgName + 'datalen', 10);
|
||||||
|
|
||||||
If Not FileExist(Template) Then Begin
|
If Not FileExist(Template) Then Begin
|
||||||
ProcessStatus('Template not found');
|
ProcessStatus('Template not found', True);
|
||||||
Exit;
|
Exit;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -161,11 +161,11 @@ Begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
|
||||||
Case ListType of
|
Case ListType of
|
||||||
TopCall : ProcessStatus('Top Callers');
|
TopCall : ProcessStatus('Top Callers', True);
|
||||||
TopPost : ProcessStatus('Top Posts');
|
TopPost : ProcessStatus('Top Posts', True);
|
||||||
TopDL : ProcessStatus('Top Downloaders');
|
TopDL : ProcessStatus('Top Downloaders', True);
|
||||||
TopUL : ProcessStatus('Top Uploaders');
|
TopUL : ProcessStatus('Top Uploaders', True);
|
||||||
TopPCR : ProcessStatus('Top Post/Call Ratio');
|
TopPCR : ProcessStatus('Top Post/Call Ratio', True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
ExclName := INI.ReadString(Header_TopLists, 'exclude_list', 'exclude.txt');
|
ExclName := INI.ReadString(Header_TopLists, 'exclude_list', 'exclude.txt');
|
||||||
|
@ -239,7 +239,7 @@ Begin
|
||||||
If INI.ReadString(Header_TopLists, 'top_ul', '0') = '1' Then GenerateList(TopUL);
|
If INI.ReadString(Header_TopLists, 'top_ul', '0') = '1' Then GenerateList(TopUL);
|
||||||
If INI.ReadString(Header_TopLists, 'top_pcr', '0') = '1' Then GenerateList(TopPCR);
|
If INI.ReadString(Header_TopLists, 'top_pcr', '0') = '1' Then GenerateList(TopPCR);
|
||||||
|
|
||||||
ProcessStatus ('Created |15' + strI2S(CreatedLists) + ' |07list(s)');
|
ProcessStatus ('Created |15' + strI2S(CreatedLists) + ' |07list(s)', True);
|
||||||
ProcessResult (rDONE, True);
|
ProcessResult (rDONE, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ Begin
|
||||||
While Not Eof(BaseFile) Do Begin
|
While Not Eof(BaseFile) Do Begin
|
||||||
Read (BaseFile, Base);
|
Read (BaseFile, Base);
|
||||||
|
|
||||||
ProcessStatus (Base.Name);
|
ProcessStatus (Base.Name, False);
|
||||||
BarOne.Update (FilePos(BaseFile), FileSize(BaseFile));
|
BarOne.Update (FilePos(BaseFile), FileSize(BaseFile));
|
||||||
|
|
||||||
If Not DirExists(Base.Path) Then Continue;
|
If Not DirExists(Base.Path) Then Continue;
|
||||||
|
@ -90,6 +90,8 @@ Begin
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If Not Found Then Begin
|
If Not Found Then Begin
|
||||||
|
Log (1, '+', ' Add: ' + DirInfo.Name + ' To: ' + strStripPipe(Base.Name));
|
||||||
|
|
||||||
Inc (FilesAdded);
|
Inc (FilesAdded);
|
||||||
Seek (ListFile, FileSize(ListFile));
|
Seek (ListFile, FileSize(ListFile));
|
||||||
|
|
||||||
|
@ -172,8 +174,8 @@ Begin
|
||||||
Close (BaseFile);
|
Close (BaseFile);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
ProcessStatus ('Uploaded |15' + strI2S(FilesAdded) + ' |07file(s)');
|
ProcessStatus ('Uploaded |15' + strI2S(FilesAdded) + ' |07file(s)', True);
|
||||||
ProcessResult (rDONE, True);
|
ProcessResult (rDONE, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
|
Loading…
Reference in New Issue