MsgBase format restructure. New message base editor

This commit is contained in:
mysticbbs 2012-02-26 11:52:54 -05:00
parent 0a8502afb1
commit d270e44ef7
18 changed files with 615 additions and 516 deletions

View File

@ -13,6 +13,35 @@ Uses
{$I RECORDS.PAS} {$I RECORDS.PAS}
Type Type
OldMBaseRec = Record { MBASES.DAT }
Name : String[40]; { Message base name }
QWKName : String[13]; { QWK (short) message base name }
FileName : String[40]; { Message base file name }
Path : String[40]; { Path where files are stored }
BaseType : Byte; { 0 = JAM, 1 = Squish }
NetType : Byte; { 0 = Local 1 = EchoMail }
{ 2 = UseNet 3 = NetMail }
PostType : Byte; { 0 = Public 1 = Private }
ACS, { ACS required to see this base }
ReadACS, { ACS required to read messages }
PostACS, { ACS required to post messages }
SysopACS : String[20]; { ACS required for sysop options }
Password : String[15]; { Password for this message base }
ColQuote : Byte; { Quote text color }
ColText : Byte; { Text color }
ColTear : Byte; { Tear line color }
ColOrigin: Byte; { Origin line color }
NetAddr : Byte; { Net AKA to use for this base }
Origin : String[50]; { Net origin line for this base }
UseReal : Boolean; { Use real names? }
DefNScan : Byte; { 0 = off, 1 = on, 2 = always }
DefQScan : Byte; { 0 = off, 1 = on, 2 = always }
MaxMsgs : Word; { Max messages to allow }
MaxAge : Word; { Max age of messages before purge }
Header : String[8]; { Display Header file name }
Index : SmallInt; { QWK index - NEVER CHANGE THIS }
End;
OldFBaseRec = Record { FBASES.DAT } OldFBaseRec = Record { FBASES.DAT }
Name : String[40]; { File base name } Name : String[40]; { File base name }
FtpName : String[60]; { FTP directory name } FtpName : String[60]; { FTP directory name }
@ -1074,7 +1103,6 @@ Begin
FBase.ULACS := OldFBase.ULACS; FBase.ULACS := OldFBase.ULACS;
FBase.SysopACS := OldFBase.SysopACS; FBase.SysopACS := OldFBase.SysopACS;
FBase.Path := OldFBase.Path; FBase.Path := OldFBase.Path;
FBase.Password := OldFBase.Password;
FBase.DefScan := OldFBase.DefScan; FBase.DefScan := OldFBase.DefScan;
FBase.CommentACS := 's20'; FBase.CommentACS := 's20';
FBase.Flags := 0; FBase.Flags := 0;
@ -1094,6 +1122,71 @@ Begin
DeleteFile (Config.DataPath + 'fbases.old'); DeleteFile (Config.DataPath + 'fbases.old');
End; End;
Procedure ConvertMessageBases;
Var
MBase : RecMessageBase;
MBaseFile : File of RecMessageBase;
OldMBase : OldMBaseRec;
OldMBaseFile : File of OldMBaseRec;
Begin
WriteLn ('[-] Updating message bases...');
If Not ReNameFile(Config.DataPath + 'mbases.dat', Config.DataPath + 'mbases.old') Then Begin
WriteLn('[!] UNABLE TO FIND: ' + Config.DataPath + 'mbases.dat');
Exit;
End;
Assign (OldMBaseFile, Config.DataPath + 'mbases.old');
Reset (OldMBaseFile);
Assign (MBaseFile, Config.DataPath + 'mbases.dat');
ReWrite (MBaseFile);
While Not Eof(OldMBaseFile) Do Begin
Read (OldMBaseFile, OldMBase);
MBase.Name := OldMBase.Name;
MBase.QWKName := OldMBase.QwkName;
MBase.NewsName := '';
MBase.FileName := OldMBase.FileName;
MBase.Path := OldMBase.Path;
MBase.BaseType := OldMBase.BaseType;
MBase.NetType := OldMBase.NetType;
MBase.ListACS := OldMBase.ACS;
MBase.ReadACS := OldMBase.ReadACS;
MBase.PostACS := OldMBase.PostACS;
MBase.SysopACS := OldMBase.SysopACS;
MBase.Sponsor := '';
MBase.ColQuote := OldMBase.ColQuote;
MBase.ColText := OldMBase.ColText;
MBase.ColTear := OldMBase.ColTear;
MBase.ColOrigin := OldMBAse.ColOrigin;
MBase.ColKludge := 8;
MBase.NetAddr := OldMBase.NetAddr;
MBase.Origin := OldMBase.Origin;
MBase.DefNScan := OldMBase.DefNScan;
MBase.DefQScan := OldMBase.DefQScan;
MBase.MaxMsgs := OldMBase.MaxMsgs;
MBase.MaxAge := OldMBase.MaxAge;
MBase.Header := OldMBase.Header;
MBase.RTemplate := 'ansimrd';
MBase.ITemplate := 'ansimlst';
MBase.Index := OldMBase.Index;
MBase.Flags := 0;
If OldMBase.UseReal Then MBase.Flags := MBase.Flags or MBRealNames;
If OldMBase.PostType = 1 Then MBase.Flags := MBase.Flags or MBPrivate;
Write (MBaseFile, MBase);
End;
Close (MBaseFile);
Close (OldMBaseFile);
DeleteFile (Config.DataPath + 'mbases.old');
End;
Var Var
ConfigFile : File of RecConfig; ConfigFile : File of RecConfig;
Begin Begin
@ -1109,7 +1202,8 @@ Begin
// ConvertUsers; //1.10a11 // ConvertUsers; //1.10a11
//ConvertSecurity; //1.10a11 //ConvertSecurity; //1.10a11
//ConvertFileLists; //1.10a11 //ConvertFileLists; //1.10a11
ConvertFileBases; //1.10a11 //ConvertFileBases; //1.10a11
ConvertMessageBases; //1.10a11
// ConvertArchives; //1.10a1 // ConvertArchives; //1.10a1
// ConvertGroups; //1.10a1 // ConvertGroups; //1.10a1

View File

@ -3875,3 +3875,26 @@
+ Added Copy/Paste functions into all new ANSI internal editors. + Added Copy/Paste functions into all new ANSI internal editors.
+ Added new ANSI message group and file group editors. + Added new ANSI message group and file group editors.
- Removed Password protected file and message bases. This is a barely
used feature and it doesn't integrate well when the bases are available
via FTP and NTTP, etc. Security around bases needs to be based on the
ACS system to avoid issues in those situations.
Prompts 66, and 67 are no longer used.
Prompts 103 and 104 are no longer used.
+ Ansi message reader template is now configured on a per-base level just
as the standard reader template is.
+ Ansi message reader message index is now configured on a per-base level
just like the ansi reader template.
+ Message base ACS length has been extended to 30 characters.
+ Message base standard reader header filename has been expanded to 20
characters.
+ Message base path expanded to 80 characters from 40.
+ Added new ANSI message base editor.

View File

@ -46,8 +46,7 @@ Begin
Form.AddStr ('C', ' Comment ACS ' , 9, 14, 24, 14, 13, 30, 30, @FBase.CommentACS, Topic + 'ACS to comment and rate files'); Form.AddStr ('C', ' Comment ACS ' , 9, 14, 24, 14, 13, 30, 30, @FBase.CommentACS, Topic + 'ACS to comment and rate files');
Form.AddStr ('P', ' FTP ACS' , 13, 15, 24, 15, 9, 30, 30, @FBase.FTPACS, Topic + 'ACS to access via FTP'); Form.AddStr ('P', ' FTP ACS' , 13, 15, 24, 15, 9, 30, 30, @FBase.FTPACS, Topic + 'ACS to access via FTP');
Form.AddStr ('S', ' Sysop ACS ' , 11, 16, 24, 16, 11, 30, 30, @FBase.SysopACS, Topic + 'ACS for Sysop access'); Form.AddStr ('S', ' Sysop ACS ' , 11, 16, 24, 16, 11, 30, 30, @FBase.SysopACS, Topic + 'ACS for Sysop access');
Form.AddTog ('E', ' Default Scan' , 8, 17, 24, 17, 14, 6, 0, 2, 'No Yes Forced', @FBase.DefScan, Topic + 'Default scan setting'); Form.AddTog ('E', ' Default Scan' , 8, 17, 24, 17, 14, 6, 0, 2, 'No Yes Always', @FBase.DefScan, Topic + 'Default scan setting');
Form.AddPass ('A', ' Password' , 12, 18, 24, 18, 10, 20, 20, @FBase.Password, Topic + 'Base password (Blank/Disable)');
Form.AddPath ('I', ' File Path' , 11, 19, 24, 19, 11, 30, 120, @FBase.Path, Topic + 'Directory where files are stored'); Form.AddPath ('I', ' File Path' , 11, 19, 24, 19, 11, 30, 120, @FBase.Path, Topic + 'Directory where files are stored');
Form.AddBits ('R', ' Free Files' , 57, 7, 71, 7, 12, FBFreeFiles, @FBase.Flags, Topic + 'Files in base are free?'); Form.AddBits ('R', ' Free Files' , 57, 7, 71, 7, 12, FBFreeFiles, @FBase.Flags, Topic + 'Files in base are free?');

View File

@ -20,14 +20,14 @@ Uses
bbs_cfg_SysCfg, bbs_cfg_SysCfg,
bbs_cfg_Archive, bbs_cfg_Archive,
bbs_cfg_Protocol, bbs_cfg_Protocol,
bbs_cfg_FileBase,
bbs_cfg_MsgBase,
bbs_cfg_Groups,
//old editors to be rewritten //old editors to be rewritten
bbs_cfg_useredit, bbs_cfg_useredit,
bbs_cfg_groups,
bbs_cfg_events, bbs_cfg_events,
bbs_cfg_filebase,
bbs_cfg_language, bbs_cfg_language,
bbs_cfg_msgbase,
bbs_cfg_seclevel, bbs_cfg_seclevel,
bbs_cfg_vote, bbs_cfg_vote,
bbs_cfg_menuedit; bbs_cfg_menuedit;
@ -40,7 +40,10 @@ Begin
Case Mode of Case Mode of
'A' : Configuration_ArchiveEditor; 'A' : Configuration_ArchiveEditor;
'B' : Configuration_MessageBaseEditor;
'F' : Configuration_FileBaseEditor; 'F' : Configuration_FileBaseEditor;
'G' : Configuration_GroupEditor(True);
'R' : Configuration_GroupEditor(False);
'P' : Configuration_ProtocolEditor; 'P' : Configuration_ProtocolEditor;
End; End;
@ -74,11 +77,12 @@ End;
Procedure Configuration_MainMenu; Procedure Configuration_MainMenu;
Var Var
Form : TAnsiMenuForm; Form : TAnsiMenuForm;
Box : TAnsiMenuBox; Box : TAnsiMenuBox;
Image : TConsoleImageRec; Image : TConsoleImageRec;
MenuPos : Array[0..4] of Byte = (1, 1, 1, 1, 1); MenuPos : Array[0..4] of Byte = (1, 1, 1, 1, 1);
Res : Char; ThemeOld : LangRec;
Res : Char;
Procedure BoxOpen (X1, Y1, X2, Y2: Byte); Procedure BoxOpen (X1, Y1, X2, Y2: Byte);
Begin Begin
@ -120,8 +124,6 @@ Var
'U' : User_Editor(False, False); 'U' : User_Editor(False, False);
'M' : Menu_Editor; 'M' : Menu_Editor;
'T' : Lang_Editor; 'T' : Lang_Editor;
'B' : Message_Base_Editor;
'G',
'S' : Levels_Editor; 'S' : Levels_Editor;
'E' : Event_Editor; 'E' : Event_Editor;
'V' : Vote_Editor; 'V' : Vote_Editor;
@ -274,9 +276,17 @@ Begin
#75 : MenuPtr := 2; #75 : MenuPtr := 2;
#77 : MenuPtr := 4; #77 : MenuPtr := 4;
End; End;
End Else End Else Begin
ThemeOld := Session.Lang;
Session.Lang.FieldCol1 := 15 + 1 * 16;
Session.Lang.FieldCol2 := 9 + 1 * 16;
Session.Lang.FieldChar := 'm';
Session.Lang.EchoCh := '*';
Case Res of Case Res of
'A' : Configuration_ArchiveEditor; 'A' : Configuration_ArchiveEditor;
'B' : Configuration_MessageBaseEditor;
'F' : Configuration_FileBaseEditor; 'F' : Configuration_FileBaseEditor;
'G' : Configuration_GroupEditor(True); 'G' : Configuration_GroupEditor(True);
'P' : Configuration_ProtocolEditor; 'P' : Configuration_ProtocolEditor;
@ -284,7 +294,6 @@ Begin
'U', 'U',
'M', 'M',
'T', 'T',
'B',
'S', 'S',
'E', 'E',
'V' : ExecuteOldConfiguration(Res); 'V' : ExecuteOldConfiguration(Res);
@ -292,6 +301,9 @@ Begin
Else Else
MenuPtr := 0; MenuPtr := 0;
End; End;
Session.Lang := ThemeOld;
End;
End; End;
4 : Begin 4 : Begin
BoxOpen (54, 4, 64, 6); BoxOpen (54, 4, 64, 6);

