More QWK network stuff

This commit is contained in:
mysticbbs 2013-09-04 15:02:58 -04:00
parent c853f6aafe
commit d5ae44e2ea
12 changed files with 138 additions and 37 deletions

View File

@ -20,7 +20,8 @@ Uses
bbs_Cfg_EchoMail,
BBS_Records,
BBS_DataBase,
BBS_Common;
BBS_Common,
BBS_Cfg_QwkNet;
Type
RecMessageBaseFile = File of RecMessageBase;
@ -102,20 +103,21 @@ Var
Links : LongInt;
OrigFN : String;
OrigPath : String;
QwkNet : RecQwkNetwork;
Begin
Topic := '|03(|09Message Base Edit|03) |01-|09> |15';
Box := TAnsiMenuBox.Create;
Form := TAnsiMenuForm.Create;
OrigFN := MBase.FileName;
OrigPath := Mbase.Path;
OrigPath := MBase.Path;
Box.Shadow := False;
Box.Header := ' Index ' + strI2S(MBase.Index) + ' ';
Box.Open (3, 4, 77, 22);
Box.Open (3, 4, 77, 23);
VerticalLine (17, 5, 21);
VerticalLine (17, 5, 22);
VerticalLine (66, 5, 21);
Form.AddStr ('N', ' Name' , 11, 5, 19, 5, 6, 30, 40, @MBase.Name, Topic + 'Message base description');
@ -134,7 +136,8 @@ Begin
Form.AddStr ('S', ' Sponsor' , 8, 18, 19, 18, 9, 30, 30, @MBase.Sponsor, Topic + 'User name of base''s sponser');
Form.AddStr ('T', ' R Template' , 5, 19, 19, 19, 12, 20, 20, @MBase.RTemplate, Topic + 'Template for full screen reader');
Form.AddStr ('M', ' L Template' , 5, 20, 19, 20, 12, 20, 20, @MBase.ITemplate, Topic + 'Template for lightbar message list');
Form.AddBits ('0', ' QWK Network' , 4, 21, 19, 21, 13, MBAllowQWKNet, @MBase.Flags, Topic + 'Is this base a QWK network base?');
Form.AddNone ('0', ' QWK Network' , 4, 21, 19, 21, 13, Topic + 'QWK network associated to this base');
Form.AddLong ('!', ' QWK Base ID' , 4, 22, 19, 22, 13, 6, 0, 999999, @MBase.QwkConfID, Topic + 'QWK network base ID');
Form.AddAttr ('Q', ' Quote Color' , 53, 5, 68, 5, 13, @MBase.ColQuote, Topic + 'Color for quoted text');
Form.AddAttr ('X', ' Text Color' , 54, 6, 68, 6, 12, @MBase.ColText, Topic + 'Color for message text');
@ -166,7 +169,19 @@ Begin
WriteXY (19, 16, 113, strI2S(Links) + ' node(s)');
If MBase.QwkNetID <> 0 Then
If GetQwkNetByIndex(MBase.QwkNetID, QwkNet) Then
MBase.QwkNetID := QwkNet.Index
Else
MBase.QwkNetID := 0;
If MBase.QwkNetID = 0 Then
QwkNet.Description := 'None';
WriteXY (19, 21, 113, strPadR(QwkNet.Description, 30, ' '));
Case Form.Execute of
'0' : MBase.QwkNetID := Configuration_QwkNetworks(False);
'D' : MBase.NetAddr := Configuration_EchoMailAddress(False);
'7' : Configuration_NodeExport (MBase);
#27 : {If (MBase.NetType > 0) And (MBase.EchoTag = '') And (MBase.NetType <> 3) Then
@ -385,6 +400,9 @@ Var
If MBase.NetType = 0 Then
Addr := 'Local'
Else
If MBase.QwkNetID <> 0 Then
Addr := 'QwkNet'
Else
Addr := strAddr2Str(bbsCfg.NetAddress[MBase.NetAddr]);

View File

