more stuffs

This commit is contained in:
mysticbbs 2013-09-07 14:37:42 -04:00
parent c1b1da1639
commit 1bc9872f99
5 changed files with 55 additions and 2 deletions

View File

@ -32,6 +32,7 @@
; - Purge Message bases (by age and max messages)
; - Pack and renumber message bases
; - Post text files to message bases
; - Merge nodelists into Mystic format
;
; ==========================================================================
; ==========================================================================
@ -57,7 +58,7 @@
; Level 2 = verbose
; Level 3 = debug
loglevel=1
loglevel=2
; list of functions to perform on startup
@ -73,6 +74,7 @@
PackMessageBases = false
ImportEchoMail = false
ExportEchoMail = false
MergeNodeLists = true
; ==========================================================================
; ==========================================================================
@ -459,3 +461,34 @@
; no options
[MergeNodeLists]
; Finds the latest nodelists and merges them together in the mystic data
; folder.
;
; Set nodefile value one per line. The value should contain the full path
; and the base filename of the nodelist.
;
; examples:
; nodefile=c:\nodelist\nodelist
; nodefile=c:\nodelist\agoranet
;
; The above example will search in c:\nodelist and select the latest
; nodelist.### and agoranet.### nodelists. This comparison is first done
; by checking the day extension. If the extension is archived (.z12, etc)
; it will unarchive the nodelist first before comparison.
;
; After decompressing, the 3-digit day extensions are compared, selecting
; the highest number. It will then compare the years of the file dates,
; and select the newest option. So if you have nodelist.025 dated 2013
; and also nodelist.320 dated 2012, nodelist.025 will be selected.
;
; The same process would then be repeated for agoranet.### and once the
; two files are found, it will merge them together in Mystic's data folder
; so it can be used for nodelist lookups.
;
; If no nodelists are found, Mystic will not overwrite the current
; nodelist.
nodefile=d:\nodelists\nodelist
nodefile=d:\nodelists\agoranet

View File

@ -48,6 +48,7 @@ Uses
mUtil_MsgPost,
mUtil_EchoExport,
mUtil_EchoImport,
mUtil_NodeList,
bbs_DataBase;
{$I MUTIL_ANSI.PAS}
@ -182,6 +183,7 @@ Var
DoMsgPack : Boolean;
DoMsgPost : Boolean;
DoImportMB : Boolean;
DoNodeList : Boolean;
Begin
ApplicationStartup;
@ -201,6 +203,7 @@ Begin
DoMsgPurge := CheckProcess(Header_MSGPURGE);
DoMsgPack := CheckProcess(Header_MSGPACK);
DoMsgPost := CheckProcess(Header_MSGPOST);
DoNodeList := CheckProcess(Header_NODELIST);
// Exit with an error if nothing is configured
@ -226,4 +229,5 @@ Begin
If DoMsgPack Then uPackMessageBases;
If DoMsgPost Then uPostMessages;
If DoImportMB Then uImportMessageBases;
If DoNodeList Then uMergeNodeList;
End.

View File

@ -39,6 +39,7 @@ Const
Header_MSGPURGE = 'PurgeMessageBases';
Header_MSGPACK = 'PackMessageBases';
Header_MSGPOST = 'PostTextFiles';
Header_NODELIST = 'MergeNodeLists';
Procedure Log (Level: Byte; Code: Char; Str: String);
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
@ -86,7 +87,7 @@ Begin
If Str = '' Then
WriteLn (T, '')
Else
WriteLn (T, Code + ' ' + DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, 2) + ' ' + Str);
WriteLn (T, Code + ' ' + FormatDate(CurDateDT, 'NNN DD YYYY HH:II') + ' ' + Str);
Close (T);
End;

View File

@ -46,7 +46,9 @@ Begin
FTP := TFTPClient.Create;
If FTP.OpenConnection(QwkNet.HostName) Then Begin
writeln('DEBUG connected');
If FTP.Authenticate(QwkNet.Login, QwkNet.Password) Then Begin
writeln('DEBUG authenticated; sending REP');
FTP.SendFile (QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.rep');
// if was sent successfully THEN update by setting
@ -55,13 +57,19 @@ Begin
// in QWK class if we do this.
DirClean (TempPath, '');
writeln ('DEBUG downloading QWK packet');
FTP.GetFile (QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.qwk');
writeln ('DEBUG unpacking QWK');
ExecuteArchive (TempPath, TempPath + QwkNet.PacketID + '.qwk', QwkNet.ArcType, '*', 2);
writeln ('DEBUG importing QWK');
QWK.ImportPacket(True);
writeln ('DEBUG imported QWK TODO add stats here');
End;
End;
writeln ('DEBUG disposing memory');
FTP.Free;
QWK.Free;

View File

@ -3721,4 +3721,11 @@
! MUTIL should now generate a MSGID when posting text files to an echomail
base.
+ MUTIL logs now use MMM DD YYYY date stamps, instead of MM/DD/YY.
+ MUTIL now has a MergeNodeLists function which will scan for nodelist
files to find the most recent nodelists, then combine them and copy them
into the Mystic DATA folder so they can be used for node lookups. It also
supports merging archived nodelists. See MUTIL.INI for more information.
<ALPHA 37 RELEASED>