View File

@ -4,233 +4,251 @@ Unit bbs_cfg_MsgBase;
Interface Interface
Procedure Message_Base_Editor; Procedure Configuration_MessageBaseEditor;
Implementation Implementation
Uses Uses
m_FileIO,
m_Strings, m_Strings,
bbs_Common, m_FileIO,
bbs_Core, bbs_Ansi_MenuBox,
bbs_User; bbs_Ansi_MenuForm,
bbs_Cfg_Common,
bbs_Cfg_SysCfg,
bbs_Common;
Procedure Message_Base_Editor;
Const
BT : Array[0..1] of String[6] = ('JAM', 'Squish');
NT : Array[0..3] of String[8] = ('Local ', 'EchoMail', 'UseNet ', 'NetMail ');
ST : Array[0..2] of String[6] = ('No', 'Yes', 'Always');
Var Var
A, MBaseFile : TBufFile;
B : Word; { was integer } MBase : RecMessageBase;
Procedure EditMessageBase;
Var
Box : TAnsiMenuBox;
Form : TAnsiMenuForm;
Topic : String;
Begin Begin
Session.SystemLog ('*MBASE EDITOR*'); Topic := '|03(|09Message Base Edit|03) |01-|09> |15';
Box := TAnsiMenuBox.Create;
Form := TAnsiMenuForm.Create;
Repeat Box.Header := ' Index ' + strI2S(MBase.Index) + ' ';
Session.io.AllowPause := True;
Session.io.OutFullLn ('|CL|14Message Base Editor|CR|CR|09### Name|$D37 Type Format|CR--- |$D40- ------- ------'); Box.Open (3, 5, 77, 21);
Reset (Session.Msgs.MBaseFile); VerticalLine (17, 6, 20);
While Not Eof(Session.Msgs.MBaseFile) Do Begin VerticalLine (66, 6, 20);
Read (Session.Msgs.MBaseFile, Session.Msgs.MBase);
Session.io.OutFullLn ('|15' + strPadR(strI2S(FilePos(Session.Msgs.MBaseFile) - 1), 3, ' ') + ' |14|$R41|MB|10' + Form.AddStr ('N', ' Name' , 11, 6, 19, 6, 6, 30, 40, @MBase.Name, Topic + 'Message base description');
NT[Session.Msgs.MBase.NetType] + ' ' + BT[Session.Msgs.MBase.BaseType]); Form.AddStr ('W', ' Newsgroup' , 6, 7, 19, 7, 11, 30, 60, @MBase.NewsName, Topic + 'Newsgroup name (Blank/Disabled)');
Form.AddStr ('Q', ' QWK Name' , 7, 8, 19, 8, 10, 13, 13, @MBase.QwkName, Topic + 'Qwk Short name');
Form.AddStr ('F', ' File Name' , 6, 9, 19, 9, 11, 30, 40, @MBase.FileName, Topic + 'Message base storage file name');
Form.AddPath ('P', ' Path' , 11, 10, 19, 10, 6, 30, 80, @MBase.Path, Topic + 'Message base storage path');
Form.AddStr ('L', ' List ACS' , 7, 11, 19, 11, 10, 30, 30, @MBase.ListACS, Topic + 'Access required to see in base list');
Form.AddStr ('R', ' Read ACS' , 7, 12, 19, 12, 10, 30, 30, @MBase.ReadACS, Topic + 'Access required to read messages');
Form.AddStr ('P', ' Post ACS' , 7, 13, 19, 13, 10, 30, 30, @MBase.PostACS, Topic + 'Access required to post messages');
Form.AddStr ('Y', ' Sysop ACS' , 6, 14, 19, 14, 11, 30, 30, @MBase.SysopACS, Topic + 'Access required for Sysop access');
Form.AddNone ('D', ' Net Address' , 4, 15, 13, Topic + 'NetMail Address');
Form.AddStr ('I', ' Origin' , 9, 16, 19, 16, 8, 30, 50, @MBase.Origin, Topic + 'Message base origin line');
Form.AddStr ('S', ' Sponsor' , 8, 17, 19, 17, 9, 30, 30, @MBase.Sponsor, Topic + 'User name of base''s sponser');
Form.AddStr ('H', ' Header' , 9, 18, 19, 18, 8, 20, 20, @MBase.Header, Topic + 'Display file name of msg header');
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');
If (Session.io.PausePtr = Session.User.ThisUser.ScreenSize) and (Session.io.AllowPause) Then Form.AddAttr ('Q', ' Quote Color' , 53, 6, 68, 6, 13, @MBase.ColQuote, Topic + 'Color for quoted text');
Case Session.io.MorePrompt of Form.AddAttr ('X', ' Text Color' , 54, 7, 68, 7, 12, @MBase.ColText, Topic + 'Color for message text');
'N' : Break; Form.AddAttr ('E', ' Tear Color' , 54, 8, 68, 8, 12, @MBase.ColTear, Topic + 'Color for tear line');
'C' : Session.io.AllowPause := False; Form.AddAttr ('G', ' Origin Color', 52, 9, 68, 9, 14, @MBase.ColOrigin, Topic + 'Color for origin line');
End; Form.AddAttr ('K', ' Kludge Color', 52, 10, 68, 10, 14, @MBase.ColKludge, Topic + 'Color for kludge line');
End; Form.AddWord ('M', ' Max Msgs' , 56, 11, 68, 11, 10, 5, 0, 65535, @MBase.MaxMsgs, Topic + 'Maximum number of message in base');
Session.io.OutFull ('|CR|09(I)nsert, (D)elete, (E)dit, (M)ove, (Q)uit? '); Form.AddWord ('1', ' Max Msg Age' , 53, 12, 68, 12, 13, 5, 0, 65535, @MBase.MaxAge, Topic + 'Maximum age (days) to keep messages');
case Session.io.OneKey (#13'DIEMQ', True) of Form.AddTog ('2', ' New Scan' , 56, 13, 68, 13, 10, 6, 0, 2, 'No Yes Forced', @MBase.DefNScan, Topic + 'Newscan default for users');
'D' : begin Form.AddTog ('3', ' QWK Scan' , 56, 14, 68, 14, 10, 6, 0, 2, 'No Yes Forced', @MBase.DefQScan, Topic + 'QWKscan default for users');
Session.io.OutFull ('Delete which? '); Form.AddBits ('4', ' Real Names' , 54, 15, 68, 15, 12, MBRealNames, @MBase.Flags, Topic + 'Use real names in this base?');
a := strS2I(Session.io.GetInput(3, 3, 11, '')); Form.AddBits ('5', ' Autosigs' , 56, 16, 68, 16, 10, MBAutoSigs, @MBase.Flags, Topic + 'Allow auto signatures in this base?');
If (A > 0) and (A <= FileSize(Session.Msgs.MBaseFile)) Then Begin Form.AddBits ('6', ' Kill Kludge' , 53, 17, 68, 17, 13, MBKillKludge, @MBase.Flags, Topic + 'Filter out kludge lines');
Seek (Session.Msgs.MBaseFile, A); Form.AddBits ('V', ' Private' , 57, 18, 68, 18, 9, MBPrivate, @MBase.Flags, Topic + 'Is this a private base?');
Read (Session.Msgs.MBaseFile, Session.Msgs.MBase); Form.AddTog ('A', ' Base Type' , 55, 19, 68, 19, 11, 9, 0, 3, 'Local EchoMail Newsgroup Netmail', @MBase.NetType, Topic + 'Message base type');
Form.AddTog ('B', ' Base Format' , 53, 20, 68, 20, 13, 6, 0, 1, 'JAM Squish', @MBase.BaseType, Topic + 'Message base storage format');
FileErase (config.msgspath + Session.Msgs.MBase.filename + '.jhr'); Repeat
FileErase (config.msgspath + Session.Msgs.MBase.filename + '.jlr'); WriteXY (19, 15, 113, strPadR(strAddr2Str(Config.NetAddress[MBase.NetAddr]), 19, ' '));
FileErase (config.msgspath + Session.Msgs.MBase.filename + '.jdt');
FileErase (config.msgspath + Session.Msgs.MBase.filename + '.jdx');
FileErase (config.msgspath + Session.Msgs.MBase.filename + '.sqd');
FileErase (config.msgspath + Session.Msgs.MBase.filename + '.sqi');
FileErase (config.msgspath + Session.Msgs.MBase.filename + '.sql');
KillRecord (Session.Msgs.MBaseFile, A+1, SizeOf(MBaseRec)); Case Form.Execute of
End; 'D' : MBase.NetAddr := Configuration_EchoMailAddress(False);
end; #27 : Break;
'I' : begin End;
Session.io.OutFull ('Insert before? (1-' + strI2S(filesize(Session.Msgs.MBaseFile)) + '): '); Until False;
a := strS2I(Session.io.GetInput(3, 3, 11, ''));
if (a > 0) and (a <= filesize(Session.Msgs.MBaseFile)) then begin
AddRecord (Session.Msgs.MBaseFile, A, SizeOf(Session.Msgs.MBaseFile));
{find permanent mbase index} Box.Close;
b := a + 1;
reset (Session.Msgs.MBaseFile);
while not eof(Session.Msgs.MBaseFile) do begin
read (Session.Msgs.MBaseFile, Session.Msgs.mbase);
if B = Session.Msgs.MBase.index then begin
inc (b);
reset (Session.Msgs.MBaseFile);
end;
end;
Session.Msgs.MBase.name := 'New Message Base';
Session.Msgs.MBase.qwkname := 'New Messages';
Session.Msgs.MBase.filename := 'NEW';
Session.Msgs.MBase.Path := config.msgspath;
Session.Msgs.MBase.nettype := 0;
Session.Msgs.MBase.posttype := 0;
Session.Msgs.MBase.acs := 's255';
Session.Msgs.MBase.readacs := 's255';
Session.Msgs.MBase.postacs := 's255';
Session.Msgs.MBase.sysopacs := 's255';
Session.Msgs.MBase.index := B;
Session.Msgs.MBase.netaddr := 1;
Session.Msgs.MBase.origin := config.origin;
Session.Msgs.MBase.usereal := false;
Session.Msgs.MBase.colquote := config.colorquote;
Session.Msgs.MBase.coltext := config.colortext;
Session.Msgs.MBase.coltear := config.colortear;
Session.Msgs.MBase.colorigin := config.colororigin;
Session.Msgs.MBase.defnscan := 1;
Session.Msgs.MBase.defqscan := 1;
Session.Msgs.MBase.basetype := 0;
seek (Session.Msgs.MBaseFile, a);
write (Session.Msgs.MBaseFile, Session.Msgs.mbase);
end;
end;
'E' : begin
Session.io.OutFull ('Edit which? ');
a := strS2I(Session.io.GetInput(3, 3, 11, ''));
if (a >= 0) and (a < filesize(Session.Msgs.MBaseFile)) then begin
seek (Session.Msgs.MBaseFile, a);
read (Session.Msgs.MBaseFile, Session.Msgs.mbase);
repeat
Session.io.OutFullLn ('|CL|14Message Base '+strI2S(FilePos(Session.Msgs.MBaseFile)-1)+' of '+strI2S(FileSize(Session.Msgs.MBaseFile)-1)+' |08[Perm Idx:' + strI2S(Session.Msgs.MBase.index) + ']|CR|03');
Session.io.OutRawln ('A. Name : ' + Session.Msgs.MBase.name);
Session.io.OutRawln ('B. QWK Name : ' + Session.Msgs.MBase.qwkname);
Session.io.OutRawln ('C. Filename : ' + Session.Msgs.MBase.filename);
Session.io.OutRawln ('D. Storage Path : ' + Session.Msgs.MBase.path);
Session.io.OutRaw ('E. Post Type : ');
If Session.Msgs.MBase.PostType = 0 Then Session.io.OutRaw ('Public ') Else Session.io.OutRaw ('Private');
Session.io.OutRawLn (strRep(' ', 23) + 'Y. Base Format : ' + BT[Session.Msgs.MBase.BaseType]);
Session.io.OutFull ('|CRF. List ACS : ' + strPadR(Session.Msgs.MBase.acs, 30, ' ')); Form.Free;
Session.io.OutFull ('O. Quote Color : '); Box.Free;
Session.io.AnsiColor(Session.Msgs.MBase.ColQuote); End;
Session.io.OutFullLn ('XX> Quote|03|16');
Session.io.OutRaw ('G. Read ACS : ' + strPadR(Session.Msgs.MBase.readacs, 30, ' ')); Procedure Configuration_MessageBaseEditor;
Session.io.OutFull ('P. Text Color : '); Var
Session.io.AnsiColor(Session.Msgs.MBase.ColText); Box : TAnsiMenuBox;
Session.io.OutFullLn ('Text|03|16'); List : TAnsiMenuList;
MIndex : LongInt;
Copied : RecMessageBase;
HasCopy : Boolean = False;
Session.io.OutRaw ('H. Post ACS : ' + strPadR(Session.Msgs.MBase.postacs, 30, ' ')); Procedure MakeList;
Session.io.OutFull ('R. Tear Color : '); Var
Session.io.AnsiColor(Session.Msgs.MBase.ColTear); Tag : Byte;
Session.io.OutFullLn ('--- Tear|03|16'); Begin
List.Clear;
Session.io.OutRaw ('I. Sysop ACS : ' + strPadR(Session.Msgs.MBase.sysopacs, 30, ' ')); MBaseFile.Reset;
Session.io.OutFull ('S. Origin Color : ');
Session.io.AnsiColor(Session.Msgs.MBase.ColOrigin);
Session.io.OutFullLn ('* Origin:|03|16');
Session.io.OutRaw ('J. Password : ' + strPadR(Session.Msgs.MBase.password, 30, ' ')); While Not MBaseFile.EOF Do Begin
Session.io.OutRawln ('T. Header File : ' + Session.Msgs.MBase.Header); If MBaseFile.FilePos = 0 Then Tag := 2 Else Tag := 0;
Session.io.OutRawLn ('K. Base Type : ' + NT[Session.Msgs.MBase.NetType]);
Session.io.OutRawln ('L. Net Address : ' + strAddr2Str(config.netaddress[Session.Msgs.MBase.netaddr]) + ' (' + Config.NetDesc[Session.Msgs.MBase.NetAddr] + ')');
Session.io.OutRawln ('M. Origin line : ' + Session.Msgs.MBase.origin);
Session.io.OutRawLn ('N. Use Realnames: ' + Session.io.OutYN(Session.Msgs.MBase.UseReal));
Session.io.OutFullLn ('|CRU. Default New Scan: ' + strPadR(ST[Session.Msgs.MBase.DefNScan], 27, ' ') + MBaseFile.Read (MBase);
'W. Max Messages : ' + strI2S(Session.Msgs.MBase.MaxMsgs));
Session.io.OutRawLn ('V. Default QWK Scan: ' + strPadR(ST[Session.Msgs.MBase.DefQScan], 27, ' ') + List.Add(strPadR(strI2S(MBaseFile.FilePos), 5, ' ') + ' ' + strStripMCI(MBase.Name), Tag);
'X. Max Msg Age : ' + strI2S(Session.Msgs.MBase.MaxAge) + ' days'); End;
Session.io.OutFull ('|CR|09([) Prev, (]) Next, (Q)uit: '); List.Add('', 2);
case Session.io.OneKey('[]ABCDEFGHIJKLMNOPQRSTUVWXY', True) of End;
'[' : If FilePos(Session.Msgs.MBaseFile) > 1 Then Begin
Seek (Session.Msgs.MBaseFile, FilePos(Session.Msgs.MBaseFile)-1);
Write (Session.Msgs.MBaseFile, Session.Msgs.MBase);
Seek (Session.Msgs.MBaseFile, FilePos(Session.Msgs.MBaseFile)-2);
Read (Session.Msgs.MBaseFile, Session.Msgs.MBase);
End;
']' : If FilePos(Session.Msgs.MBaseFile) < FileSize(Session.Msgs.MBaseFile) Then Begin
Seek (Session.Msgs.MBaseFile, FilePos(Session.Msgs.MBaseFile)-1);
Write (Session.Msgs.MBaseFile, Session.Msgs.MBase);
Read (Session.Msgs.MBaseFile, Session.Msgs.MBase);
End;
'A' : Session.Msgs.MBase.Name := Session.io.InXY(19, 3, 40, 40, 11, Session.Msgs.MBase.Name);
'B' : Session.Msgs.MBase.QwkName := Session.io.InXY(19, 4, 13, 13, 11, Session.Msgs.MBase.QwkName);
'C' : Session.Msgs.MBase.FileName := Session.io.InXY(19, 5, 40, 40, 11, Session.Msgs.MBase.filename);
'D' : Session.Msgs.MBase.Path := CheckPath(Session.io.InXY(19, 6, 39, 39, 11, Session.Msgs.MBase.Path));
'E' : If Session.Msgs.MBase.PostType = 0 Then Inc(Session.Msgs.MBase.PostType) Else Dec(Session.Msgs.MBase.PostType);
'F' : Session.Msgs.MBase.ACS := Session.io.InXY(19, 9, 20, 20, 11, Session.Msgs.MBase.acs);
'G' : Session.Msgs.MBase.ReadACS := Session.io.InXY(19, 10, 20, 20, 11, Session.Msgs.MBase.readacs);
'H' : Session.Msgs.MBase.PostACS := Session.io.InXY(19, 11, 20, 20, 11, Session.Msgs.MBase.postacs);
'I' : Session.Msgs.MBase.SysopACS := Session.io.InXY(19, 12, 20, 20, 11, Session.Msgs.MBase.sysopacs);
'J' : Session.Msgs.MBase.Password := Session.io.InXY(19, 13, 15, 15, 12, Session.Msgs.MBase.password);
'K' : If Session.Msgs.MBase.NetType < 3 Then Inc(Session.Msgs.MBase.NetType) Else Session.Msgs.MBase.NetType := 0;
'L' : begin
Session.io.OutFullLn ('|03');
For A := 1 to 30 Do Begin
Session.io.OutRaw (strPadR(strI2S(A) + '.', 5, ' ') + strPadR(strAddr2Str(Config.NetAddress[A]), 30, ' '));
If A Mod 2 = 0 then Session.io.OutRawLn('');
End;
Session.io.OutFull ('|CR|09Address: ');
a := strS2I(Session.io.GetInput(2, 2, 12, ''));
if (a > 0) and (a < 31) then Session.Msgs.MBase.netaddr := a;
end;
'M' : Session.Msgs.MBase.origin := Session.io.InXY(19, 16, 50, 50, 11, Session.Msgs.MBase.origin);
'N' : Session.Msgs.MBase.usereal := Not Session.Msgs.MBase.UseReal;
'O' : Session.Msgs.MBase.ColQuote := getColor(Session.Msgs.MBase.ColQuote);
'P' : Session.Msgs.MBase.ColText := getColor(Session.Msgs.MBase.ColText);
'R' : Session.Msgs.MBase.ColTear := getColor(Session.Msgs.MBase.ColTear);
'S' : Session.Msgs.MBase.ColOrigin := getColor(Session.Msgs.MBase.ColOrigin);
'T' : Session.Msgs.MBase.Header := Session.io.InXY(67, 13, 8, 8, 11, Session.Msgs.MBase.Header);
'U' : If Session.Msgs.MBase.DefNScan < 2 Then Inc(Session.Msgs.MBase.DefNScan) Else Session.Msgs.MBase.DefNScan := 0;
'V' : If Session.Msgs.MBase.DefQScan < 2 Then Inc(Session.Msgs.MBase.DefQScan) Else Session.Msgs.MBase.DefQScan := 0;
'W' : Session.Msgs.MBase.MaxMsgs := strS2I(Session.io.InXY(67, 19, 5, 5, 12, strI2S(Session.Msgs.MBase.MaxMsgs)));
'X' : Session.Msgs.MBase.MaxAge := strS2I(Session.io.InXY(67, 20, 5, 5, 12, strI2S(Session.Msgs.MBase.MaxAge)));
'Y' : If Session.Msgs.MBase.BaseType = 0 Then Session.Msgs.MBase.BaseType := 1 Else Session.Msgs.MBase.BaseType := 0;
'Q' : Break;
End;
Until False;
Seek (Session.Msgs.MBaseFile, FilePos(Session.Msgs.MBaseFile) - 1);
Write (Session.Msgs.MBaseFile, Session.Msgs.MBase);
End;
End;
'M' : Begin
Session.io.OutRaw ('Move which? ');
A := strS2I(Session.io.GetInput(3, 3, 12, ''));
Session.io.OutRaw ('Move before? (1-' + strI2S(FileSize(Session.Msgs.MBaseFile)) + '): '); Procedure AssignRecord (Email: Boolean);
B := strS2I(Session.io.GetInput(3, 3, 12, '')); Begin
MIndex := List.Picked;
If (A > 0) and (A <= FileSize(Session.Msgs.MBaseFile)) and (B > 0) and (B <= FileSize(Session.Msgs.MBaseFile)) Then Begin MBaseFile.Reset;
Seek (Session.Msgs.MBaseFile, A);
Read (Session.Msgs.MBaseFile, Session.Msgs.MBase);
AddRecord (Session.Msgs.MBaseFile, B+1, SizeOf(MBaseRec)); While Not MBaseFile.EOF Do Begin
Write (Session.Msgs.MBaseFile, Session.Msgs.MBase); MBaseFile.Read (MBase);
If A > B Then Inc(A); If MIndex = MBase.Index Then Begin
Inc (MIndex);
MBaseFile.Reset;
End;
End;
KillRecord (Session.Msgs.MBaseFile, A+1, SizeOf(MBaseRec)); MBaseFile.RecordInsert (List.Picked);
End;
End;
'Q' : break;
end;
until False; FillChar (MBase, SizeOf(RecMessageBase), 0);
close (Session.Msgs.MBaseFile);
end;
end. With MBase Do Begin
Index := MIndex;
FileName := 'new';
Path := Config.MsgsPath;
Name := 'New Base';
DefNScan := 1;
DefQScan := 1;
MaxMsgs := 500;
MaxAge := 365;
Header := 'msghead';
RTemplate := 'ansimrd';
ITemplate := 'ansimlst';
SysopACS := 's255';
NetAddr := 1;
ColQuote := Config.ColorQuote;
ColText := Config.ColorText;
ColTear := Config.ColorTear;
ColOrigin := Config.ColorOrigin;
ColKludge := Config.ColorKludge;
Flags := MBAutoSigs or MBKillKludge;
If Email Then Begin
FileName := 'email';
Name := 'Electronic Mail';
Index := 0;
Flags := Flags or MBPrivate;
End;
End;
MBaseFile.Write(MBase);
End;
Begin
MBaseFile := TBufFile.Create(4096);
If Not MBaseFile.Open(Config.DataPath + 'mbases.dat', fmOpenCreate, fmReadWrite + fmDenyNone, SizeOf(RecMessageBase)) Then Begin
MBaseFile.Free;
Exit;
End;
Box := TAnsiMenuBox.Create;
List := TAnsiMenuList.Create;
List.NoWindow := True;
List.LoChars := #13#27#47;
List.AllowTag := True;
If MBaseFile.FileSize = 0 Then AssignRecord(True);
Box.Open (15, 5, 65, 21);
WriteXY (17, 6, 112, '##### Message Base Description');
WriteXY (16, 7, 112, strRep('Ä', 49));
WriteXY (16, 19, 112, strRep('Ä', 49));
WriteXY (29, 20, 112, cfgCommandList);
Repeat
MakeList;
List.Open (15, 7, 65, 19);
List.Close;
Case List.ExitCode of
'/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of
'I' : If List.Picked > 1 Then Begin
AssignRecord(False);
MakeList;
End;
'D' : If (List.Picked > 1) and (List.Picked < List.ListMax) Then
If ShowMsgBox(1, 'Delete this entry?') Then Begin
MBaseFile.Seek (List.Picked - 1);
MBaseFile.Read (MBase);
MBaseFile.RecordDelete (List.Picked);
If ShowMsgBox(1, 'Delete data files?') Then Begin
FileErase (MBase.Path + MBase.FileName + '.jhr');
FileErase (MBase.Path + MBase.FileName + '.jlr');
FileErase (MBase.Path + MBase.FileName + '.jdt');
FileErase (MBase.Path + MBase.FileName + '.jdx');
FileErase (MBase.Path + MBase.FileName + '.sqd');
FileErase (MBase.Path + MBase.FileName + '.sqi');
FileErase (MBase.Path + MBase.FileName + '.sql');
FileErase (MBase.Path + MBase.FileName + '.scn');
End;
MakeList;
End;
'C' : If List.Picked <> List.ListMax Then Begin
MBaseFile.Seek (List.Picked - 1);
MBaseFile.Read (Copied);
HasCopy := True;
End;
'P' : If HasCopy Then Begin
MBaseFile.RecordInsert (List.Picked);
MBaseFile.Write (Copied);
MakeList;
End;
End;
#13 : If List.Picked < List.ListMax Then Begin
MBaseFile.Seek (List.Picked - 1);
MBaseFile.Read (MBase);
EditMessageBase;
MBaseFile.Seek (List.Picked - 1);
MBaseFile.Write (MBase);
End;
#27 : Break;
End;
Until False;
Box.Close;
MBaseFile.Free;
List.Free;
Box.Free;
End;
End.

View File

@ -1434,21 +1434,6 @@ Var
Old : RecFileBase; Old : RecFileBase;
Str : String[5]; Str : String[5];
Compress : Boolean; Compress : Boolean;
Function CheckPassword : Boolean;
Begin
CheckPassword := True;
If FBase.Password <> '' Then
If Not Session.io.GetPW(Session.GetPrompt(66), Session.GetPrompt(417), FBase.Password) Then Begin
Session.io.OutFullLn (Session.GetPrompt(67));
FBase := Old;
Close (FBaseFile);
CheckPassword := False;
Exit;
End;
End;
Begin Begin
Old := FBase; Old := FBase;
Compress := Config.FCompress; Compress := Config.FCompress;
@ -1472,7 +1457,6 @@ Begin
If IoResult <> 0 Then Break; If IoResult <> 0 Then Break;
If Session.User.Access(FBase.ListACS) Then Begin If Session.User.Access(FBase.ListACS) Then Begin
If Not CheckPassword Then Exit;
Session.User.ThisUser.LastFBase := FilePos(FBaseFile); Session.User.ThisUser.LastFBase := FilePos(FBaseFile);
Close (FBaseFile); Close (FBaseFile);
Exit; Exit;
@ -1494,7 +1478,6 @@ Begin
Read (FBaseFile, FBase); Read (FBaseFile, FBase);
If Session.User.Access(FBase.ListACS) Then Begin If Session.User.Access(FBase.ListACS) Then Begin
If Not CheckPassword Then Exit;
Session.User.ThisUser.LastFBase := FilePos(FBaseFile) Session.User.ThisUser.LastFBase := FilePos(FBaseFile)
End Else End Else
FBase := Old; FBase := Old;
@ -1555,8 +1538,6 @@ Begin
End; End;
End; End;
If Not CheckPassword Then Exit;
Session.User.ThisUser.LastFBase := FilePos(FBaseFile); Session.User.ThisUser.LastFBase := FilePos(FBaseFile);
Close (FBaseFile); Close (FBaseFile);

View File

@ -24,7 +24,7 @@ Type
TBBSIO = Class TBBSIO = Class
Core : Pointer; Core : Pointer;
Term : TTermAnsi; Term : TTermAnsi;
ScreenInfo : Array[0..9] of Record X, Y, A : Byte; End; ScreenInfo : Array[0..9] of Record X, Y, A : Byte; End;
PromptInfo : Array[1..MaxPromptInfo] of String[89]; PromptInfo : Array[1..MaxPromptInfo] of String[89];
FmtString : Boolean; FmtString : Boolean;
FmtLen : Byte; FmtLen : Byte;
@ -265,8 +265,8 @@ Begin
Ch := OneKey('YNC' + #13, False); Ch := OneKey('YNC' + #13, False);
OutBS(Screen.CursorX, True); OutBS (Screen.CursorX, True);
AnsiColor(SavedAttr); AnsiColor (SavedAttr);
PausePtr := 1; PausePtr := 1;
AllowMCI := SavedMCI; AllowMCI := SavedMCI;
@ -345,7 +345,9 @@ End;
Procedure TBBSIO.OutRaw (Str: String); Procedure TBBSIO.OutRaw (Str: String);
Begin Begin
If FmtString Then Begin If FmtString Then Begin
FmtString := False; FmtString := False;
Case FmtType of Case FmtType of
1 : Str := strPadR(Str, FmtLen, ' '); 1 : Str := strPadR(Str, FmtLen, ' ');
2 : Str := strPadL(Str, FmtLen, ' '); 2 : Str := strPadL(Str, FmtLen, ' ');
@ -1296,8 +1298,14 @@ Begin
Repeat Repeat
AnsiMoveX (X); AnsiMoveX (X);
If Yes Then OutFull (TBBSCore(Core).GetPrompt(316)) Else OutFull (TBBSCore(Core).GetPrompt(317));
If Yes Then
OutFull (TBBSCore(Core).GetPrompt(316))
Else
OutFull (TBBSCore(Core).GetPrompt(317));
Ch := UpCase(GetKey); Ch := UpCase(GetKey);
If IsArrow Then Begin If IsArrow Then Begin
If Ch = #77 Then Yes := False; If Ch = #77 Then Yes := False;
If Ch = #75 Then Yes := True; If Ch = #75 Then Yes := True;
@ -1306,14 +1314,18 @@ Begin
If Ch = #32 Then Yes := Not Yes Else If Ch = #32 Then Yes := Not Yes Else
If Ch = 'Y' Then Begin If Ch = 'Y' Then Begin
Yes := True; Yes := True;
AnsiMoveX(X);
OutFull (TBBSCore(Core).GetPrompt(316)); AnsiMoveX (X);
OutFull (TBBSCore(Core).GetPrompt(316));
Break; Break;
End Else End Else
If Ch = 'N' Then Begin If Ch = 'N' Then Begin
Yes := False; Yes := False;
AnsiMoveX (X); AnsiMoveX (X);
OutFull (TBBSCore(Core).GetPrompt(317)); OutFull (TBBSCore(Core).GetPrompt(317));
Break; Break;
End; End;
Until False; Until False;
@ -1321,7 +1333,7 @@ Begin
OutRawLn(''); OutRawLn('');
AllowArrow := Temp; AllowArrow := Temp;
GetYNL := Yes; Result := Yes;
End; End;
Function TBBSIO.GetYN (Str: String; Yes: Boolean) : Boolean; Function TBBSIO.GetYN (Str: String; Yes: Boolean) : Boolean;
@ -1340,7 +1352,7 @@ Begin
OutFullLn (OutYN(Yes)); OutFullLn (OutYN(Yes));
GetYN := Yes; Result := Yes;
End; End;
Function TBBSIO.GetPW (Str: String; BadStr: String; PW: String) : Boolean; Function TBBSIO.GetPW (Str: String; BadStr: String; PW: String) : Boolean;
@ -1404,7 +1416,7 @@ Function TBBSIO.GetInput (Field, Max, Mode: Byte; Default: String) : String;
Var Var
FieldCh : Char; FieldCh : Char;
Ch : Char; Ch : Char;
S : String; Str : String;
StrPos : Integer; StrPos : Integer;
xPos : Byte; xPos : Byte;
Junk : Integer; Junk : Integer;
@ -1415,7 +1427,7 @@ Var
Procedure pWrite (Str : String); Procedure pWrite (Str : String);
Begin Begin
If (Mode = 6) and (S <> '') Then If (Mode = 6) and (Str <> '') Then
BufAddStr (strRep(TBBSCore(Core).Lang.EchoCh, Length(Str))) BufAddStr (strRep(TBBSCore(Core).Lang.EchoCh, Length(Str)))
Else Else
BufAddStr (Str); BufAddStr (Str);
@ -1425,9 +1437,9 @@ Var
Begin Begin
AnsiMoveX (xPos); AnsiMoveX (xPos);
pWrite (Copy(S, Junk, Field)); pWrite (Copy(Str, Junk, Field));
If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol2); If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol2);
pWrite (strRep(FieldCh, Field - Length(Copy(S, Junk, Field)))); pWrite (strRep(FieldCh, Field - Length(Copy(Str, Junk, Field))));
If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol1); If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol1);
AnsiMoveX (xPos + CurPos - 1); AnsiMoveX (xPos + CurPos - 1);
@ -1435,9 +1447,9 @@ Var
Procedure ReDrawPart; Procedure ReDrawPart;
Begin Begin
pWrite (Copy(S, StrPos, Field - CurPos + 1)); pWrite (Copy(Str, StrPos, Field - CurPos + 1));
If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol2); If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol2);
pWrite (strRep(FieldCh, (Field - CurPos + 1) - Length(Copy(S, StrPos, Field - CurPos + 1)))); pWrite (strRep(FieldCh, (Field - CurPos + 1) - Length(Copy(Str, StrPos, Field - CurPos + 1))));
If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol1); If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol1);
AnsiMoveX (xPos + CurPos - 1); AnsiMoveX (xPos + CurPos - 1);
@ -1446,7 +1458,7 @@ Var
Procedure ScrollRight; Procedure ScrollRight;
Begin Begin
Inc (Junk, Field DIV 2); {scroll size} Inc (Junk, Field DIV 2); {scroll size}
If Junk > Length(S) Then Junk := Length(S); If Junk > Length(Str) Then Junk := Length(Str);
If Junk > Max Then Junk := Max; If Junk > Max Then Junk := Max;
CurPos := StrPos - Junk + 1; CurPos := StrPos - Junk + 1;
ReDraw; ReDraw;
@ -1464,8 +1476,8 @@ Var
Begin Begin
If CurPos > Field then ScrollRight; If CurPos > Field then ScrollRight;
Insert (Ch, S, StrPos); Insert (Ch, Str, StrPos);
If StrPos < Length(S) Then ReDrawPart; If StrPos < Length(Str) Then ReDrawPart;
Inc (StrPos); Inc (StrPos);
Inc (CurPos); Inc (CurPos);
@ -1496,6 +1508,7 @@ Begin
If UseInField and (Graphics = 1) Then Begin If UseInField and (Graphics = 1) Then Begin
FieldCh := TBBSCore(Core).Lang.FieldChar; FieldCh := TBBSCore(Core).Lang.FieldChar;
AnsiColor (TBBSCore(Core).Lang.FieldCol2); AnsiColor (TBBSCore(Core).Lang.FieldCol2);
BufAddStr (strRep(FieldCh, Field)); BufAddStr (strRep(FieldCh, Field));
AnsiColor (TBBSCore(Core).Lang.FieldCol1); AnsiColor (TBBSCore(Core).Lang.FieldCol1);
@ -1517,12 +1530,15 @@ Begin
AllowArrow := (Mode in [1..3, 7..9]) and (Graphics > 0); AllowArrow := (Mode in [1..3, 7..9]) and (Graphics > 0);
BackPos := 0; BackPos := 0;
S := Default; Str := Default;
StrPos := Length(S) + 1; StrPos := Length(Str) + 1;
Junk := StrPos - Field; Junk := StrPos - Field;
If Junk < 1 Then Junk := 1; If Junk < 1 Then Junk := 1;
CurPos := StrPos - Junk + 1; CurPos := StrPos - Junk + 1;
pWrite (Copy(S, Junk, Field));
PWrite (Copy(Str, Junk, Field));
PurgeInputBuffer; PurgeInputBuffer;
@ -1540,10 +1556,10 @@ Begin
#72 : If (BackPos < mysMaxInputHistory) And (BackPos < InputPos) Then Begin #72 : If (BackPos < mysMaxInputHistory) And (BackPos < InputPos) Then Begin
Inc (BackPos); Inc (BackPos);
If BackPos = 1 Then BackSaved := S; If BackPos = 1 Then BackSaved := Str;
S := InputData[BackPos]; Str := InputData[BackPos];
StrPos := Length(S) + 1; StrPos := Length(Str) + 1;
Junk := StrPos - Field; Junk := StrPos - Field;
If Junk < 1 Then Junk := 1; If Junk < 1 Then Junk := 1;
CurPos := StrPos - Junk + 1; CurPos := StrPos - Junk + 1;
@ -1556,14 +1572,14 @@ Begin
If CurPos < 1 then CurPos := 1; If CurPos < 1 then CurPos := 1;
AnsiMoveX (Screen.CursorX - 1); AnsiMoveX (Screen.CursorX - 1);
End; End;
#77 : If StrPos < Length(S) + 1 Then Begin #77 : If StrPos < Length(Str) + 1 Then Begin
If (CurPos = Field) and (StrPos < Length(S)) Then ScrollRight; If (CurPos = Field) and (StrPos < Length(Str)) Then ScrollRight;
Inc (CurPos); Inc (CurPos);
Inc (StrPos); Inc (StrPos);
AnsiMoveX (Screen.CursorX + 1); AnsiMoveX (Screen.CursorX + 1);
End; End;
#79 : Begin #79 : Begin
StrPos := Length(S) + 1; StrPos := Length(Str) + 1;
Junk := StrPos - Field; Junk := StrPos - Field;
If Junk < 1 Then Junk := 1; If Junk < 1 Then Junk := 1;
CurPos := StrPos - Junk + 1; CurPos := StrPos - Junk + 1;
@ -1573,18 +1589,18 @@ Begin
Dec (BackPos); Dec (BackPos);
If BackPos = 0 Then If BackPos = 0 Then
S := BackSaved Str := BackSaved
Else Else
S := InputData[BackPos]; Str := InputData[BackPos];
StrPos := Length(S) + 1; StrPos := Length(Str) + 1;
Junk := StrPos - Field; Junk := StrPos - Field;
If Junk < 1 Then Junk := 1; If Junk < 1 Then Junk := 1;
CurPos := StrPos - Junk + 1; CurPos := StrPos - Junk + 1;
ReDraw; ReDraw;
End; End;
#83 : If (StrPos <= Length(S)) and (Length(S) > 0) Then Begin #83 : If (StrPos <= Length(Str)) and (Length(Str) > 0) Then Begin
Delete(S, StrPos, 1); Delete(Str, StrPos, 1);
ReDrawPart; ReDrawPart;
End; End;
End; End;
@ -1593,12 +1609,12 @@ Begin
#02 : ReDraw; #02 : ReDraw;
#08 : If StrPos > 1 Then Begin #08 : If StrPos > 1 Then Begin
Dec (StrPos); Dec (StrPos);
Delete (S, StrPos, 1); Delete (Str, StrPos, 1);
If CurPos = 1 Then If CurPos = 1 Then
ScrollLeft ScrollLeft
Else Else
If StrPos = Length(S) + 1 Then Begin If StrPos = Length(Str) + 1 Then Begin
If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol2); If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol2);
BufAddStr (#8 + FieldCh + #8); BufAddStr (#8 + FieldCh + #8);
If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol1); If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol1);
@ -1611,19 +1627,19 @@ Begin
End; End;
#13 : Break; #13 : Break;
^Y : Begin ^Y : Begin
S := ''; Str := '';
StrPos := 1; StrPos := 1;
Junk := 1; Junk := 1;
CurPos := 1; CurPos := 1;
ReDraw; ReDraw;
End; End;
#32.. #32..
#254: If Length(S) < Max Then #254: If Length(Str) < Max Then
Case Mode of Case Mode of
1 : AddChar (Ch); 1 : AddChar (Ch);
2 : AddChar (UpCase(Ch)); 2 : AddChar (UpCase(Ch));
3 : Begin 3 : Begin
If (CurPos = 1) or (S[StrPos-1] in [' ', '.']) Then If (CurPos = 1) or (Str[StrPos-1] in [' ', '.']) Then
Ch := UpCase(Ch) Ch := UpCase(Ch)
Else Else
Ch := LoCase(Ch); Ch := LoCase(Ch);
@ -1667,7 +1683,7 @@ Begin
For Junk := 4 DownTo 2 Do For Junk := 4 DownTo 2 Do
InputData[Junk] := InputData[Junk - 1]; InputData[Junk] := InputData[Junk - 1];
InputData[1] := S; InputData[1] := Str;
If InputPos < mysMaxInputHistory Then Inc(InputPos); If InputPos < mysMaxInputHistory Then Inc(InputPos);
End; End;
@ -1680,15 +1696,15 @@ Begin
Case Mode of Case Mode of
5 : Case TBBSCore(Core).User.ThisUser.DateType of { Convert to MM/DD/YY } 5 : Case TBBSCore(Core).User.ThisUser.DateType of { Convert to MM/DD/YY }
{DD/MM/YY} {DD/MM/YY}
2 : S := Copy(S, 4, 2) + '/' + Copy(S, 1, 2) + '/' + Copy(S, 7, 2); 2 : Str := Copy(Str, 4, 2) + '/' + Copy(Str, 1, 2) + '/' + Copy(Str, 7, 2);
{YY/DD/MM} {YY/DD/MM}
3 : S := Copy(S, 7, 2) + '/' + Copy(S, 4, 2) + '/' + Copy(S, 1, 2); 3 : Str := Copy(Str, 7, 2) + '/' + Copy(Str, 4, 2) + '/' + Copy(Str, 1, 2);
End; End;
End; End;
UseInField := True; UseInField := True;
AllowArrow := ArrowSave; AllowArrow := ArrowSave;
GetInput := S; Result := Str;
End; End;
Function TBBSIO.InXY (X, Y, Field, Max, Mode: Byte; Default: String) : String; Function TBBSIO.InXY (X, Y, Field, Max, Mode: Byte; Default: String) : String;