@ -67,7 +67,7 @@ Var
If Result = 0 Then Inc(Result);
Reset (QwkFile);
Seek (QwkFile, 0);
While Not Eof(QwkFile) Do Begin
Read (QwkFile, TempNet);
@ -75,8 +75,8 @@ Var
If Result = TempNet.Index Then Begin
If Result >= 2000000 Then Result := 1;
Inc (Result);
Reset (QwkFile);
Inc (Result);
Seek (QwkFile, 0);
End;
End;
@ -89,7 +89,10 @@ Var
Begin
List.Clear;
Reset (QwkFile);
If Not Edit Then
List.Add('0 None', 2);
Seek (QwkFile, 0);
While Not Eof(QwkFile) Do Begin
Read (QwkFile, QwkNet);
@ -115,12 +118,12 @@ Var
End;
Begin
Result := -1;
Result := 0;
Assign (QwkFile, bbsCfg.DataPath + 'qwknet.dat');
If Not ioReset(QwkFile, SizeOf(QwkNet), fmRWDN) Then
If Not ioReWrite(QwkFile, SizeOf(QwkNet), fmRWDN) Then
If Not ioReset(QwkFile, SizeOf(RecQwkNetwork), fmRWDN) Then
If Not ioReWrite(QwkFile, SizeOf(RecQwkNetwork), fmRWDN) Then
Exit;
Box := TAnsiMenuBox.Create;
@ -156,8 +159,8 @@ Begin
End;
'D' : If (List.Picked < List.ListMax) Then
If ShowMsgBox(1, 'Delete this entry?') Then Begin
Seek (QwkFile, List.Picked - 1);
Read (QwkFile, QwkNet);
// Seek (QwkFile, List.Picked - 1);
// Read (QwkFile, QwkNet);
KillRecord (QwkFile, List.Picked, SizeOf(RecQwkNetwork));
@ -167,18 +170,32 @@ Begin
End;
End;
#13 : If List.Picked < List.ListMax Then Begin
Seek (QwkFile, List.Picked - 1);
Read (QwkFile, QwkNet);
If Not Edit Then Begin
Result := QwkNet.Index;
If Not Edit And (List.Picked = 1) Then Begin
Result := 0;
Break;
End Else Begin
If Edit Then
Seek (QwkFile, List.Picked - 1)
Else
Seek (QwkFile, List.Picked - 2);
Read (QwkFile, QwkNet);
If Not Edit Then Begin
Result := QwkNet.Index;
Break;
End;
End;
EditNetwork (QwkNet);
Seek (QwkFile, List.Picked - 1);
If Edit Then
Seek (QwkFile, List.Picked - 1)
Else
Seek (QwkFile, List.Picked - 2);
Write (QwkFile, QwkNet);
End;
#27 : Break;
@ -192,4 +209,4 @@ Begin
Box.Free;
End;
End.
End.

View File

@ -81,7 +81,7 @@ Begin
Box.Header := ' General Settings ';
Box.Open (5, 5, 75, 18);
Box.Open (5, 5, 75, 19);
VerticalLine (24, 7, 17);
VerticalLine (67, 7, 12);

View File

@ -23,7 +23,8 @@ Uses
bbs_General,
BBS_Common,
BBS_DataBase,
bbs_Cfg_SecLevel;
BBS_Cfg_SecLevel,
BBS_Cfg_QwkNet;
Procedure Configuration_EditUser (Var U: RecUser);
Var
@ -70,6 +71,7 @@ Var
LastCall : String[8];
Temp : Integer;
SavedUser : RecUser;
QwkNet : RecQwkNetwork;
Begin
Topic := '|03(|09User Editor|03) |01-|09> |15';
SavedUser := U;
@ -192,7 +194,8 @@ Begin
Form.AddBits ('P', ' No PW Change', 7, 10, 23, 10, 14, UserNoPWChange, @U.Flags, Topic + 'Exclude from forced password change');
Form.AddBits ('H', ' No History' , 7, 11, 23, 11, 14, UserNoHistory, @U.Flags, Topic + 'Exclude from BBS history stats');
Form.AddBits ('T', ' No Timeout' , 7, 12, 23, 12, 14, UserNoTimeout, @U.Flags, Topic + 'Exclude from inactivity timeout');
Form.AddBits ('Q', ' QWK Network' , 7, 13, 23, 13, 14, UserQWKNetwork, @U.Flags, Topic + 'User is a QWK network account');
Form.AddBits ('Q', ' Qwk Account' , 7, 13, 23, 13, 14, UserQWKNetwork, @U.Flags, Topic + 'User is a QWK network account');
Form.AddNone ('N', ' Qwk Network' , 7, 14, 23, 14, 14, Topic + 'Member of which QWK network');
End;
End;
@ -201,7 +204,17 @@ Begin
If Form.WasFirstExit Then Form.ItemPos := Form.Items;
If Form.WasLastExit Then Form.ItemPos := 1;
If PagePos = 6 Then Begin
QwkNet.Description := 'None';
If (U.QwkNetwork <> 0) And (Not GetQwkNetByIndex(U.QwkNetwork, QwkNet)) Then
QwkNet.Description := 'None';
WriteXY (23, 14, 113, strPadR(QwkNet.Description, 30, ' '));
End;
Case Form.Execute of
'N' : U.QwkNetwork := Configuration_QwkNetworks(False);
#21 : Begin
Temp := Configuration_SecurityEditor(False);

View File

@ -256,7 +256,7 @@ Begin
If Str = '-' Then
WriteLn (tLOG, strRep('-', 40))
Else
WriteLn (tLOG, DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, 0) + ' ' + Str);
WriteLn (tLOG, FormatDate (CurDateDT, 'NNN DD YYYY HH:II') + ' ' + Str);
Close (tLOG);
End;

View File

