Stuff
This commit is contained in:
parent
76b42f6852
commit
59f04ee524
|
@ -476,19 +476,26 @@
|
||||||
; The above example will search in c:\nodelist and select the latest
|
; The above example will search in c:\nodelist and select the latest
|
||||||
; nodelist.### and agoranet.### nodelists. This comparison is first done
|
; nodelist.### and agoranet.### nodelists. This comparison is first done
|
||||||
; by checking the day extension. If the extension is archived (.z12, etc)
|
; by checking the day extension. If the extension is archived (.z12, etc)
|
||||||
; it will unarchive the nodelist first before comparison.
|
; it will be unarchived before comparison.
|
||||||
;
|
;
|
||||||
; After decompressing, the 3-digit day extensions are compared, selecting
|
; After decompressing, the 3-digit day extensions are compared, selecting
|
||||||
; the highest number. It will then compare the years of the file dates,
|
; the highest number. It will also compare the years of the file dates,
|
||||||
; and select the newest option. So if you have nodelist.025 dated 2013
|
; and select the newest option. So if you have nodelist.025 dated 2013
|
||||||
; and also nodelist.320 dated 2012, nodelist.025 will be selected.
|
; and also nodelist.320 dated 2012, nodelist.025 will be selected.
|
||||||
;
|
;
|
||||||
; The same process would then be repeated for agoranet.### and once the
|
; The same process is then be repeated for agoranet.### and once all of
|
||||||
; two files are found, it will merge them together in Mystic's data folder
|
; the defined 'nodefiles' are processed, they will be merged together and
|
||||||
; so it can be used for nodelist lookups.
|
; copied into Mystic's DATA folder so it can be used for nodelist lookups.
|
||||||
;
|
;
|
||||||
; If no nodelists are found, Mystic will not overwrite the current
|
; If no nodelists are found, Mystic will not overwrite the current
|
||||||
; nodelist.
|
; nodelist. Comments are stripped while merging to lower filesize and
|
||||||
|
; increase search performance.
|
||||||
|
|
||||||
|
; Strip nodes marked as DOWN?
|
||||||
|
strip_down = true
|
||||||
|
|
||||||
|
; Strip nodes marked as PRIVATE?
|
||||||
|
strip_private = true
|
||||||
|
|
||||||
nodefile=d:\nodelists\nodelist
|
nodefile=d:\nodelists\nodelist
|
||||||
nodefile=d:\nodelists\agoranet
|
nodefile=d:\nodelists\agoranet
|
||||||
|
|
|
@ -17,6 +17,53 @@ Uses
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status;
|
mUtil_Status;
|
||||||
|
|
||||||
|
Var
|
||||||
|
NodeListNoPrivate : Boolean;
|
||||||
|
NodeListNoDown : Boolean;
|
||||||
|
|
||||||
|
Procedure FileAppend (F1, F2: String);
|
||||||
|
Var
|
||||||
|
BufIn,
|
||||||
|
BufOut : Array[1..8*1024] of Char;
|
||||||
|
TF1 : Text;
|
||||||
|
TF2 : Text;
|
||||||
|
Str : String;
|
||||||
|
Begin
|
||||||
|
Assign (TF1, F1);
|
||||||
|
|
||||||
|
{$I-} Reset(TF1); {$I+}
|
||||||
|
|
||||||
|
If IoResult <> 0 Then Exit;
|
||||||
|
|
||||||
|
SetTextBuf (TF1, BufIn);
|
||||||
|
|
||||||
|
Assign (TF2, F2);
|
||||||
|
{$I-} Append(TF2); {$I+}
|
||||||
|
|
||||||
|
If (IoResult = 2) Then
|
||||||
|
ReWrite (TF2);
|
||||||
|
|
||||||
|
SetTextBuf (TF2, BufOut);
|
||||||
|
|
||||||
|
While Not Eof(TF1) Do Begin
|
||||||
|
ReadLn (TF1, Str);
|
||||||
|
|
||||||
|
If (Str[1] = ';') Then
|
||||||
|
Continue;
|
||||||
|
|
||||||
|
If NodeListNoDown And (Copy(Str, 1, 4) = 'Down') Then
|
||||||
|
Continue;
|
||||||
|
|
||||||
|
If NodeListNoPrivate And (Copy(Str, 1, 3) = 'Pvt') Then
|
||||||
|
Continue;
|
||||||
|
|
||||||
|
WriteLn (TF2, Str);
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (TF1);
|
||||||
|
Close (TF2);
|
||||||
|
End;
|
||||||
|
|
||||||
Procedure ExtractNodeLists (BaseFile: String);
|
Procedure ExtractNodeLists (BaseFile: String);
|
||||||
Var
|
Var
|
||||||
DirInfo : SearchRec;
|
DirInfo : SearchRec;
|
||||||
|
@ -174,6 +221,9 @@ Begin
|
||||||
FileErase (bbsCfg.DataPath + 'nodelist.$$$');
|
FileErase (bbsCfg.DataPath + 'nodelist.$$$');
|
||||||
FileReName (bbsCfg.DataPath + 'nodelist.txt', bbsCfg.DataPath + 'nodelist.$$$');
|
FileReName (bbsCfg.DataPath + 'nodelist.txt', bbsCfg.DataPath + 'nodelist.$$$');
|
||||||
|
|
||||||
|
NodeListNoDown := Ini.ReadBoolean(Header_NODELIST, 'strip_down', False);
|
||||||
|
NodeListNoPrivate := Ini.ReadBoolean(Header_NODELIST, 'strip_private', False);
|
||||||
|
|
||||||
Ini.SetSequential(True);
|
Ini.SetSequential(True);
|
||||||
|
|
||||||
Repeat
|
Repeat
|
||||||
|
|
|
@ -120,22 +120,27 @@ Begin
|
||||||
While Not Eof(F) Do Begin
|
While Not Eof(F) Do Begin
|
||||||
ioRead (F, QwkNet);
|
ioRead (F, QwkNet);
|
||||||
|
|
||||||
If PollByQwkNet(QwkNet) Then
|
Case Mode of
|
||||||
|
0 : If PollByQwkNet(QwkNet) Then
|
||||||
Inc (Count);
|
Inc (Count);
|
||||||
End;
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
Close (F);
|
Close (F);
|
||||||
End;
|
End;
|
||||||
End Else
|
End Else
|
||||||
If strS2I(Str) > 0 Then Begin
|
If strS2I(Str) > 0 Then Begin
|
||||||
If GetQwkNetByIndex(strS2I(Str), QwkNet) Then
|
If GetQwkNetByIndex(strS2I(Str), QwkNet) Then
|
||||||
If PollByQwkNet(QwkNet) Then
|
Case Mode of
|
||||||
|
0 : If PollByQwkNet(QwkNet) Then
|
||||||
Inc (Count);
|
Inc (Count);
|
||||||
|
End;
|
||||||
End Else Begin
|
End Else Begin
|
||||||
WriteLn ('Invalid command line.');
|
WriteLn ('Invalid command line.');
|
||||||
WriteLn;
|
WriteLn;
|
||||||
WriteLn ('Syntax: QWKPOLL [ALL]');
|
WriteLn ('Syntax: QWKPOLL [ALL]');
|
||||||
WriteLn (' [Qwk Network Index]');
|
WriteLn (' [Qwk Network Index]');
|
||||||
|
WriteLn;
|
||||||
WriteLn (' [EXPORT] [QwkNet Index] [PATH TO CREATE REP]');
|
WriteLn (' [EXPORT] [QwkNet Index] [PATH TO CREATE REP]');
|
||||||
WriteLn (' [IMPORT] [QwkNet Index] [PATH OF QWK PACKET]');
|
WriteLn (' [IMPORT] [QwkNet Index] [PATH OF QWK PACKET]');
|
||||||
WriteLn;
|
WriteLn;
|
||||||
|
|
Loading…
Reference in New Issue