View File

@ -320,7 +320,7 @@ Begin
'F' : Configuration_ExecuteEditor('F'); 'F' : Configuration_ExecuteEditor('F');
'G' : Configuration_ExecuteEditor('G'); 'G' : Configuration_ExecuteEditor('G');
'L' : Levels_Editor; 'L' : Levels_Editor;
'M' : Message_Base_Editor; 'M' : Configuration_ExecuteEditor('B');
'P' : Configuration_ExecuteEditor('P'); 'P' : Configuration_ExecuteEditor('P');
'S' : Configuration_MainMenu; 'S' : Configuration_MainMenu;
'U' : User_Editor(False, False); 'U' : User_Editor(False, False);

View File

@ -15,13 +15,13 @@ Uses
Type Type
TMsgBase = Class TMsgBase = Class
MBaseFile : File of MBaseRec; MBaseFile : File of RecMessageBase;
MScanFile : File of MScanRec; MScanFile : File of MScanRec;
GroupFile : File of RecGroup; GroupFile : File of RecGroup;
TotalMsgs : Integer; TotalMsgs : Integer;
TotalConf : Integer; TotalConf : Integer;
MsgBase : PMsgBaseABS; MsgBase : PMsgBaseABS;
MBase : MBaseRec; MBase : RecMessageBase;
MScan : MScanRec; MScan : MScanRec;
Group : RecGroup; Group : RecGroup;
MsgText : RecMessageText; MsgText : RecMessageText;
@ -31,12 +31,12 @@ Type
Constructor Create (Var Owner: Pointer); Constructor Create (Var Owner: Pointer);
Destructor Destroy; Override; Destructor Destroy; Override;
Function OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: MBaseRec) : Boolean; Function OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean;
Procedure AppendMessageText (Var Msg: PMsgBaseABS; Lines: Integer; ReplyID: String); Procedure AppendMessageText (Var Msg: PMsgBaseABS; Lines: Integer; ReplyID: String);
Procedure AssignMessageData (Var Msg: PMsgBaseABS); Procedure AssignMessageData (Var Msg: PMsgBaseABS);
Function GetTotalMessages (Var TempBase: MBaseRec) : LongInt; Function GetTotalMessages (Var TempBase: RecMessageBase) : LongInt;
Procedure PostTextFile (Data: String; AllowCodes: Boolean); Procedure PostTextFile (Data: String; AllowCodes: Boolean);
Function SaveMessage (mArea: MBaseRec; mFrom, mTo, mSubj: String; mAddr: RecEchoMailAddr; mLines: Integer) : Boolean; Function SaveMessage (mArea: RecMessageBase; mFrom, mTo, mSubj: String; mAddr: RecEchoMailAddr; mLines: Integer) : Boolean;
Function ListAreas (Compress: Boolean) : Integer; Function ListAreas (Compress: Boolean) : Integer;
Procedure ChangeArea (Data: String); Procedure ChangeArea (Data: String);
Procedure SetMessageScan; Procedure SetMessageScan;
@ -58,7 +58,7 @@ Type
Procedure UploadREP; Procedure UploadREP;
Procedure WriteCONTROLDAT; Procedure WriteCONTROLDAT;
Function WriteMSGDAT : LongInt; Function WriteMSGDAT : LongInt;
Function ResolveOrigin (var mArea: MBaseRec) : String; Function ResolveOrigin (var mArea: RecMessageBase) : String;
End; End;
Implementation Implementation
@ -110,7 +110,7 @@ Begin
Inherited Destroy; Inherited Destroy;
End; End;
Function TMsgBase.OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: MBaseRec) : Boolean; Function TMsgBase.OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean;
Begin Begin
Result := False; Result := False;
@ -135,7 +135,7 @@ Begin
Result := True; Result := True;
End; End;
Function TMsgBase.GetTotalMessages (Var TempBase: MBaseRec) : LongInt; Function TMsgBase.GetTotalMessages (Var TempBase: RecMessageBase) : LongInt;
Var Var
TempMsg : PMsgBaseABS; TempMsg : PMsgBaseABS;
Begin Begin
@ -241,7 +241,7 @@ Var
Begin Begin
Msg^.StartNewMsg; Msg^.StartNewMsg;
If MBase.UseReal Then If MBase.Flags And MBRealNames <> 0 Then
Msg^.SetFrom(Session.User.ThisUser.RealName) Msg^.SetFrom(Session.User.ThisUser.RealName)
Else Else
Msg^.SetFrom(Session.User.ThisUser.Handle); Msg^.SetFrom(Session.User.ThisUser.Handle);
@ -279,33 +279,18 @@ Begin
End Else End Else
Msg^.SetMailType(mmtNormal); Msg^.SetMailType(mmtNormal);
Msg^.SetPriv(MBase.PostType = 1); Msg^.SetPriv (MBase.Flags and MBPrivate <> 0);
Msg^.SetDate(DateDos2Str(CurDateDos, 1)); Msg^.SetDate (DateDos2Str(CurDateDos, 1));
Msg^.SetTime(TimeDos2Str(CurDateDos, False)); Msg^.SetTime (TimeDos2Str(CurDateDos, False));
End; End;
Procedure TMsgBase.ChangeArea (Data: String); Procedure TMsgBase.ChangeArea (Data: String);
Var Var
A, A,
Total : Word; Total : Word;
Old : MBaseRec; Old : RecMessageBase;
Str : String[5]; Str : String[5];
Compress : Boolean; Compress : Boolean;
Function CheckPassword : Boolean;
Begin
CheckPassword := True;
If MBase.Password <> '' Then
If Not Session.io.GetPW(Session.GetPrompt(103), Session.GetPrompt(417), MBase.Password) Then Begin
Session.io.OutFullLn (Session.GetPrompt(67));
MBase := Old;
Close (MBaseFile);
CheckPassword := False;
Exit;
End;
End;
Begin Begin
Compress := Config.MCompress; Compress := Config.MCompress;
Old := MBase; Old := MBase;
@ -328,8 +313,7 @@ Begin
If IoResult <> 0 Then Break; If IoResult <> 0 Then Break;
If Session.User.Access(MBase.ACS) Then Begin If Session.User.Access(MBase.ListACS) Then Begin
If Not CheckPassword Then Break;
Session.User.ThisUser.LastMBase := FilePos(MBaseFile); Session.User.ThisUser.LastMBase := FilePos(MBaseFile);
Close (MBaseFile); Close (MBaseFile);
Exit; Exit;
@ -349,8 +333,7 @@ Begin
If A <= FileSize(MBaseFile) Then Begin If A <= FileSize(MBaseFile) Then Begin
Seek (MBaseFile, A-1); Seek (MBaseFile, A-1);
Read (MBaseFile, MBase); Read (MBaseFile, MBase);
If Session.User.Access(MBase.ACS) Then Begin If Session.User.Access(MBase.ListACS) Then Begin
If Not CheckPassword Then Exit;
Session.User.ThisUser.LastMBase := FilePos(MBaseFile) Session.User.ThisUser.LastMBase := FilePos(MBaseFile)
End Else End Else
MBase := Old; MBase := Old;
@ -389,7 +372,7 @@ Begin
If Not Compress Then Begin If Not Compress Then Begin
Seek (MBaseFile, A - 1); Seek (MBaseFile, A - 1);
Read (MBaseFile, MBase); Read (MBaseFile, MBase);
If Not Session.User.Access(MBase.ACS) Then Begin If Not Session.User.Access(MBase.ListACS) Then Begin
MBase := Old; MBase := Old;
Close (MBaseFile); Close (MBaseFile);
Exit; Exit;
@ -399,7 +382,7 @@ Begin
While Not Eof(MBaseFile) And (A <> Total) Do Begin While Not Eof(MBaseFile) And (A <> Total) Do Begin
Read (MBaseFile, MBase); Read (MBaseFile, MBase);
If Session.User.Access(MBase.ACS) Then Inc(Total); If Session.User.Access(MBase.ListACS) Then Inc(Total);
End; End;
If A <> Total Then Begin If A <> Total Then Begin
@ -409,8 +392,6 @@ Begin
End; End;
End; End;
If Not CheckPassword Then Exit;
Session.User.ThisUser.LastMBase := FilePos(MBaseFile); Session.User.ThisUser.LastMBase := FilePos(MBaseFile);
Close (MBaseFile); Close (MBaseFile);
@ -442,7 +423,7 @@ Var
While Not Eof(MBaseFile) Do Begin While Not Eof(MBaseFile) Do Begin
Read (MBaseFile, MBase); Read (MBaseFile, MBase);
If Session.User.Access(MBase.ACS) Then Begin If Session.User.Access(MBase.ListACS) Then Begin
Inc (Total); Inc (Total);
Session.io.PromptInfo[1] := strI2S(Total); Session.io.PromptInfo[1] := strI2S(Total);
@ -482,7 +463,7 @@ Var
Repeat Repeat
Read (MBaseFile, MBase); Read (MBaseFile, MBase);
If Session.User.Access(MBase.ACS) Then Inc(B); If Session.User.Access(MBase.ListACS) Then Inc(B);
If A = B Then Break; If A = B Then Break;
Until False; Until False;
@ -520,7 +501,7 @@ Var
End; End;
Var Var
Old : MBaseRec; Old : RecMessageBase;
Temp : String[11]; Temp : String[11];
A : Word; A : Word;
N1 : Word; N1 : Word;
@ -565,7 +546,7 @@ Var
A : Word; A : Word;
Total : Word; Total : Word;
tGroup : RecGroup; tGroup : RecGroup;
tMBase : MBaseRec; tMBase : RecMessageBase;
tLast : Word; tLast : Word;
Areas : Word; Areas : Word;
Data : Word; Data : Word;
@ -661,7 +642,7 @@ Begin
Read (MBaseFile, tMBase); { Skip EMAIL base } Read (MBaseFile, tMBase); { Skip EMAIL base }
While Not Eof(MBaseFile) Do Begin While Not Eof(MBaseFile) Do Begin
Read (MBaseFile, tMBase); Read (MBaseFile, tMBase);
If Session.User.Access(tMBase.ACS) Then Inc(Areas); If Session.User.Access(tMBase.ListACS) Then Inc(Areas);
End; End;
Close (MBaseFile); Close (MBaseFile);
End; End;
@ -720,7 +701,7 @@ Function TMsgBase.ListAreas (Compress: Boolean) : Integer;
Var Var
Total : Word = 0; Total : Word = 0;
Listed : Word = 0; Listed : Word = 0;
TempBase : MBaseRec; TempBase : RecMessageBase;
Begin Begin
Reset (MBaseFile); Reset (MBaseFile);
@ -730,7 +711,7 @@ Begin
While Not Eof(MBaseFile) Do Begin While Not Eof(MBaseFile) Do Begin
Read (MBaseFile, TempBase); Read (MBaseFile, TempBase);
If Session.User.Access(TempBase.ACS) Then Begin If Session.User.Access(TempBase.ListACS) Then Begin
Inc (Listed); Inc (Listed);
If Listed = 1 Then If Listed = 1 Then
@ -983,9 +964,10 @@ Begin
MsgBase^.SetDest(DestAddr) MsgBase^.SetDest(DestAddr)
End; End;
End Else End Else
If MBase.PostType = 1 Then Begin If MBase.Flags And MBPrivate <> 0 Then Begin
Temp1 := Session.io.GetInput (30, 30, 11, MsgBase^.GetTo); Temp1 := Session.io.GetInput (30, 30, 11, MsgBase^.GetTo);
If Session.User.SearchUser(Temp1, MBase.UseReal) Then
If Session.User.SearchUser(Temp1, MBase.Flags and MBRealNames <> 0) Then
MsgBase^.SetTo(Temp1); MsgBase^.SetTo(Temp1);
End Else End Else
MsgBase^.SetTo(Session.io.GetInput(30, 30, 11, MsgBase^.GetTo)); MsgBase^.SetTo(Session.io.GetInput(30, 30, 11, MsgBase^.GetTo));
@ -1095,7 +1077,7 @@ Var
Var Var
MsgNew : PMsgBaseABS; MsgNew : PMsgBaseABS;
Str : String; Str : String;
TempBase : MBaseRec; TempBase : RecMessageBase;
Area : Integer; Area : Integer;
Addr : RecEchoMailAddr; Addr : RecEchoMailAddr;
Begin Begin
@ -2222,7 +2204,7 @@ Begin
If Mode = 'E' Then If Mode = 'E' Then
ScanMode := 1 ScanMode := 1
Else Else
If (MBase.PostType = 1) or (Mode = 'Y') or (Mode = 'P') Then If (MBase.Flags and MBPrivate <> 0) or (Mode = 'Y') or (Mode = 'P') Then
ScanMode := 2 ScanMode := 2
Else Else
If (Mode = 'S') or (Mode = 'T') Then If (Mode = 'S') or (Mode = 'T') Then
@ -2298,7 +2280,7 @@ Var
A : Integer; A : Integer;
Lines : Integer; Lines : Integer;
Forced : Boolean; Forced : Boolean;
Old : MBaseRec; Old : RecMessageBase;
Begin Begin
Old := MBase; Old := MBase;
@ -2358,11 +2340,11 @@ Begin
If Not strStr2Addr(MsgAddr, DestAddr) Then MsgTo := ''; If Not strStr2Addr(MsgAddr, DestAddr) Then MsgTo := '';
End; End;
End Else End Else
If MBase.PostType = 1 Then Begin { if the base is flagged private } If MBase.Flags and MBPrivate <> 0 Then Begin
If MsgTo = '' Then Begin If MsgTo = '' Then Begin
Session.io.OutFull (Session.GetPrompt(450)); Session.io.OutFull (Session.GetPrompt(450));
MsgTo := Session.io.GetInput (30, 30, 18, ''); MsgTo := Session.io.GetInput (30, 30, 18, '');
If Not Session.User.SearchUser(MsgTo, MBase.UseReal) Then MsgTo := ''; If Not Session.User.SearchUser(MsgTo, MBase.Flags and MBRealNames <> 0) Then MsgTo := '';
End Else End Else
If strUpper(MsgTo) = 'SYSOP' Then MsgTo := Config.SysopName; If strUpper(MsgTo) = 'SYSOP' Then MsgTo := Config.SysopName;
@ -2466,7 +2448,7 @@ End;
Procedure TMsgBase.CheckEMail; Procedure TMsgBase.CheckEMail;
Var Var
Old : MBaseRec; Old : RecMessageBase;
Total : Integer; Total : Integer;
Begin Begin
Session.io.OutFull (Session.GetPrompt(123)); Session.io.OutFull (Session.GetPrompt(123));
@ -2589,7 +2571,7 @@ Begin
Session.io.OutFullLn (Session.GetPrompt(460)); Session.io.OutFullLn (Session.GetPrompt(460));
If Global Then Begin If Global Then Begin
ioReset (MBaseFile, SizeOf(MBaseRec), fmRWDN); ioReset (MBaseFile, SizeOf(RecMessageBase), fmRWDN);
ioRead (MBaseFile, MBase); ioRead (MBaseFile, MBase);
While Not Eof(MBaseFile) Do Begin While Not Eof(MBaseFile) Do Begin
@ -2606,7 +2588,7 @@ Procedure TMsgBase.MessageNewScan (Data : String);
{ /M : scan only mandatory bases } { /M : scan only mandatory bases }
{ /G : scan all bases in all groups } { /G : scan all bases in all groups }
Var Var
Old : MBaseRec; Old : RecMessageBase;
Mode : Char; Mode : Char;
Mand : Boolean; Mand : Boolean;
Begin Begin
@ -2669,7 +2651,7 @@ Procedure TMsgBase.GlobalMessageSearch (Mode : Char);
{ A = all areas in all groups } { A = all areas in all groups }
Var Var
SearchStr : String; SearchStr : String;
Old : MBaseRec; Old : RecMessageBase;
Begin Begin
If Not (Mode in ['A', 'C', 'G']) Then Mode := 'G'; If Not (Mode in ['A', 'C', 'G']) Then Mode := 'G';
@ -2728,7 +2710,7 @@ Var
MsgTo : String[30]; MsgTo : String[30];
MsgSubj : String[60]; MsgSubj : String[60];
Lines : Integer; Lines : Integer;
Old : MBaseRec; Old : RecMessageBase;
OldUser : RecUser; OldUser : RecUser;
Procedure Write_Mass_Msg; Procedure Write_Mass_Msg;
@ -2789,7 +2771,7 @@ Begin
Session.io.OutFull (Session.GetPrompt(390)); Session.io.OutFull (Session.GetPrompt(390));
Str := Session.io.GetInput (30, 30, 18, ''); Str := Session.io.GetInput (30, 30, 18, '');
If Str <> '' Then Begin If Str <> '' Then Begin
If Session.User.SearchUser(Str, MBase.UseReal) Then Begin If Session.User.SearchUser(Str, MBase.Flags And MBRealNames <> 0) Then Begin
Inc (NamePos); Inc (NamePos);
Names[NamePos] := Str; Names[NamePos] := Str;
End; End;
@ -2890,7 +2872,7 @@ End;
Procedure TMsgBase.ViewSentEmail; Procedure TMsgBase.ViewSentEmail;
Var Var
Old : MBaseRec; Old : RecMessageBase;
Begin Begin
Old := MBase; Old := MBase;
@ -3119,7 +3101,7 @@ End;
Procedure TMsgBase.UploadREP; Procedure TMsgBase.UploadREP;
Var Var
DataFile : File; DataFile : File;
OldMBase : MBaseRec; OldMBase : RecMessageBase;
QwkHdr : QwkDATHdr; QwkHdr : QwkDATHdr;
Temp : String[128]; Temp : String[128];
A : SmallInt; A : SmallInt;
@ -3238,7 +3220,7 @@ Type
Pos : LongInt; Pos : LongInt;
End; End;
Var Var
Old : MBaseRec; Old : RecMessageBase;
DataFile : File; DataFile : File;
Temp : String; Temp : String;
QwkLR : QwkLRRec; QwkLR : QwkLRRec;
@ -3459,7 +3441,7 @@ Begin
End; End;
*) *)
Function TMsgBase.SaveMessage (mArea: MBaseRec; mFrom, mTo, mSubj: String; mAddr: RecEchoMailAddr; mLines: Integer) : Boolean; Function TMsgBase.SaveMessage (mArea: RecMessageBase; mFrom, mTo, mSubj: String; mAddr: RecEchoMailAddr; mLines: Integer) : Boolean;
Var Var
SemFile : File; SemFile : File;
Count : SmallInt; Count : SmallInt;
@ -3498,7 +3480,7 @@ Begin
End Else End Else
Msg^.SetMailType (mmtNormal); Msg^.SetMailType (mmtNormal);
Msg^.SetPriv (mArea.PostType = 1); Msg^.SetPriv (mArea.Flags And MBPrivate <> 0);
Msg^.SetDate (DateDos2Str(CurDateDos, 1)); Msg^.SetDate (DateDos2Str(CurDateDos, 1));
Msg^.SetTime (TimeDos2Str(CurDateDos, False)); Msg^.SetTime (TimeDos2Str(CurDateDos, False));
Msg^.SetFrom (mFrom); Msg^.SetFrom (mFrom);
@ -3541,7 +3523,7 @@ Var
Pages : Integer; Pages : Integer;
Count : Integer; Count : Integer;
Offset : Integer; Offset : Integer;
TempBase : MBaseRec; TempBase : RecMessageBase;
Begin Begin
mName := strWordGet(1, Data, ';'); mName := strWordGet(1, Data, ';');
mArea := strS2I(strWordGet(2, Data, ';')); mArea := strS2I(strWordGet(2, Data, ';'));
@ -3562,7 +3544,7 @@ Begin
End; End;
Assign (MBaseFile, Config.DataPath + 'mbases.dat'); Assign (MBaseFile, Config.DataPath + 'mbases.dat');
ioReset (MBaseFile, SizeOf(MBaseRec), fmReadWrite + fmDenyNone); ioReset (MBaseFile, SizeOf(RecMessageBase), fmReadWrite + fmDenyNone);
If Not ioSeek (MBaseFile, mArea) Then Begin If Not ioSeek (MBaseFile, mArea) Then Begin
Close (MBaseFile); Close (MBaseFile);
@ -3624,7 +3606,7 @@ Begin
End; End;
End; End;
Function TMsgBase.ResolveOrigin (Var mArea: MBaseRec) : String; Function TMsgBase.ResolveOrigin (Var mArea: RecMessageBase) : String;
Var Var
Loc : Byte; Loc : Byte;
FN : String; FN : String;

