Fixes for all of the stuff broken yesterday :)
This commit is contained in:
parent
65a031a1fa
commit
16ea2d235f
|
@ -28,9 +28,9 @@
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
{.$DEFINE DEBUG}
|
{$DEFINE DEBUG}
|
||||||
{$DEFINE RELEASE}
|
{.$DEFINE RELEASE}
|
||||||
{.$DEFINE LOGGING}
|
{$DEFINE LOGGING}
|
||||||
|
|
||||||
{ ------------------------------------------------------------------------- }
|
{ ------------------------------------------------------------------------- }
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,6 @@ Unit bbs_Ansi_Help;
|
||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
|
||||||
bbs_Ansi_MenuBox;
|
|
||||||
|
|
||||||
Const
|
Const
|
||||||
mysMaxHelpTest = 200;
|
mysMaxHelpTest = 200;
|
||||||
mysMaxHelpKeyLen = 20;
|
mysMaxHelpKeyLen = 20;
|
||||||
|
@ -40,7 +37,6 @@ Type
|
||||||
End;
|
End;
|
||||||
|
|
||||||
TAnsiMenuHelp = Class
|
TAnsiMenuHelp = Class
|
||||||
Box : TAnsiMenuBox;
|
|
||||||
HelpFile : Text;
|
HelpFile : Text;
|
||||||
CurKey : String[mysMaxHelpKeyLen];
|
CurKey : String[mysMaxHelpKeyLen];
|
||||||
Text : Array[1..mysMaxHelpTest] of TLineInfoRec;
|
Text : Array[1..mysMaxHelpTest] of TLineInfoRec;
|
||||||
|
@ -48,8 +44,9 @@ Type
|
||||||
|
|
||||||
Constructor Create;
|
Constructor Create;
|
||||||
Destructor Destroy; Override;
|
Destructor Destroy; Override;
|
||||||
Procedure OpenHelp (X1, Y1, X2, Y2: Byte; FN, Keyword: String);
|
|
||||||
Function ReadKeywordData : Boolean;
|
Function ReadKeywordData : Boolean;
|
||||||
|
Procedure OpenHelp (Str: String);
|
||||||
Function StripLinks (Str: String) : String;
|
Function StripLinks (Str: String) : String;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -57,7 +54,8 @@ Implementation
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
m_Strings,
|
m_Strings,
|
||||||
bbs_Core;
|
bbs_Core,
|
||||||
|
bbs_Ansi_MenuBox;
|
||||||
|
|
||||||
Constructor TAnsiMenuHelp.Create;
|
Constructor TAnsiMenuHelp.Create;
|
||||||
Begin
|
Begin
|
||||||
|
@ -93,7 +91,6 @@ Begin
|
||||||
Result := Str;
|
Result := Str;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TAnsiMenuHelp.ReadKeywordData : Boolean;
|
Function TAnsiMenuHelp.ReadKeywordData : Boolean;
|
||||||
Var
|
Var
|
||||||
Str : String;
|
Str : String;
|
||||||
|
@ -167,8 +164,16 @@ Begin
|
||||||
Result := Done And (Lines > 0);
|
Result := Done And (Lines > 0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TAnsiMenuHelp.OpenHelp (X1, Y1, X2, Y2: Byte; FN, Keyword: String);
|
Procedure TAnsiMenuHelp.OpenHelp (Str: String);
|
||||||
|
Const
|
||||||
|
WinX1 : Byte = 2;
|
||||||
|
WinY1 : Byte = 2;
|
||||||
|
WinX2 : Byte = 78;
|
||||||
|
WinY2 : Byte = 22;
|
||||||
Var
|
Var
|
||||||
|
FN : String;
|
||||||
|
Template : String;
|
||||||
|
Keyword : String;
|
||||||
TopPage : Integer;
|
TopPage : Integer;
|
||||||
CurLine : Integer;
|
CurLine : Integer;
|
||||||
CurLPos : Byte;
|
CurLPos : Byte;
|
||||||
|
@ -185,7 +190,7 @@ Var
|
||||||
With Text[LineNum] Do
|
With Text[LineNum] Do
|
||||||
S := Copy(strStripPipe(Text), Link[LPos].LinkPos, Link[LPos].LinkLen);
|
S := Copy(strStripPipe(Text), Link[LPos].LinkPos, Link[LPos].LinkLen);
|
||||||
|
|
||||||
WriteXY (X1 + Text[LineNum].Link[LPos].LinkPos, YPos, 9, S);
|
WriteXY (WinX1 + Text[LineNum].Link[LPos].LinkPos - 1, YPos, 9, S);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure DrawPage;
|
Procedure DrawPage;
|
||||||
|
@ -193,14 +198,14 @@ Var
|
||||||
Count1 : Byte;
|
Count1 : Byte;
|
||||||
Count2 : Byte;
|
Count2 : Byte;
|
||||||
Begin
|
Begin
|
||||||
For Count1 := Y1 to WinSize Do Begin
|
For Count1 := 1 to WinSize Do Begin
|
||||||
If TopPage + Count1 - Y1 <= Lines Then Begin
|
If TopPage + Count1 - 1 <= Lines Then Begin
|
||||||
WriteXYPipe (X1 + 1, (Count1 - Y1) + Y1 + 1, 7, X2 - X1 - 1, Text[TopPage + (Count1 - Y1)].Text);
|
WriteXYPipe (WinX1, Count1 + WinY1 - 1, 7, WinX2 - WinX1 + 1, Text[TopPage + Count1 - 1].Text);
|
||||||
|
|
||||||
For Count2 := 1 to Text[TopPage + Count1 - 1].Links Do
|
For Count2 := 1 to Text[TopPage + Count1 - 1].Links Do
|
||||||
LinkOFF (TopPage + Count1 - 1, Count1 - Y1 + Y1 + 1, Count2);
|
LinkOFF (TopPage + Count1 - 1, Count1 + WinY1 - 1, Count2);
|
||||||
End Else
|
End Else
|
||||||
WriteXYPipe (X1 + 1, (Count1 - Y1) + Y1 + 1, 7, X2 - X1 - 1, '');
|
WriteXYPipe (WinX1, Count1 + WinY1 - 1, 7, WinX2 - WinX1 + 1, '');
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -211,9 +216,9 @@ Var
|
||||||
With Text[TopPage + CurLine - 1] Do
|
With Text[TopPage + CurLine - 1] Do
|
||||||
S := Copy(strStripPipe(Text), Link[CurLPos].LinkPos, Link[CurLPos].LinkLen);
|
S := Copy(strStripPipe(Text), Link[CurLPos].LinkPos, Link[CurLPos].LinkLen);
|
||||||
|
|
||||||
WriteXY (X1 + Text[TopPage + CurLine - 1].Link[CurLPos].LinkPos, Y1 + CurLine, 31, S);
|
WriteXY (WinX1 + Text[TopPage + CurLine - 1].Link[CurLPos].LinkPos - 1, WinY1 + CurLine - 1, 31, S);
|
||||||
|
|
||||||
Session.io.AnsiGotoXY (X1 + Text[TopPage + CurLine - 1].Link[CurLPos].LinkPos, Y1 + CurLine);
|
Session.io.AnsiGotoXY (WinX1 + Text[TopPage + CurLine - 1].Link[CurLPos].LinkPos - 1, WinY1 + CurLine - 1);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure UpdateCursor;
|
Procedure UpdateCursor;
|
||||||
|
@ -221,10 +226,12 @@ Var
|
||||||
If Text[TopPage + CurLine - 1].Links > 0 Then Begin
|
If Text[TopPage + CurLine - 1].Links > 0 Then Begin
|
||||||
If CurLPos > Text[TopPage + CurLine - 1].Links Then CurLPos := Text[TopPage + CurLine - 1].Links;
|
If CurLPos > Text[TopPage + CurLine - 1].Links Then CurLPos := Text[TopPage + CurLine - 1].Links;
|
||||||
If CurLPos < 1 Then CurLPos := 1;
|
If CurLPos < 1 Then CurLPos := 1;
|
||||||
|
|
||||||
LinkON;
|
LinkON;
|
||||||
End Else Begin
|
End Else Begin
|
||||||
CurLPos := 1;
|
CurLPos := 1;
|
||||||
Session.io.AnsiGotoXY (X1 + 1, Y1 + CurLine);
|
|
||||||
|
Session.io.AnsiGotoXY (WinX1, WinY1 + CurLine - 1);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -246,17 +253,28 @@ Var
|
||||||
Count : Byte;
|
Count : Byte;
|
||||||
Ch : Char;
|
Ch : Char;
|
||||||
Begin
|
Begin
|
||||||
|
FN := strWordGet(1, Str, ';');
|
||||||
|
Template := strWordGet(2, Str, ';');
|
||||||
|
Keyword := strWordGet(3, Str, ';');
|
||||||
|
|
||||||
Assign (HelpFile, FN);
|
Assign (HelpFile, FN);
|
||||||
Reset (HelpFile);
|
{$I-} Reset (HelpFile); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then Exit;
|
If IoResult <> 0 Then Exit;
|
||||||
|
|
||||||
Close (HelpFile);
|
Close (HelpFile);
|
||||||
|
|
||||||
|
Session.io.OutFile(Template, False, 0);
|
||||||
|
|
||||||
|
WinX1 := Session.io.ScreenInfo[1].X;
|
||||||
|
WinY1 := Session.io.ScreenInfo[1].Y;
|
||||||
|
WinX2 := Session.io.ScreenInfo[2].X;
|
||||||
|
WinY2 := Session.io.SCreenInfo[2].Y;
|
||||||
|
|
||||||
TopPage := 1;
|
TopPage := 1;
|
||||||
CurLine := 1;
|
CurLine := 1;
|
||||||
LastPos := 0;
|
LastPos := 0;
|
||||||
WinSize := Y2 - Y1 - 1;
|
WinSize := WinY2 - WinY1 + 1;
|
||||||
CurKey := Keyword;
|
CurKey := Keyword;
|
||||||
OK := ReadKeywordData;
|
OK := ReadKeywordData;
|
||||||
|
|
||||||
|
@ -267,24 +285,12 @@ Begin
|
||||||
|
|
||||||
If Not OK Then Exit;
|
If Not OK Then Exit;
|
||||||
|
|
||||||
Box := TAnsiMenuBox.Create;
|
// Session.io.PurgeInputBuffer;
|
||||||
|
|
||||||
Box.Shadow := False;
|
// DrawPage;
|
||||||
Box.FrameType := 1;
|
// UpdateCursor;
|
||||||
Box.BoxAttr := 8;
|
|
||||||
Box.BoxAttr2 := 8;
|
|
||||||
Box.HeadAttr := 15;
|
|
||||||
Box.Box3D := False;
|
|
||||||
Box.Header := ' Section : ' + CurKey + ' ';
|
|
||||||
|
|
||||||
Box.Open (X1, Y1, X2, Y2);
|
|
||||||
|
|
||||||
DrawPage;
|
|
||||||
UpdateCursor;
|
|
||||||
|
|
||||||
While OK Do Begin
|
While OK Do Begin
|
||||||
// Box.UpdateHeader (' Section : ' + CurKey + ' ');
|
|
||||||
|
|
||||||
TopPage := 1;
|
TopPage := 1;
|
||||||
CurLine := 1;
|
CurLine := 1;
|
||||||
|
|
||||||
|
@ -308,6 +314,7 @@ Begin
|
||||||
#71 : If (TopPage > 1) or (CurLine > 1) Then Begin
|
#71 : If (TopPage > 1) or (CurLine > 1) Then Begin
|
||||||
TopPage := 1;
|
TopPage := 1;
|
||||||
CurLine := 1;
|
CurLine := 1;
|
||||||
|
|
||||||
DrawPage;
|
DrawPage;
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End;
|
End;
|
||||||
|
@ -317,7 +324,7 @@ Begin
|
||||||
DrawPage;
|
DrawPage;
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End Else If CurLine > 1 Then Begin
|
End Else If CurLine > 1 Then Begin
|
||||||
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
LinkOFF(TopPage + CurLine - 1, WinY1 + CurLine - 1, CurLPos);
|
||||||
Dec (CurLine);
|
Dec (CurLine);
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End;
|
End;
|
||||||
|
@ -325,22 +332,24 @@ Begin
|
||||||
#73 : Begin
|
#73 : Begin
|
||||||
If TopPage - WinSize > 0 Then Begin
|
If TopPage - WinSize > 0 Then Begin
|
||||||
Dec (TopPage, WinSize);
|
Dec (TopPage, WinSize);
|
||||||
|
|
||||||
DrawPage;
|
DrawPage;
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End Else If CurLine > 1 Then Begin
|
End Else If CurLine > 1 Then Begin
|
||||||
TopPage := 1;
|
TopPage := 1;
|
||||||
CurLine := 1;
|
CurLine := 1;
|
||||||
|
|
||||||
DrawPage;
|
DrawPage;
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
#75 : If (CurLPos > 1) and (Text[TopPage + CurLine - 1].Links > 0) Then Begin
|
#75 : If (CurLPos > 1) and (Text[TopPage + CurLine - 1].Links > 0) Then Begin
|
||||||
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
LinkOFF(TopPage + CurLine - 1, WinY1 + CurLine - 1, CurLPos);
|
||||||
Dec(CurLPos);
|
Dec(CurLPos);
|
||||||
LinkON;
|
LinkON;
|
||||||
End;
|
End;
|
||||||
#77 : If CurLPos < Text[TopPage + CurLine - 1].Links Then Begin
|
#77 : If CurLPos < Text[TopPage + CurLine - 1].Links Then Begin
|
||||||
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
LinkOFF(TopPage + CurLine - 1, WinY1 + CurLine - 1, CurLPos);
|
||||||
Inc(CurLPos);
|
Inc(CurLPos);
|
||||||
LinkON;
|
LinkON;
|
||||||
End;
|
End;
|
||||||
|
@ -348,11 +357,12 @@ Begin
|
||||||
Repeat
|
Repeat
|
||||||
PageDown;
|
PageDown;
|
||||||
Until TopPage >= Lines - WinSize - 1;
|
Until TopPage >= Lines - WinSize - 1;
|
||||||
|
|
||||||
DrawPage;
|
DrawPage;
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End Else
|
End Else
|
||||||
If TopPage + CurLine <= Lines Then Begin
|
If TopPage + CurLine <= Lines Then Begin
|
||||||
LinkOFF (TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
LinkOFF (TopPage + CurLine - 1, WinY1 + CurLine - 1, CurLPos);
|
||||||
CurLine := Lines - TopPage + 1;
|
CurLine := Lines - TopPage + 1;
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End;
|
End;
|
||||||
|
@ -363,7 +373,7 @@ Begin
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End Else
|
End Else
|
||||||
If (CurLine < WinSize) And (TopPage + CurLine <= Lines) Then Begin
|
If (CurLine < WinSize) And (TopPage + CurLine <= Lines) Then Begin
|
||||||
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
LinkOFF(TopPage + CurLine - 1, WinY1 + CurLine - 1, CurLPos);
|
||||||
Inc(CurLine);
|
Inc(CurLine);
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End;
|
End;
|
||||||
|
@ -374,7 +384,7 @@ Begin
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End Else
|
End Else
|
||||||
If TopPage + CurLine <= Lines Then Begin
|
If TopPage + CurLine <= Lines Then Begin
|
||||||
LinkOFF (TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
LinkOFF (TopPage + CurLine - 1, WinY1 + CurLine - 1, CurLPos);
|
||||||
CurLine := Lines - TopPage + 1;
|
CurLine := Lines - TopPage + 1;
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End;
|
End;
|
||||||
|
@ -435,9 +445,6 @@ Begin
|
||||||
End;
|
End;
|
||||||
Until False;
|
Until False;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Box.Close;
|
|
||||||
Box.Free;
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
End.
|
End.
|
|
@ -31,7 +31,7 @@ Begin
|
||||||
Box := TAnsiMenuBox.Create;
|
Box := TAnsiMenuBox.Create;
|
||||||
Form := TAnsiMenuForm.Create;
|
Form := TAnsiMenuForm.Create;
|
||||||
|
|
||||||
Box.Open (6, 5, 75, 21);
|
Box.Open (6, 5, 75, 20);
|
||||||
|
|
||||||
VerticalLine (22, 7, 19);
|
VerticalLine (22, 7, 19);
|
||||||
VerticalLine (69, 7, 9);
|
VerticalLine (69, 7, 9);
|
||||||
|
@ -47,7 +47,7 @@ Begin
|
||||||
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 Always', @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.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, 18, 24, 18, 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?');
|
||||||
Form.AddBits ('M', ' Slow Media' , 57, 8, 71, 8, 12, FBSlowMedia, @FBase.Flags, Topic + 'Files stored on slow media device?');
|
Form.AddBits ('M', ' Slow Media' , 57, 8, 71, 8, 12, FBSlowMedia, @FBase.Flags, Topic + 'Files stored on slow media device?');
|
||||||
|
@ -100,6 +100,7 @@ Var
|
||||||
FtpName := Name;
|
FtpName := Name;
|
||||||
DefScan := 1;
|
DefScan := 1;
|
||||||
SysopACS := 's255';
|
SysopACS := 's255';
|
||||||
|
Template := 'ansiflst';
|
||||||
Flags := FBShowUpload;
|
Flags := FBShowUpload;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -138,7 +139,7 @@ Begin
|
||||||
|
|
||||||
Case List.ExitCode of
|
Case List.ExitCode of
|
||||||
'/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of
|
'/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of
|
||||||
'I' : If List.Picked > 1 Then Begin
|
'I' : Begin
|
||||||
InsertRecord;
|
InsertRecord;
|
||||||
MakeList;
|
MakeList;
|
||||||
End;
|
End;
|
||||||
|
|
|
@ -106,7 +106,7 @@ Var
|
||||||
|
|
||||||
MBaseFile.Read (MBase);
|
MBaseFile.Read (MBase);
|
||||||
|
|
||||||
List.Add(strPadR(strI2S(MBaseFile.FilePos), 5, ' ') + ' ' + strStripMCI(MBase.Name), Tag);
|
List.Add(strPadR(strI2S(MBaseFile.FilePos - 1), 5, ' ') + ' ' + strStripMCI(MBase.Name), Tag);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
List.Add('', 2);
|
List.Add('', 2);
|
||||||
|
@ -155,7 +155,8 @@ Var
|
||||||
If Email Then Begin
|
If Email Then Begin
|
||||||
FileName := 'email';
|
FileName := 'email';
|
||||||
Name := 'Electronic Mail';
|
Name := 'Electronic Mail';
|
||||||
Index := 0;
|
Index := 1;
|
||||||
|
ListACS := '%';
|
||||||
Flags := Flags or MBPrivate;
|
Flags := Flags or MBPrivate;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -246,6 +247,7 @@ Begin
|
||||||
|
|
||||||
Box.Close;
|
Box.Close;
|
||||||
|
|
||||||
|
MBaseFile.Close;
|
||||||
MBaseFile.Free;
|
MBaseFile.Free;
|
||||||
List.Free;
|
List.Free;
|
||||||
Box.Free;
|
Box.Free;
|
||||||
|
|
|
@ -111,12 +111,12 @@ Begin
|
||||||
List.LoChars := #13#27#47;
|
List.LoChars := #13#27#47;
|
||||||
List.NoWindow := True;
|
List.NoWindow := True;
|
||||||
|
|
||||||
Box.Open (21, 5, 59, 20);
|
Box.Open (21, 5, 59, 21);
|
||||||
|
|
||||||
WriteXY (23, 6, 112, 'Lvl Description');
|
WriteXY (23, 7, 112, 'Lvl Description');
|
||||||
WriteXY (22, 7, 112, strRep('Ä', 37));
|
WriteXY (22, 8, 112, strRep('Ä', 37));
|
||||||
WriteXY (22, 18, 112, strRep('Ä', 37));
|
WriteXY (22, 19, 112, strRep('Ä', 37));
|
||||||
WriteXY (29, 19, 112, cfgCommandList);
|
WriteXY (29, 20, 112, cfgCommandList);
|
||||||
|
|
||||||
Repeat
|
Repeat
|
||||||
MakeList;
|
MakeList;
|
||||||
|
@ -126,7 +126,7 @@ Begin
|
||||||
MakeList;
|
MakeList;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
List.Open (21, 7, 59, 18);
|
List.Open (21, 8, 59, 19);
|
||||||
List.Close;
|
List.Close;
|
||||||
|
|
||||||
Case List.ExitCode of
|
Case List.ExitCode of
|
||||||
|
|
|
@ -24,6 +24,7 @@ Begin
|
||||||
Session.SystemLog ('*VOTE EDITOR*');
|
Session.SystemLog ('*VOTE EDITOR*');
|
||||||
Repeat
|
Repeat
|
||||||
Session.io.OutFullLn ('|CL|14Voting Booth Editor|CR|CR|15## Question|CR|09-- ---------------------------------------');
|
Session.io.OutFullLn ('|CL|14Voting Booth Editor|CR|CR|15## Question|CR|09-- ---------------------------------------');
|
||||||
|
|
||||||
Reset (VoteFile);
|
Reset (VoteFile);
|
||||||
While Not Eof(VoteFile) do begin
|
While Not Eof(VoteFile) do begin
|
||||||
Read (VoteFile, Vote);
|
Read (VoteFile, Vote);
|
||||||
|
|
|
@ -241,7 +241,7 @@ Begin
|
||||||
If IoResult <> 0 Then ReWrite (tLOG);
|
If IoResult <> 0 Then ReWrite (tLOG);
|
||||||
|
|
||||||
If Str = '-' Then
|
If Str = '-' Then
|
||||||
WriteLn (tLOG, strRep('-', 50))
|
WriteLn (tLOG, strRep('-', 40))
|
||||||
Else
|
Else
|
||||||
WriteLn (tLOG, DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, False) + ' ' + Str);
|
WriteLn (tLOG, DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, False) + ' ' + Str);
|
||||||
|
|
||||||
|
|
|
@ -347,7 +347,11 @@ Begin
|
||||||
{$I-} Reset (MenuFile); {$I+}
|
{$I-} Reset (MenuFile); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then Begin
|
If IoResult <> 0 Then Begin
|
||||||
If Not Global Then Session.io.OutFullLn ('|CR|14Menu not found, loading fallback.');
|
If Not Global Then Begin
|
||||||
|
Session.io.OutFullLn ('|CR|14Menu not found, loading fallback.');
|
||||||
|
Session.SystemLog ('Menu: ' + MenuName + ' not found');
|
||||||
|
End;
|
||||||
|
|
||||||
Exit;
|
Exit;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -291,7 +291,7 @@ End;
|
||||||
|
|
||||||
Procedure TMsgBase.ChangeArea (Data: String);
|
Procedure TMsgBase.ChangeArea (Data: String);
|
||||||
Var
|
Var
|
||||||
A,
|
Count : LongInt;
|
||||||
Total : Word;
|
Total : Word;
|
||||||
Old : RecMessageBase;
|
Old : RecMessageBase;
|
||||||
Str : String[5];
|
Str : String[5];
|
||||||
|
@ -300,19 +300,24 @@ Begin
|
||||||
Compress := Config.MCompress;
|
Compress := Config.MCompress;
|
||||||
Old := MBase;
|
Old := MBase;
|
||||||
|
|
||||||
|
{$IFDEF LOGGING}
|
||||||
|
Session.SystemLog('MsgAreaChange: ' + Data);
|
||||||
|
Session.SystemLog(' CurArea: ' + strI2S(Session.User.ThisUser.LastMBase));
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
If (Data = '+') or (Data = '-') Then Begin
|
If (Data = '+') or (Data = '-') Then Begin
|
||||||
Reset (MBaseFile);
|
Reset (MBaseFile);
|
||||||
|
|
||||||
A := Session.User.ThisUser.LastMBase - 1;
|
Count := Session.User.ThisUser.LastMBase - 1;
|
||||||
|
|
||||||
Repeat
|
Repeat
|
||||||
Case Data[1] of
|
Case Data[1] of
|
||||||
'+' : Inc(A);
|
'+' : Inc(Count);
|
||||||
'-' : Dec(A);
|
'-' : Dec(Count);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
{$I-}
|
{$I-}
|
||||||
Seek (MBaseFile, A);
|
Seek (MBaseFile, Count);
|
||||||
Read (MBaseFile, MBase);
|
Read (MBaseFile, MBase);
|
||||||
{$I+}
|
{$I+}
|
||||||
|
|
||||||
|
@ -332,15 +337,19 @@ Begin
|
||||||
Exit;
|
Exit;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
A := strS2I(Data);
|
Count := strS2I(Data);
|
||||||
|
|
||||||
If A > 0 Then Begin
|
{$IFDEF LOGGING}
|
||||||
Inc (A);
|
Session.SystemLog('Numeric change converstion: ' + strI2S(Count));
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
If Count > 0 Then Begin
|
||||||
|
Inc (Count);
|
||||||
|
|
||||||
Reset (MBaseFile);
|
Reset (MBaseFile);
|
||||||
|
|
||||||
If A <= FileSize(MBaseFile) Then Begin
|
If Count <= FileSize(MBaseFile) Then Begin
|
||||||
Seek (MBaseFile, A-1);
|
Seek (MBaseFile, Count - 1);
|
||||||
Read (MBaseFile, MBase);
|
Read (MBaseFile, MBase);
|
||||||
|
|
||||||
If Session.User.Access(MBase.ListACS) Then Begin
|
If Session.User.Access(MBase.ListACS) Then Begin
|
||||||
|
@ -377,12 +386,12 @@ Begin
|
||||||
Break;
|
Break;
|
||||||
Until False;
|
Until False;
|
||||||
|
|
||||||
A := strS2I(Str);
|
Count := strS2I(Str);
|
||||||
|
|
||||||
If (A > 0) and (A <= Total) Then Begin
|
If (Count > 0) and (Count <= Total) Then Begin
|
||||||
Reset (MBaseFile);
|
Reset (MBaseFile);
|
||||||
If Not Compress Then Begin
|
If Not Compress Then Begin
|
||||||
Seek (MBaseFile, A - 1);
|
Seek (MBaseFile, Count - 1);
|
||||||
Read (MBaseFile, MBase);
|
Read (MBaseFile, MBase);
|
||||||
|
|
||||||
If Not Session.User.Access(MBase.ListACS) Then Begin
|
If Not Session.User.Access(MBase.ListACS) Then Begin
|
||||||
|
@ -393,12 +402,12 @@ Begin
|
||||||
End Else Begin
|
End Else Begin
|
||||||
Total := 0;
|
Total := 0;
|
||||||
|
|
||||||
While Not Eof(MBaseFile) And (A <> Total) Do Begin
|
While Not Eof(MBaseFile) And (Count <> Total) Do Begin
|
||||||
Read (MBaseFile, MBase);
|
Read (MBaseFile, MBase);
|
||||||
If Session.User.Access(MBase.ListACS) Then Inc(Total);
|
If Session.User.Access(MBase.ListACS) Then Inc(Total);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If A <> Total Then Begin
|
If Count <> Total Then Begin
|
||||||
Close (MBaseFile);
|
Close (MBaseFile);
|
||||||
MBase := OLD;
|
MBase := OLD;
|
||||||
Exit;
|
Exit;
|
||||||
|
|
|
@ -239,7 +239,7 @@ End;
|
||||||
|
|
||||||
Procedure TMsgBaseABS.DoString (Str: String);
|
Procedure TMsgBaseABS.DoString (Str: String);
|
||||||
Var
|
Var
|
||||||
Count : SmallWord;
|
Count : Word;
|
||||||
Begin
|
Begin
|
||||||
For Count := 1 to Length(Str) Do
|
For Count := 1 to Length(Str) Do
|
||||||
DoChar(Str[Count]);
|
DoChar(Str[Count]);
|
||||||
|
|
|
@ -76,6 +76,8 @@ Uses
|
||||||
|
|
||||||
Constructor TBBSUser.Create (Var Owner: Pointer);
|
Constructor TBBSUser.Create (Var Owner: Pointer);
|
||||||
Begin
|
Begin
|
||||||
|
FillChar(ThisUser, SizeOf(ThisUser), #0);
|
||||||
|
|
||||||
UserNum := -1;
|
UserNum := -1;
|
||||||
ThisUser.ScreenSize := Config.DefScreenSize;
|
ThisUser.ScreenSize := Config.DefScreenSize;
|
||||||
ThisUser.DateType := 1;
|
ThisUser.DateType := 1;
|
||||||
|
@ -86,6 +88,10 @@ Begin
|
||||||
ThisUser.EditType := 1;
|
ThisUser.EditType := 1;
|
||||||
ThisUser.Birthday := CurDateJulian;
|
ThisUser.Birthday := CurDateJulian;
|
||||||
ThisUser.Gender := 'U';
|
ThisUser.Gender := 'U';
|
||||||
|
ThisUser.FirstOn := CurDateDos;
|
||||||
|
ThisUser.Archive := Config.qwkArchive;
|
||||||
|
ThisUser.LastFGroup := Config.StartFGroup;
|
||||||
|
ThisUser.LastMGroup := Config.StartMGroup;
|
||||||
|
|
||||||
IgnoreGroup := False;
|
IgnoreGroup := False;
|
||||||
InChat := False;
|
InChat := False;
|
||||||
|
@ -914,13 +920,13 @@ Begin
|
||||||
|
|
||||||
Upgrade_User_Level (True, ThisUser, Config.NewUserSec);
|
Upgrade_User_Level (True, ThisUser, Config.NewUserSec);
|
||||||
|
|
||||||
ThisUser.FirstOn := CurDateDos;
|
// ThisUser.FirstOn := CurDateDos;
|
||||||
ThisUser.Archive := Config.qwkArchive;
|
// ThisUser.Archive := Config.qwkArchive;
|
||||||
ThisUser.LastFBase := 0;
|
// ThisUser.LastFBase := 0;
|
||||||
ThisUser.LastFGroup := Config.StartFGroup;
|
// ThisUser.LastFGroup := Config.StartFGroup;
|
||||||
ThisUser.LastMGroup := Config.StartMGroup;
|
// ThisUser.LastMGroup := Config.StartMGroup;
|
||||||
ThisUser.LastMBase := 0;
|
// ThisUser.LastMBase := 0;
|
||||||
ThisUser.Flags := 0;
|
// ThisUser.Flags := 0;
|
||||||
|
|
||||||
If Not Config.AskRealName Then ThisUser.RealName := ThisUser.Handle;
|
If Not Config.AskRealName Then ThisUser.RealName := ThisUser.Handle;
|
||||||
If Not Config.AskAlias Then ThisUser.Handle := ThisUser.RealName;
|
If Not Config.AskAlias Then ThisUser.Handle := ThisUser.RealName;
|
||||||
|
@ -1156,6 +1162,7 @@ Begin
|
||||||
|
|
||||||
Session.io.Graphics := 0;
|
Session.io.Graphics := 0;
|
||||||
|
|
||||||
|
Session.systemLog ('-');
|
||||||
Session.SystemLog ('Connect from ' + Session.UserIPInfo + ' (' + Session.UserHostInfo + ')');
|
Session.SystemLog ('Connect from ' + Session.UserIPInfo + ' (' + Session.UserHostInfo + ')');
|
||||||
|
|
||||||
If Config.SystemPW <> '' Then
|
If Config.SystemPW <> '' Then
|
||||||
|
|
|
@ -136,9 +136,7 @@ Procedure CheckDIR (Dir: String);
|
||||||
Begin
|
Begin
|
||||||
If Not FileDirExists(Dir) Then Begin
|
If Not FileDirExists(Dir) Then Begin
|
||||||
Screen.WriteLine ('ERROR: ' + Dir + ' does not exist.');
|
Screen.WriteLine ('ERROR: ' + Dir + ' does not exist.');
|
||||||
|
|
||||||
DisposeClasses;
|
DisposeClasses;
|
||||||
|
|
||||||
Halt(1);
|
Halt(1);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -232,7 +230,6 @@ Begin
|
||||||
|
|
||||||
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
|
||||||
If FileExist(Config.DataPath + 'users.dat') Then Begin
|
If FileExist(Config.DataPath + 'users.dat') Then Begin
|
||||||
Screen.WriteLine ('ERROR: Unable to access USERS.DAT');
|
Screen.WriteLine ('ERROR: Unable to access USERS.DAT');
|
||||||
|
@ -242,9 +239,13 @@ Begin
|
||||||
|
|
||||||
ReWrite(Session.User.UserFile);
|
ReWrite(Session.User.UserFile);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Close (Session.User.UserFile);
|
Close (Session.User.UserFile);
|
||||||
|
|
||||||
|
Assign (VoteFile, Config.DataPath + 'votes.dat');
|
||||||
|
{$I-} Reset (VoteFile); {$I+}
|
||||||
|
If IoResult <> 0 Then ReWrite (VoteFile);
|
||||||
|
Close (VoteFile);
|
||||||
|
|
||||||
If Session.ConfigMode Then Exit;
|
If Session.ConfigMode Then Exit;
|
||||||
|
|
||||||
CheckDIR (Config.SystemPath);
|
CheckDIR (Config.SystemPath);
|
||||||
|
@ -310,11 +311,6 @@ Begin
|
||||||
If IoResult <> 0 Then ReWrite(Session.FileBase.ArcFile);
|
If IoResult <> 0 Then ReWrite(Session.FileBase.ArcFile);
|
||||||
Close (Session.FileBase.ArcFile);
|
Close (Session.FileBase.ArcFile);
|
||||||
|
|
||||||
Assign (VoteFile, Config.DataPath + 'votes.dat');
|
|
||||||
{$I-} Reset (VoteFile); {$I+}
|
|
||||||
If IoResult <> 0 Then ReWrite (VoteFile);
|
|
||||||
Close (VoteFile);
|
|
||||||
|
|
||||||
Assign (Session.FileBase.ProtocolFile, Config.DataPath + 'protocol.dat');
|
Assign (Session.FileBase.ProtocolFile, Config.DataPath + 'protocol.dat');
|
||||||
{$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);
|
||||||
|
@ -414,7 +410,7 @@ Begin
|
||||||
|
|
||||||
Session.FindNextEvent;
|
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
|
||||||
Session.SetTimeLeft(Session.TimeOffset)
|
Session.SetTimeLeft(Session.TimeOffset)
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
===========================================================================
|
===========================================================================
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{$PACKRECORDS 1}
|
||||||
|
|
||||||
Const
|
Const
|
||||||
mysSoftwareID = 'Mystic';
|
mysSoftwareID = 'Mystic';
|
||||||
mysCopyYear = '1997-2012';
|
mysCopyYear = '1997-2012';
|
||||||
|
@ -251,19 +253,6 @@ Const
|
||||||
UserNoCaller = $00000010;
|
UserNoCaller = $00000010;
|
||||||
UserNoPWChange = $00000020;
|
UserNoPWChange = $00000020;
|
||||||
|
|
||||||
//FUTURE DATA FILE UPDATES NEEDED
|
|
||||||
//LASTON needs optional1-10 compare to Mystic2
|
|
||||||
//MENUS
|
|
||||||
// remove fallback?
|
|
||||||
// (flags)
|
|
||||||
// menu descriptions
|
|
||||||
// node action
|
|
||||||
// command timer
|
|
||||||
// input chars
|
|
||||||
// (commands)
|
|
||||||
// TBD compare to mystic 2
|
|
||||||
// VOTING: expand ACS to s[30]
|
|
||||||
|
|
||||||
Type
|
Type
|
||||||
RecUser = Record { USERS.DAT }
|
RecUser = Record { USERS.DAT }
|
||||||
PermIdx : LongInt; // permanent user number
|
PermIdx : LongInt; // permanent user number
|
||||||
|
@ -431,7 +420,7 @@ Type
|
||||||
ITemplate : String[20];
|
ITemplate : String[20];
|
||||||
Index : Word;
|
Index : Word;
|
||||||
Flags : LongInt;
|
Flags : LongInt;
|
||||||
Res : Array[1..74] of Byte;
|
Res : Array[1..80] of Byte;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
FScanRec = Record { <Data Path> *.SCN }
|
FScanRec = Record { <Data Path> *.SCN }
|
||||||
|
|
Loading…
Reference in New Issue