@ -47,6 +47,7 @@ Function GetMBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : B
Procedure GetMessageScan (UN: Cardinal; TempBase: RecMessageBase; Var TempScan: MScanRec);
Procedure PutMessageScan (UN: Cardinal; TempBase: RecMessageBase; TempScan: MScanRec);
Procedure MBaseAssignData (Var User: RecUser; Var Msg: PMsgBaseABS; Var TempBase: RecMessageBase);
Function GetQWKNetByIndex (Num: LongInt; Var TempNet: RecQwkNetwork) : Boolean;
// FILE BASE
@ -241,6 +242,29 @@ Begin
Close (F);
End;
Function GetQWKNetByIndex (Num: LongInt; Var TempNet: RecQwkNetwork) : Boolean;
Var
F : File;
Begin
Result := False;
Assign (F, bbsCfg.DataPath + 'qwknet.dat');
If Not ioReset(F, SizeOf(RecQwkNetwork), fmRWDN) Then Exit;
While Not Eof(F) Do Begin
ioRead (F, TempNet);
If TempNet.Index = Num Then Begin
Result := True;
Break;
End;
End;
Close (F);
End;
Procedure GetMessageScan (UN: Cardinal; TempBase: RecMessageBase; Var TempScan: MScanRec);
Var
ScanFile : File;

View File

@ -548,6 +548,11 @@ Begin
MBaseAssignData(UserRecord, MsgBase, MBase);
If IsNetworked Then
MsgBase^.SetLocal(False);
// need to think this stuff through for both HUB and node
// situations
QwkBlock[0] := #25;
Move (QwkHeader.UpTo, QwkBlock[1], 25);
MsgBase^.SetTo(strStripR(QwkBlock, ' '));

View File

@ -1370,7 +1370,7 @@ Begin
// ThisUser := TempUser;
End;
Session.SystemLog ('User: ' + ThisUser.Handle + ' logged in');
Session.SystemLog (ThisUser.Handle + ' logged in');
If bbsCfg.ThemeOnStart Then
ThisUser.Theme := Session.Theme.FileName

View File

@ -7,11 +7,11 @@ Interface
Uses
m_Output,
m_IniReader,
mutil_Status,
bbs_Records,
bbs_MsgBase_Abs,
bbs_MsgBase_Squish,
bbs_MsgBase_JAM;
mUtil_Status,
BBS_Records,
BBS_MsgBase_ABS,
BBS_MsgBase_Squish,
BBS_MsgBase_JAM;
Var
Console : TOutput;

View File

@ -439,7 +439,8 @@ Type
Protocol : Char;
CodePage : Byte; // 0 = CP437, 1 = UTF8
QwkExtended : Boolean;
Reserved : Array[1..387] of Byte;
QwkNetwork : LongInt;
Reserved : Array[1..383] of Byte;
End;
RecEvent = Record
@ -547,8 +548,9 @@ Type
Flags : LongInt; // MB flag bits see above
Created : LongInt;
EchoTag : String[40]; // EchoMail Tag
NetReply : LongInt;
Res : Array[1..31] of Byte; // RESERVED
QwkNetID : LongInt;
QwkConfID : LongInt;
Res : Array[1..27] of Byte; // RESERVED
End;
FScanRec = Record { <Data Path> *.SCN }

View File

@ -43,6 +43,14 @@ BUGS AND POSSIBLE ISSUES
FUTURE / IDEAS / WORK IN PROGRESS / NOTES
=========================================
- remove console class code from mutil since its in bbs_database
^ same with keyboard
- think through the Local flag for all QWK networking situations
as well as semaphore file creation
- add QWKNet base type or no? leaning towards no because it might limit
hybrid FIDO/QWK networks which maybe we can do currently? need to think
about the SENT flag and how we could determine which type it was circulated
to.
- make tiosocket buffer size dynamic. increase data sockets in ftp to 32kb
- all display files to search for .hlp before ANS?
- fix END in lightbar file lists so it doesn't suck.
@ -154,7 +162,7 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES
- Email verification
- QWK Networking support internally WHO CAN HELP THIS HAPPEN?
- MPL trunc/round?
- Salted SHA-1 or SHA-256 password encryption
- Salted MD5, SHA-1 or SHA-256 password encryption?
- User editor: Reset password/Force change... cannot view PWs
RANDOM DRUNKEN BRAINDUMP AKA DESIGN DETAILS
@ -315,6 +323,7 @@ mystic_server_pop3
mystic_server
mystic_client
mystic_client_smtp
mystic_client_ftp
mystic_server_events
mystic_cmd_server
mystic_cmd_fidopoll

View File

@ -3620,9 +3620,22 @@
using FTP. It will also attempt to use the archive configuration to import
FILE_ID.DIZ files.
+ MIS server status updates now use a MMM DD format date instead of MM/DD
which was confusing/annoying for people outside of North America.
+ MIS server status updates and logging now use a MMM DD format date instead
of MM/DD which was confusing/annoying for people outside of North America.
+ Mystic's node logging now uses MMM DD format date instead of MM/DD/YY.
+ The FTP server now allows resumed uploads via the APPE function.
+ System configuration now has a QWK Networks configuration editor, where
one or more QWK networks can be defined.
+ Message base editor now allows each message base to be linked to a
configured QWK network. In addition, each message base also now has a QWK
network conference ID number.
+ Users can now be linked to a configured QWK network using the User editor.
This defines the QWK network message bases that they have access to if
they are flagged as a QWK network account.
<ALPHA 37 RELEASED>