View File

@ -149,8 +149,8 @@
063 |CR|12Cannot download files in local mode!|DE|DE|DE 063 |CR|12Cannot download files in local mode!|DE|DE|DE
064 |01[|10þ|01] |09Search all file groups? |11 064 |01[|10þ|01] |09Search all file groups? |11
065 |CR|12Start your transfer now. 065 |CR|12Start your transfer now.
066 |CR|14File area "|FB" is password protected.|CR|09Password: 066 UNUSED
067 |CR|12Access denied. 067 UNUSED
068 |CR|12You do not have access to upload here! 068 |CR|12You do not have access to upload here!
069 |CR|12Illegal filename.|DE|DE|DE 069 |CR|12Illegal filename.|DE|DE|DE
070 |CR|14Searching for duplicate files ... 070 |CR|14Searching for duplicate files ...
@ -203,8 +203,8 @@
; &1 = base number &2 = base name &3 = total messages ; &1 = base number &2 = base name &3 = total messages
101 |15|$L05|&1 |07|$R32|&2 101 |15|$L05|&1 |07|$R32|&2
102 |09|$D77Ä |CR |09Select Message Base |01[|10?|01/|10List|01]|09: 102 |09|$D77Ä |CR |09Select Message Base |01[|10?|01/|10List|01]|09:
103 |CR|14Message area "|MB" is password protected.|CR|09Password: 103 UNUSED
104 Access denied. 104 UNUSED
105 |CR|12You don't have access to post here! 105 |CR|12You don't have access to post here!
106 |CR|12Use the full screen editor? |11 106 |CR|12Use the full screen editor? |11
107 |01[|10þ|01] |09Saving Message|01... 107 |01[|10þ|01] |09Saving Message|01...
@ -594,8 +594,7 @@
313 |12Your download ratio would be exceeded.|PN 313 |12Your download ratio would be exceeded.|PN
; Lightbar file list: Batch queue is full. ; Lightbar file list: Batch queue is full.
314 |12Your batch queue is full.|PN 314 |12Your batch queue is full.|PN
; Node login ACS failed 315 UNUSED
315 |CR|14You do not have access to call this node.
; Lightbar Y/N: YES text ; Lightbar Y/N: YES text
316 |08++(|23|00 yes |16|08/ |07no |08)++ 316 |08++(|23|00 yes |16|08/ |07no |08)++
; Lightbar Y/N: NO text ; Lightbar Y/N: NO text

