QWK networking hub tested/working

This commit is contained in:
mysticbbs 2013-09-06 16:32:58 -04:00
parent 38f419d2a2
commit f30bf00834
7 changed files with 59 additions and 16 deletions

View File

@ -265,8 +265,6 @@ Begin
End;
End;
writeln ('base result:',result);
Close (F);
End;

View File

@ -278,6 +278,7 @@ Var
Var
TempStr : String;
SkipMsg : Boolean;
Begin
MsgAdded := 0;
@ -315,25 +316,38 @@ Begin
MsgBase^.ReWriteHdr;
End;
Inc (MsgAdded);
Inc (TotalMessages);
LastRead := MsgBase^.GetMsgNum;
Chunks := 0;
BufStr := '';
TooBig := False;
QwkIndex := DataFile.FileSizeRaw DIV 128 + 1;
SkipMsg := False;
MsgBase^.MsgTxtStartUp;
While Not MsgBase^.EOM Do Begin
While Not MsgBase^.EOM And Not SkipMsg Do Begin
TempStr := MsgBase^.GetString(79);
If TempStr[1] = #1 Then Continue;
If TempStr[1] = #1 Then Begin
// Do not export msgs to a node if the msg came from the node
If IsNetworked And Not IsRep And (Copy(TempStr, 2, 4) = 'QSRC') Then
SkipMsg := strUpper(strWordGet(2, TempStr, ' ')) = strUpper(PacketID);
Continue;
End;
Inc (Chunks, Length(TempStr));
End;
If SkipMsg Then Begin
MsgBase^.SeekNext;
Continue;
End;
Inc (MsgAdded);
Inc (TotalMessages);
If Chunks MOD 128 = 0 Then
Chunks := Chunks DIV 128 + 1
Else
@ -596,6 +610,8 @@ Begin
If IsNetworked Then Begin
MsgBase^.SetLocal(False);
If IsQwk Then MsgBase^.SetSent(True);
QwkBlock[0] := #25;
Move (QwkHeader.UpFrom, QwkBlock[1], 25);
MsgBase^.SetFrom(strStripR(QwkBlock, ' '));
@ -675,8 +691,13 @@ Begin
End;
If Not IsControl Then Begin
// ISQWK = a node importing from HUB
If ((IsQwk) or (HasAccess(Self, MBase.PostACS))) and
((IsNetworked And (UserRecord.QwkNetwork = MBase.QwkNetID)) or (Not IsNetworked)) Then Begin
If IsNetworked And Not IsQWK Then
MsgBase^.DoStringLn (#1'QSRC ' + PacketID);
MsgBase^.WriteMsg;
Inc (RepOK); // must increase user and history posts by repOK

View File

@ -569,7 +569,7 @@ Begin
QWK := TQwkEngine.Create(TempPath, GetQWKName, UserPos, User);
QWK.HasAccess := @QWKHasAccess;
QWK.IsNetworked := User.Flags AND UserQWKNetwork <> 0;
QWK.IsNetworked := (User.Flags AND UserQWKNetwork <> 0);
QWK.IsExtended := User.QwkExtended;
QWK.ImportPacket(False);
@ -605,9 +605,6 @@ Begin
GetSecurityLevel(User.Security, SecLevel);
Server.Status (ProcessID, User.Handle + ' logged in');
server.status (processID, 'DEBUG Pos ' + strI2S(UserPos));
if user.flags and userqwknetwork <> 0 then
server.status (processID, 'DEBUG has networking');
End Else
Client.WriteLine(re_BadPW);
End;

View File

@ -22,6 +22,7 @@ Uses
BBS_MsgBase_JAM,
BBS_MsgBase_Squish;
// Adds packet name into a FLO-type file if it does not exist already
Procedure AddToFLOQueue (FloName, PacketFN: String);
Var
T : Text;
@ -95,7 +96,7 @@ Begin
0 : FLOName := FLOName + '.flo';
1 : FLOName := FLOName + '.clo';
2 : FLOName := FLOName + '.dlo';
3 : FlOName := FLOName + '.hlo';
3 : FLOName := FLOName + '.hlo';
End;
// TODO

View File

@ -75,6 +75,7 @@ Var
F : File;
QwkNet : RecQwkNetwork;
Count : Byte = 0;
Mode : Byte;
Begin
WriteLn;
WriteLn ('QWKPOLL Version ' + mysVersion);
@ -96,6 +97,14 @@ Begin
Str := strUpper(strStripB(ParamStr(1), ' '));
If strUpper(ParamStr(2)) = 'EXPORT' Then
Mode := 1
Else
If strUpper(ParamStr(2)) = 'IMPORT' Then
Mode := 2
Else
Mode := 0;
If (Str = 'ALL') Then Begin
Assign (F, bbsCfg.DataPath + 'qwknet.dat');
@ -117,10 +126,19 @@ Begin
End Else Begin
WriteLn ('Invalid command line.');
WriteLn;
WriteLn ('Syntax: QWKPOLL [ALL] or [Qwk Network Index]');
WriteLn ('Syntax: QWKPOLL [ALL]');
WriteLn (' [Qwk Network Index]');
WriteLn (' [EXPORT] [QwkNet Index] [PATH TO CREATE REP]');
WriteLn (' [IMPORT] [QwkNet Index] [PATH OF QWK PACKET]');
WriteLn;
WriteLn ('Ex: QWKPOLL ALL - Exchange with ALL configured QWK hubs via FTP');
WriteLn ('Ex: QWKPOLL ALL - Exchange with ALL QWK hubs via FTP');
WriteLn (' QWKPOLL 1 - Exchange with only Qwk Network #1');
WriteLn (' QWKPOLL 1 EXPORT /bbs/qwknet - Create REP packet in /bbs/qwknet');
WriteLn (' QWKPOLL 1 IMPORT /bbs/qwknet - Import QWK packet from /bbs/qwknet');
WriteLn;
WriteLn ('NOTE: QWKPOLL automatically deals with QWK and REP packets during polling');
WriteLn (' The export and import functions are not needed, and only provided');
WriteLn (' for systems that may want to use an alternative transport method');
WriteLn;
End;

View File

@ -42,6 +42,8 @@ BUGS AND POSSIBLE ISSUES
FUTURE / IDEAS / WORK IN PROGRESS / NOTES
=========================================
- when editing an already posted message with reference linkage, export the
quote data from the original message...
- in file listing jump to files by typing the file number
- remove console class code from mutil since its in bbs_database
^ same with keyboard

View File

@ -3030,6 +3030,12 @@
8. At your own risk: Delete FastEcho, GEcho, CrashMail, etc. :)
NOTE that the first time you run the export function of MUTIL it may
toss all messages in your bases, depending on what tosser you used
before Mystic's tosser. You can just delete all the packets in your
outbound directory after running it the first time. This problem will
go away once tossing is finished.
! Fixed a bug that could cause the user editor to crash directly after a
new install if you didn't create your SysOp account first.