View File

@ -392,11 +392,11 @@ End;
Procedure UpdateDataFiles; Procedure UpdateDataFiles;
Var Var
CfgFile : File of RecConfig; CfgFile : File of RecConfig;
MBaseFile : File of MBaseRec; MBaseFile : File of RecMessageBase;
FBaseFile : File of RecFileBase; FBaseFile : File of RecFileBase;
LangFile : File of LangRec; LangFile : File of LangRec;
Cfg : RecConfig; Cfg : RecConfig;
MBase : MBaseRec; MBase : RecMessageBase;
FBase : RecFileBase; FBase : RecFileBase;
TLang : LangRec; TLang : LangRec;
TF : Text; TF : Text;

View File

@ -644,8 +644,8 @@ Var
UserFile : File of RecUser; UserFile : File of RecUser;
TUserFile : File of RecUser; TUserFile : File of RecUser;
User : RecUser; User : RecUser;
MBaseFile : File of MBaseRec; MBaseFile : File of RecMessageBase;
MBase : MBaseRec; MBase : RecMessageBase;
MScanFile : File of MScanRec; MScanFile : File of MScanRec;
MScan : MScanRec; MScan : MScanRec;
FBaseFile : File of RecFileBase; FBaseFile : File of RecFileBase;
@ -688,7 +688,7 @@ Begin
While Not Eof(MBaseFile) Do Begin While Not Eof(MBaseFile) Do Begin
Read (MBaseFile, MBase); Read (MBaseFile, MBase);
If MBase.PostType <> 1 Then Continue; If MBase.Flags And MBPrivate = 0 Then Continue;
Case MBase.BaseType of Case MBase.BaseType of
0 : MsgBase := New(PMsgBaseJAM, Init); 0 : MsgBase := New(PMsgBaseJAM, Init);
@ -852,8 +852,8 @@ Procedure MsgBase_Trash;
Var Var
TF : Text; TF : Text;
BadName : String; BadName : String;
MBaseFile : File of MBaseRec; MBaseFile : File of RecMessageBase;
MBase : MBaseRec; MBase : RecMessageBase;
MsgBase : PMsgBaseABS; MsgBase : PMsgBaseABS;
Begin Begin
Write ('Trashing Messages :'); Write ('Trashing Messages :');

View File

@ -156,8 +156,8 @@ End;
Procedure TPOP3Server.CreateMailBoxData; Procedure TPOP3Server.CreateMailBoxData;
Var Var
MBaseFile : File of MBaseRec; MBaseFile : File of RecMessageBase;
MBase : MBaseRec; MBase : RecMessageBase;
MsgBase : PMsgBaseABS; MsgBase : PMsgBaseABS;
Function ParseDateTime (Date, Time : String) : String; Function ParseDateTime (Date, Time : String) : String;
@ -176,7 +176,7 @@ Var
Begin Begin
Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat'); Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat');
If Not ioReset(MBaseFile, SizeOf(MBaseRec), fmRWDN) Then Exit; If Not ioReset(MBaseFile, SizeOf(RecMessageBase), fmRWDN) Then Exit;
ioRead (MBaseFile, MBase); ioRead (MBaseFile, MBase);
Close (MBaseFile); Close (MBaseFile);
@ -231,13 +231,13 @@ End;
Procedure TPOP3Server.DeleteMessages; Procedure TPOP3Server.DeleteMessages;
Var Var
Count : LongInt; Count : LongInt;
MBaseFile : File of MBaseRec; MBaseFile : File of RecMessageBase;
MBase : MBaseRec; MBase : RecMessageBase;
MsgBase : PMsgBaseABS; MsgBase : PMsgBaseABS;
Begin Begin
Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat'); Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat');
If Not ioReset(MBaseFile, SizeOf(MBaseRec), fmRWDN) Then Exit; If Not ioReset(MBaseFile, SizeOf(RecMessageBase), fmRWDN) Then Exit;
ioRead (MBaseFile, MBase); ioRead (MBaseFile, MBase);
Close (MBaseFile); Close (MBaseFile);

View File

@ -152,8 +152,8 @@ Procedure TSMTPServer.cmdDATA;
Var Var
InData : String; InData : String;
HackCount : LongInt; HackCount : LongInt;
MBaseFile : File of MBaseRec; MBaseFile : File of RecMessageBase;
MBase : MBaseRec; MBase : RecMessageBase;
MsgBase : PMsgBaseABS; MsgBase : PMsgBaseABS;
MsgText : TStringList; MsgText : TStringList;
MsgSubject : String; MsgSubject : String;
@ -205,7 +205,7 @@ Begin
Until False; Until False;
Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat'); Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat');
ioReset (MBaseFile, SizeOf(MBaseRec), fmRWDN); ioReset (MBaseFile, SizeOf(RecMessageBase), fmRWDN);
ioRead (MBaseFile, MBase); ioRead (MBaseFile, MBase);
Close (MBaseFile); Close (MBaseFile);

View File

@ -86,7 +86,7 @@ Type
Procedure GetUserVars (Var U: RecUser); Procedure GetUserVars (Var U: RecUser);
Function GetUserRecord (Num: LongInt) : Boolean; Function GetUserRecord (Num: LongInt) : Boolean;
Procedure GetMBaseVars (Var M: MBaseRec); Procedure GetMBaseVars (Var M: RecMessageBase);
Function GetMBaseRecord (Num: LongInt) : Boolean; Function GetMBaseRecord (Num: LongInt) : Boolean;
Procedure GetMGroupVars (Var G: RecGroup); Procedure GetMGroupVars (Var G: RecGroup);
Function GetMGroupRecord (Num: LongInt) : Boolean; Function GetMGroupRecord (Num: LongInt) : Boolean;
@ -150,11 +150,11 @@ Begin
Close (F); Close (F);
End; End;
Procedure TInterpEngine.GetMBaseVars (Var M: MBaseRec); Procedure TInterpEngine.GetMBaseVars (Var M: RecMessageBase);
Begin Begin
Move (M.Index, VarData[IdxVarMBase ]^.Data^, SizeOf(M.Index)); Move (M.Index, VarData[IdxVarMBase ]^.Data^, SizeOf(M.Index));
Move (M.Name, VarData[IdxVarMBase + 1 ]^.Data^, SizeOf(M.Name)); Move (M.Name, VarData[IdxVarMBase + 1 ]^.Data^, SizeOf(M.Name));
Move (M.ACS, VarData[IdxVarMBase + 2 ]^.Data^, SizeOf(M.ACS)); Move (M.ListACS, VarData[IdxVarMBase + 2 ]^.Data^, SizeOf(M.ListACS));
Move (M.ReadACS, VarData[IdxVarMBase + 3 ]^.Data^, SizeOf(M.ReadACS)); Move (M.ReadACS, VarData[IdxVarMBase + 3 ]^.Data^, SizeOf(M.ReadACS));
Move (M.PostACS, VarData[IdxVarMBase + 4 ]^.Data^, SizeOf(M.PostACS)); Move (M.PostACS, VarData[IdxVarMBase + 4 ]^.Data^, SizeOf(M.PostACS));
Move (M.SysopACS, VarData[IdxVarMBase + 5 ]^.Data^, SizeOf(M.SysopACS)); Move (M.SysopACS, VarData[IdxVarMBase + 5 ]^.Data^, SizeOf(M.SysopACS));
@ -163,12 +163,12 @@ End;
Function TInterpEngine.GetMBaseRecord (Num: LongInt) : Boolean; Function TInterpEngine.GetMBaseRecord (Num: LongInt) : Boolean;
Var Var
F : File; F : File;
M : MBaseRec; M : RecMessageBase;
Begin Begin
Result := False; Result := False;
Assign (F, Config.DataPath + 'mbases.dat'); Assign (F, Config.DataPath + 'mbases.dat');
If Not ioReset(F, SizeOf(MBaseRec), fmRWDN) Then Exit; If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit;
If ioSeek(F, Num) And (ioRead(F, M)) Then Begin If ioSeek(F, Num) And (ioRead(F, M)) Then Begin
GetMBaseVars(M); GetMBaseVars(M);

View File

@ -44,6 +44,7 @@ Uses
Procedure InitClasses; Procedure InitClasses;
Begin Begin
Assign (ConfigFile, 'mystic.dat'); Assign (ConfigFile, 'mystic.dat');
if ioReset(ConfigFile, SizeOf(RecConfig), fmReadWrite + fmDenyNone) Then Begin if ioReset(ConfigFile, SizeOf(RecConfig), fmReadWrite + fmDenyNone) Then Begin
Read (ConfigFile, Config); Read (ConfigFile, Config);
Close (ConfigFile); Close (ConfigFile);
@ -80,12 +81,7 @@ Begin
ExitProc := ExitSave; ExitProc := ExitSave;
If ErrorAddr <> NIL Then Begin If ErrorAddr <> NIL Then ExitCode := 1;
Session.io.OutFull('|CR|12System Error #' + strI2S(ExitCode));
Session.SystemLog ('ERROR #' + strI2S(ExitCode));
ExitCode := 1;
End;
If Session.User.UserNum <> -1 Then Begin If Session.User.UserNum <> -1 Then Begin
Session.User.ThisUser.LastOn := CurDateDos; Session.User.ThisUser.LastOn := CurDateDos;
@ -204,24 +200,46 @@ Procedure CheckPathsAndDataFiles;
Var Var
Count : Byte; Count : Byte;
PR : PercentRec; PR : PercentRec;
MBase : MBaseRec;
Begin Begin
If Not Session.ConfigMode Then Begin Randomize;
CheckDIR (Config.SystemPath);
CheckDIR (Config.AttachPath); Session.TempPath := Config.SystemPath + 'temp' + strI2S(Session.NodeNum) + PathChar;
CheckDIR (Config.DataPath);
CheckDIR (Config.MsgsPath);
CheckDIR (Config.SemaPath);
CheckDIR (Config.QwkPath);
CheckDIR (Config.ScriptPath);
CheckDIR (Config.LogsPath);
End;
{$I-} {$I-}
MkDir (Config.SystemPath + 'temp' + strI2S(Session.NodeNum)); MkDir (Config.SystemPath + 'temp' + strI2S(Session.NodeNum));
If IoResult <> 0 Then; If IoResult <> 0 Then;
{$I+} {$I+}
DirClean(Session.TempPath, '');
Assign (Session.LangFile, Config.DataPath + 'language.dat');
{$I-} Reset (Session.LangFile); {$I+}
If IoResult <> 0 Then Begin
Screen.WriteLine ('ERROR: No theme configuration. Use MYSTIC -CFG');
DisposeClasses;
Halt(1);
End;
Close (Session.LangFile);
If Not Session.LoadThemeData(Config.DefThemeFile) Then Begin
If Not Session.ConfigMode Then Begin
Screen.WriteLine ('ERROR: Default theme prompts not found [' + Config.DefThemeFile + '.lng]');
DisposeClasses;
Halt(1);
End;
End;
If Session.ConfigMode Then Exit;
CheckDIR (Config.SystemPath);
CheckDIR (Config.AttachPath);
CheckDIR (Config.DataPath);
CheckDIR (Config.MsgsPath);
CheckDIR (Config.SemaPath);
CheckDIR (Config.QwkPath);
CheckDIR (Config.ScriptPath);
CheckDIR (Config.LogsPath);
Assign (RoomFile, Config.DataPath + 'chatroom.dat'); Assign (RoomFile, Config.DataPath + 'chatroom.dat');
{$I-} Reset (RoomFile); {$I+} {$I-} Reset (RoomFile); {$I+}
If IoResult <> 0 Then Begin If IoResult <> 0 Then Begin
@ -232,52 +250,6 @@ Begin
End; End;
Close (RoomFile); Close (RoomFile);
Assign (Session.LangFile, Config.DataPath + 'language.dat');
{$I-} Reset (Session.LangFile); {$I+}
If IoResult <> 0 Then Begin
Session.Lang.Desc := 'Default';
Session.Lang.FileName := 'default';
Session.Lang.TextPath := Config.SystemPath + 'text' + PathChar;
Session.Lang.MenuPath := Config.SystemPath + 'menus' + PathChar;
Session.Lang.BarYN := True;
Session.Lang.FieldCol1 := 31;
Session.Lang.FieldCol2 := 25;
Session.Lang.FieldChar := ' ';
Session.Lang.QuoteColor := 31;
Session.Lang.EchoCh := '*';
Session.Lang.TagCh := 'û';
Session.Lang.okASCII := True;
Session.Lang.okANSI := True;
Session.Lang.FileHi := 112;
Session.Lang.FileLo := 11;
Session.Lang.NewMsgChar := 'N';
PR.BarLen := 15;
PR.LoChar := '°';
PR.LoAttr := 8;
PR.HiChar := 'Û';
PR.HiAttr := 9;
Session.Lang.VotingBar := PR;
Session.Lang.FileBar := PR;
Session.Lang.MsgBar := PR;
Session.Lang.GalleryBar := PR;
ReWrite (Session.LangFile);
Write (Session.LangFile, Session.Lang);
End;
Close (Session.LangFile);
If Not Session.LoadThemeData(Config.DefThemeFile) Then Begin
If Not Session.ConfigMode Then Begin
Screen.WriteLine ('ERROR: Default theme prompts not found [' + Config.DefThemeFile + '.lng]');
DisposeClasses;
Halt(1);
End;
End;
Assign (Session.User.UserFile, Config.DataPath + 'users.dat'); Assign (Session.User.UserFile, Config.DataPath + 'users.dat');
{$I-} Reset (Session.User.UserFile); {$I+} {$I-} Reset (Session.User.UserFile); {$I+}
If IoResult <> 0 Then Begin If IoResult <> 0 Then Begin
@ -299,35 +271,9 @@ Begin
Assign (Session.Msgs.MBaseFile, Config.DataPath + 'mbases.dat'); Assign (Session.Msgs.MBaseFile, Config.DataPath + 'mbases.dat');
{$I-} Reset(Session.Msgs.MBaseFile); {$I+} {$I-} Reset(Session.Msgs.MBaseFile); {$I+}
If IoResult <> 0 Then Begin If IoResult <> 0 Then Begin
ReWrite (Session.Msgs.MBaseFile); Screen.WriteLine ('ERROR: No message base configuration. Use MYSTIC -CFG');
DisposeClasses;
MBase.Name := 'E-mail'; Halt(1);
MBase.QWKName := 'Email';
MBase.FileName := 'email';
MBase.Path := Config.MsgsPath;
MBase.BaseType := 0;
MBase.NetType := 0;
MBase.PostType := 1;
MBase.ACS := '%';
MBase.ReadACS := '';
MBase.PostACS := '';
MBase.SysopACS := 's255';
MBase.Password := '';
MBase.ColQuote := Config.ColorQuote;
MBase.ColText := Config.ColorText;
MBase.ColTear := Config.ColorTear;
MBase.ColOrigin := Config.ColorOrigin;
MBase.NetAddr := 1;
MBase.Origin := Config.Origin;
MBase.UseReal := False;
MBase.DefNScan := 1;
MBase.DefQScan := 1;
MBase.MaxMsgs := 0;
MBase.MaxAge := 0;
MBase.Header := '';
MBase.Index := 1;
Write (Session.Msgs.MBaseFile, MBase);
End; End;
Close (Session.Msgs.MBaseFile); Close (Session.Msgs.MBaseFile);
@ -370,14 +316,6 @@ Begin
{$I-} Reset (Session.FileBase.ProtocolFile); {$I+} {$I-} Reset (Session.FileBase.ProtocolFile); {$I+}
If IoResult <> 0 Then ReWrite (Session.FileBase.ProtocolFile); If IoResult <> 0 Then ReWrite (Session.FileBase.ProtocolFile);
Close (Session.FileBase.ProtocolFile); Close (Session.FileBase.ProtocolFile);
Session.FindNextEvent;
Session.TempPath := Config.SystemPath + 'temp' + strI2S(Session.NodeNum) + PathChar;
DirClean(Session.TempPath, '');
Randomize;
End; End;
Var Var
@ -471,6 +409,8 @@ Begin
Halt(0); Halt(0);
End; End;
Session.FindNextEvent;
Session.SystemLog ('Node ' + strI2S(Session.NodeNum) + ' online'); Session.SystemLog ('Node ' + strI2S(Session.NodeNum) + ' online');
If Session.TimeOffset > 0 Then If Session.TimeOffset > 0 Then

View File

@ -122,9 +122,9 @@ Const
Var Var
ConfigFile : File of RecConfig; ConfigFile : File of RecConfig;
MBaseFile : File of MBaseRec; MBaseFile : File of RecMessageBase;
Config : RecConfig; Config : RecConfig;
MBase : MBaseRec; MBase : RecMessageBase;
Const Const
DATEC1970 = 2440588; DATEC1970 = 2440588;

View File

@ -253,17 +253,6 @@ Const
//FUTURE DATA FILE UPDATES NEEDED //FUTURE DATA FILE UPDATES NEEDED
//LASTON needs optional1-10 compare to Mystic2 //LASTON needs optional1-10 compare to Mystic2
//MBASES
// expand header filename[20]
// add template[20]
// add msgbase sponser[30]
// add newsname[60]
// add colorkludge[b]
// add flags[l] merge in useReal
// flags:
// userealname, forced, allow autosig, allow attachments, kludge filter
// remove password?
// ACS to s[30]
//MENUS //MENUS
// remove fallback? // remove fallback?
// (flags) // (flags)
@ -274,13 +263,6 @@ Const
// (commands) // (commands)
// TBD compare to mystic 2 // TBD compare to mystic 2
// VOTING: expand ACS to s[30] // VOTING: expand ACS to s[30]
// LANGREC
// example path sizes
// add script path?
// compare to mystic 2 for fallback stuff?
// rename to THEME
// help percent bar
// horizontal/vertical percent bars
Type Type
RecUser = Record { USERS.DAT } RecUser = Record { USERS.DAT }
@ -408,33 +390,47 @@ Type
QwkScan : Byte; { Include this base in qwk scan? } QwkScan : Byte; { Include this base in qwk scan? }
End; End;
MBaseRec = Record { MBASES.DAT } Const
Name : String[40]; { Message base name } MBRealNames = $00000001;
QWKName : String[13]; { QWK (short) message base name } MBKillKludge = $00000002;
FileName : String[40]; { Message base file name } MBAutosigs = $00000004;
Path : String[40]; { Path where files are stored } MBNoAttach = $00000008;
BaseType : Byte; { 0 = JAM, 1 = Squish } MBPrivate = $00000010;
NetType : Byte; { 0 = Local 1 = EchoMail } MBCrossPost = $00000020;
{ 2 = UseNet 3 = NetMail }
PostType : Byte; { 0 = Public 1 = Private } Type
ACS, { ACS required to see this base } RecMessageBase = Record
ReadACS, { ACS required to read messages } Name : String[40];
PostACS, { ACS required to post messages } QWKName : String[13];
SysopACS : String[20]; { ACS required for sysop options } NewsName : String[60];
Password : String[15]; { Password for this message base } FileName : String[40];
ColQuote : Byte; { Quote text color } Path : String[mysMaxPathSize];
ColText : Byte; { Text color } BaseType : Byte;
ColTear : Byte; { Tear line color } NetType : Byte;
ColOrigin: Byte; { Origin line color } ReadType : Byte;
NetAddr : Byte; { Net AKA to use for this base } ListType : Byte;
Origin : String[50]; { Net origin line for this base } ListACS : String[mysMaxAcsSize];
UseReal : Boolean; { Use real names? } ReadACS : String[mysMaxAcsSize];
DefNScan : Byte; { 0 = off, 1 = on, 2 = always } PostACS : String[mysMaxAcsSize];
DefQScan : Byte; { 0 = off, 1 = on, 2 = always } SysopACS : String[mysMaxAcsSize];
MaxMsgs : Word; { Max messages to allow } Sponsor : String[30];
MaxAge : Word; { Max age of messages before purge } ColQuote : Byte;
Header : String[8]; { Display Header file name } ColText : Byte;
Index : SmallInt; { QWK index - NEVER CHANGE THIS } ColTear : Byte;
ColOrigin : Byte;
ColKludge : Byte;
NetAddr : Byte; { Net AKA to use for this base }
Origin : String[50]; { Net origin line for this base }
DefNScan : Byte; { 0 = off, 1 = on, 2 = always }
DefQScan : Byte; { 0 = off, 1 = on, 2 = always }
MaxMsgs : Word;
MaxAge : Word;
Header : String[20];
RTemplate : String[20];
ITemplate : String[20];
Index : Word;
Flags : LongInt;
Res : Array[1..110] of Byte;
End; End;
FScanRec = Record { <Data Path> *.SCN } FScanRec = Record { <Data Path> *.SCN }
@ -462,7 +458,6 @@ Type
CommentACS : String[30]; CommentACS : String[30];
SysOpACS : String[30]; SysOpACS : String[30];
Path : String[80]; Path : String[80];
Password : String[15];
DefScan : Byte; DefScan : Byte;
Flags : LongInt; Flags : LongInt;
Res : Array[1..36] of Byte; Res : Array[1..36] of Byte;
@ -549,6 +544,15 @@ Type
LHText : String[79]; LHText : String[79];
End; End;
RecPercent = Record
BarLength : Byte;
LoChar : Char;
LoAttr : Byte;
HiChar : Char;
HiAttr : Byte;
Format : Byte;
End;
PercentRec = Record // percentage bar record PercentRec = Record // percentage bar record
BarLen : Byte; BarLen : Byte;
LoChar : Char; LoChar : Char;
@ -557,6 +561,37 @@ Type
HiAttr : Byte; HiAttr : Byte;
End; End;
Const
ThmAllowASCII = $00000001;
ThmAllowANSI = $00000002;
ThmLightbarYN = $00000004;
ThmFallback = $00000008;
Type
RecTheme = Record
FileName : String[20];
Desc : String[40];
TextPath : String[mysMaxPathSize];
MenuPath : String[mysMaxPathSize];
ScriptPath : String[mysMaxPathSize];
TemplatePath : String[mysMaxPathSize];
Flags : LongInt;
FieldCol1 : Byte;
FieldCol2 : Byte;
FieldChar : Char;
EchoCh : Char;
QuoteColor : Byte;
TagCh : Char;
FileHi : Byte;
FileLo : Byte;
NewMsgChar : Char;
VotingBar : RecPercent;
FileBar : RecPercent;
MsgBar : RecPercent;
GalleryBar : RecPercent;
HelpBar : RecPercent;
End;
LangRec = Record { LANGUAGE.DAT } LangRec = Record { LANGUAGE.DAT }
FileName : String[8]; { Language file name } FileName : String[8]; { Language file name }
Desc : String[30]; { Language description } Desc : String[30]; { Language description }