This commit is contained in:
mysticbbs 2013-09-16 16:31:39 -04:00
parent 484bfdf0a7
commit 8d8193c7a8
32 changed files with 521 additions and 629 deletions

View File

@ -112,7 +112,7 @@ Uses
m_Strings, m_Strings,
BBS_Core, BBS_Core,
BBS_IO, BBS_IO,
BBS_Common, BBS_DataBase,
BBS_Ansi_MenuInput; BBS_Ansi_MenuInput;
Procedure WriteXY (X, Y, A: Byte; S: String); Procedure WriteXY (X, Y, A: Byte; S: String);
@ -244,7 +244,7 @@ Var
Count : Byte; Count : Byte;
Begin Begin
For Count := Y1 to Y2 Do For Count := Y1 to Y2 Do
WriteXY (X, Count, 112, '³'); WriteXY (X, Count, 112, #179);
End; End;
Function ShowMsgBox (BoxType : Byte; Str : String) : Boolean; Function ShowMsgBox (BoxType : Byte; Str : String) : Boolean;
@ -354,9 +354,9 @@ Var
Begin Begin
If Not WasOpened Then If Not WasOpened Then
If Shadow Then If Shadow Then
Screen.GetScreenImage(X1, Y1, X2 + 2, Y2 + 1, Image) Console.GetScreenImage(X1, Y1, X2 + 2, Y2 + 1, Image)
Else Else
Screen.GetScreenImage(X1, Y1, X2, Y2, Image); Console.GetScreenImage(X1, Y1, X2, Y2, Image);
WasOpened := True; WasOpened := True;
@ -389,14 +389,14 @@ Begin
If Shadow Then Begin If Shadow Then Begin
For A := Y1 + 1 to Y2 + 1 Do For A := Y1 + 1 to Y2 + 1 Do
For B := X2 + 1 to X2 + 2 Do Begin For B := X2 + 1 to X2 + 2 Do Begin
Ch := Screen.ReadCharXY(B, A); Ch := Console.ReadCharXY(B, A);
WriteXY (B, A, ShadowAttr, Ch); WriteXY (B, A, ShadowAttr, Ch);
End; End;
A := Y2 + 1; A := Y2 + 1;
For B := (X1 + 2) To (X2 + 2) Do Begin For B := (X1 + 2) To (X2 + 2) Do Begin
Ch := Screen.ReadCharXY(B, A); Ch := Console.ReadCharXY(B, A);
WriteXY (B, A, ShadowAttr, Ch); WriteXY (B, A, ShadowAttr, Ch);
End; End;
End; End;
@ -413,7 +413,7 @@ Begin
GetMem (HideImage, SizeOf(TConsoleImageRec)); GetMem (HideImage, SizeOf(TConsoleImageRec));
Screen.GetScreenImage (Image.X1, Image.Y1, Image.X2, Image.Y2, HideImage^); Console.GetScreenImage (Image.X1, Image.Y1, Image.X2, Image.Y2, HideImage^);
Session.io.RemoteRestore(Image); Session.io.RemoteRestore(Image);
End; End;

View File

@ -34,7 +34,7 @@ Implementation
Uses Uses
bbs_Core, bbs_Core,
bbs_Common, bbs_DataBase,
bbs_IO; bbs_IO;
Constructor TAnsiMenuInput.Create; Constructor TAnsiMenuInput.Create;
@ -179,7 +179,7 @@ Var
WriteXY (X, Y, Attr, T); WriteXY (X, Y, Attr, T);
WriteXY (X + Length(T), Y, FillAttr, strRep(FillChar, Field - Length(T))); WriteXY (X + Length(T), Y, FillAttr, strRep(FillChar, Field - Length(T)));
Session.io.AnsiGotoXY (X + CurPos - 1, Screen.CursorY); Session.io.AnsiGotoXY (X + CurPos - 1, Console.CursorY);
End; End;
Procedure ReDrawPart; Procedure ReDrawPart;
@ -254,7 +254,7 @@ Begin
Inc (CurPos); Inc (CurPos);
Inc (StrPos); Inc (StrPos);
Session.io.AnsiGotoXY (Screen.CursorX + 1, Screen.CursorY); Session.io.AnsiGotoXY (Console.CursorX + 1, Console.CursorY);
End; End;
#75 : If StrPos > 1 Then Begin #75 : If StrPos > 1 Then Begin
If CurPos = 1 Then ScrollLeft; If CurPos = 1 Then ScrollLeft;
@ -262,7 +262,7 @@ Begin
Dec (StrPos); Dec (StrPos);
Dec (CurPos); Dec (CurPos);
Session.io.AnsiGotoXY (Screen.CursorX - 1, Screen.CursorY); Session.io.AnsiGotoXY (Console.CursorX - 1, Console.CursorY);
End; End;
#71 : If StrPos > 1 Then Begin #71 : If StrPos > 1 Then Begin
StrPos := 1; StrPos := 1;
@ -303,7 +303,7 @@ Begin
If CurPos = 1 Then If CurPos = 1 Then
ScrollLeft ScrollLeft
Else Begin Else Begin
Session.io.AnsiMoveX(Screen.CursorX - 1); Session.io.AnsiMoveX(Console.CursorX - 1);
Dec (CurPos); Dec (CurPos);

View File

@ -309,7 +309,7 @@ Var
While Not Eof(EchoFile) Do Begin While Not Eof(EchoFile) Do Begin
Read (EchoFile, EchoNode); Read (EchoFile, EchoNode);
List.Add(strPadR(strI2S(FilePos(EchoFile)), 7, ' ') + ' ' + strPadL(strYN(EchoNode.Active), 3, ' ') + ' ' + strPadR(EchoNode.Description, 35, ' ') + ' ' + strPadL(strAddr2Str(EchoNode.Address), 17, ' '), 0); List.Add(strPadR(strI2S(FilePos(EchoFile)), 7, ' ') + ' ' + strPadL(strYN(EchoNode.Active), 3, ' ') + ' ' + strPadR(EchoNode.Description, 35, ' ') + ' ' + strPadL(Addr2Str(EchoNode.Address), 17, ' '), 0);
End; End;
List.Add('', 2); List.Add('', 2);
@ -461,7 +461,7 @@ Function Configuration_EchomailAddress (Edit: Boolean) : Byte;
Form.Free; Form.Free;
Box.Free; Box.Free;
If strAddr2Str(bbsCfg.NetAddress[Num]) = '0:0/0' Then If Addr2Str(bbsCfg.NetAddress[Num]) = '0:0/0' Then
bbsCfg.NetDomain[Num] := '' bbsCfg.NetDomain[Num] := ''
Else Else
If bbsCfg.NetDomain[Num] = '' Then Begin If bbsCfg.NetDomain[Num] = '' Then Begin
@ -481,7 +481,7 @@ Var
List.Clear; List.Clear;
For A := 1 to 30 Do For A := 1 to 30 Do
List.Add(strPadR(strAddr2Str(bbsCfg.NetAddress[A]), 23, ' ') + ' ' + strPadR(bbsCfg.NetDomain[A], 8, ' ') + ' ' + strPadR(strYN(bbsCfg.NetPrimary[A]), 3, ' ') + ' ' + bbsCfg.NetDesc[A], 0); List.Add(strPadR(Addr2Str(bbsCfg.NetAddress[A]), 23, ' ') + ' ' + strPadR(bbsCfg.NetDomain[A], 8, ' ') + ' ' + strPadR(strYN(bbsCfg.NetPrimary[A]), 3, ' ') + ' ' + bbsCfg.NetDesc[A], 0);
End; End;
Var Var
@ -547,7 +547,7 @@ Var
Read (ExportFile, ExpNode); Read (ExportFile, ExpNode);
If GetNodeByIndex(ExpNode, Node) Then If GetNodeByIndex(ExpNode, Node) Then
List.Add(strPadR(strI2S(FilePos(ExportFile)), 4, ' ') + ' ' + strPadR(Node.Description, 37, ' ') + ' ' + strPadL(strAddr2Str(Node.Address), 12, ' '), 0) List.Add(strPadR(strI2S(FilePos(ExportFile)), 4, ' ') + ' ' + strPadR(Node.Description, 37, ' ') + ' ' + strPadL(Addr2Str(Node.Address), 12, ' '), 0)
Else Else
List.Add('XXX UNKNOWN - DELETE THIS', 0); List.Add('XXX UNKNOWN - DELETE THIS', 0);
End; End;

View File

@ -36,7 +36,7 @@ Procedure Configuration_ExecuteEditor (Mode: Char);
Var Var
TmpImage : TConsoleImageRec; TmpImage : TConsoleImageRec;
Begin Begin
Screen.GetScreenImage (1, 1, 79, 24, TmpImage); Console.GetScreenImage (1, 1, 79, 24, TmpImage);
Case Mode of Case Mode of
'A' : Configuration_ArchiveEditor; 'A' : Configuration_ArchiveEditor;
@ -98,7 +98,7 @@ Var
Begin Begin
Len := Length(Text) + 6; Len := Length(Text) + 6;
Screen.GetScreenImage(X1, 1, X1 + Len, 3, Image); Console.GetScreenImage(X1, 1, X1 + Len, 3, Image);
WriteXYPipe (X1, 1, 8, Len, 'Ü|15Ü|11ÜÜ|03ÜÜ|09Ü|03Ü|09' + strRep('Ü', Len - 9) + '|08Ü'); WriteXYPipe (X1, 1, 8, Len, 'Ü|15Ü|11ÜÜ|03ÜÜ|09Ü|03Ü|09' + strRep('Ü', Len - 9) + '|08Ü');
WriteXYPipe (X1, 2, 8, Len, 'Ý|09|17² |15' + Text + ' |00°|16|08Þ'); WriteXYPipe (X1, 2, 8, Len, 'Ý|09|17² |15' + Text + ' |00°|16|08Þ');
@ -316,9 +316,9 @@ Begin
Form.Free; Form.Free;
ReWrite (ConfigFile); ReWrite (Session.ConfigFile);
Write (ConfigFile, bbsCfg); Write (Session.ConfigFile, bbsCfg);
Close (ConfigFile); Close (Session.ConfigFile);
End; End;
End. End.

View File

@ -1,4 +1,4 @@
Unit bbs_cfg_MenuEdit; Unit BBS_Cfg_MenuEdit;
{$I M_OPS.PAS} {$I M_OPS.PAS}
@ -174,7 +174,7 @@ Var
OldData : TMenuData; OldData : TMenuData;
TmpImage : TConsoleImageRec; TmpImage : TConsoleImageRec;
Begin Begin
Screen.GetScreenImage (1, 1, 79, 24, TmpImage); Console.GetScreenImage (1, 1, 79, 24, TmpImage);
Session.io.OutFull('|07|16|CL'); Session.io.OutFull('|07|16|CL');
Session.io.BufFlush; Session.io.BufFlush;

View File

@ -158,7 +158,7 @@ Begin
Form.AddBits ('9', ' Pvt Reply' , 55, 21, 68, 21, 11, MBPrivReply, @MBase.Flags, Topic + 'Allow private posts in public?'); Form.AddBits ('9', ' Pvt Reply' , 55, 21, 68, 21, 11, MBPrivReply, @MBase.Flags, Topic + 'Allow private posts in public?');
Repeat Repeat
WriteXY (19, 15, 113, strPadR(strAddr2Str(bbsCfg.NetAddress[MBase.NetAddr]), 19, ' ')); WriteXY (19, 15, 113, strPadR(Addr2Str(bbsCfg.NetAddress[MBase.NetAddr]), 19, ' '));
Links := FileByteSize(MBase.Path + MBase.FileName + '.lnk'); Links := FileByteSize(MBase.Path + MBase.FileName + '.lnk');
@ -299,7 +299,7 @@ Var
Form.LoExitChars := #21#27; Form.LoExitChars := #21#27;
Repeat Repeat
WriteXY (28, 12, 113, strPadR(strAddr2Str(bbsCfg.NetAddress[Global.NetAddr]), 19, ' ')); WriteXY (28, 12, 113, strPadR(Addr2Str(bbsCfg.NetAddress[Global.NetAddr]), 19, ' '));
If AddStr <> '' Then If AddStr <> '' Then
WriteXY (28, 20, 113, strPadR(AddStr, 12, ' ')); WriteXY (28, 20, 113, strPadR(AddStr, 12, ' '));
@ -312,13 +312,13 @@ Var
AddIdx := Configuration_EchoMailNodes(False); AddIdx := Configuration_EchoMailNodes(False);
If GetNodeByIndex(AddIdx, EN) Then If GetNodeByIndex(AddIdx, EN) Then
AddStr := strAddr2Str(EN.Address); AddStr := Addr2Str(EN.Address);
End; End;
'8' : Begin '8' : Begin
DelIdx := Configuration_EchoMailNodes(False); DelIdx := Configuration_EchoMailNodes(False);
If GetNodeByIndex(DelIdx, EN) Then If GetNodeByIndex(DelIdx, EN) Then
DelStr := strAddr2Str(EN.Address); DelStr := Addr2Str(EN.Address);
End; End;
'D' : Global.NetAddr := Configuration_EchoMailAddress(False); 'D' : Global.NetAddr := Configuration_EchoMailAddress(False);
#21 : Begin #21 : Begin
@ -404,7 +404,7 @@ Var
If MBase.QwkNetID <> 0 Then If MBase.QwkNetID <> 0 Then
Addr := 'QwkNet' Addr := 'QwkNet'
Else Else
Addr := strAddr2Str(bbsCfg.NetAddress[MBase.NetAddr]); Addr := Addr2Str(bbsCfg.NetAddress[MBase.NetAddr]);
List.Add(strPadR(strI2S(FilePos(MBaseFile) - 1), 5, ' ') + ' ' + strPadR(strStripMCI(MBase.Name), 35, ' ') + ' ' + strPadL(Addr, 12, ' '), Tag); List.Add(strPadR(strI2S(FilePos(MBaseFile) - 1), 5, ' ') + ' ' + strPadR(strStripMCI(MBase.Name), 35, ' ') + ' ' + strPadL(Addr, 12, ' '), Tag);
End; End;

View File

@ -414,8 +414,8 @@ Var
Session.io.OutFull(SimStr); Session.io.OutFull(SimStr);
SavedX := Screen.CursorX; SavedX := Console.CursorX;
SavedY := Screen.CursorY; SavedY := Console.CursorY;
WriteXY (1, 23, 112, strPadC('Simulating Prompt', 79, ' ')); WriteXY (1, 23, 112, strPadC('Simulating Prompt', 79, ' '));
@ -463,7 +463,7 @@ Var
Image : TConsoleImageRec; Image : TConsoleImageRec;
SavedTheme : RecTheme; SavedTheme : RecTheme;
Begin Begin
Screen.GetScreenImage(1, 1, 79, 24, Image); Console.GetScreenImage(1, 1, 79, 24, Image);
If Not LoadStringData Then Exit; If Not LoadStringData Then Exit;

View File

@ -85,7 +85,7 @@ Begin
Box.Open (6, 5, 74, 21); Box.Open (6, 5, 74, 21);
Screen.GetScreenImage (6, 5, 74, 21, BoxImage); Console.GetScreenImage (6, 5, 74, 21, BoxImage);
Birthdate := DateJulian2Str(U.Birthday, 1); Birthdate := DateJulian2Str(U.Birthday, 1);
FirstCall := DateDos2Str(U.FirstOn, 1); FirstCall := DateDos2Str(U.FirstOn, 1);
@ -352,7 +352,7 @@ Begin
Configuration_EditUser (Session.User.ThisUser); Configuration_EditUser (Session.User.ThisUser);
Screen.WriteXY (1, 24, 7, strRep(' ', 80)); Console.WriteXY (1, 24, 7, strRep(' ', 80));
Session.InUserEdit := False; Session.InUserEdit := False;
Session.LocalMode := SavedLocal; Session.LocalMode := SavedLocal;
@ -360,7 +360,7 @@ Begin
Session.SetTimeLeft(Session.User.ThisUser.TimeLeft); Session.SetTimeLeft(Session.User.ThisUser.TimeLeft);
{$IFNDEF UNIX} {$IFNDEF UNIX}
UpdateStatusLine(StatusPtr, ''); UpdateStatusLine(Session.StatusPtr, '');
{$ENDIF} {$ENDIF}
End; End;

View File

@ -28,24 +28,10 @@ Const
WinConsoleTitle = mysSoftwareID + ' Node '; WinConsoleTitle = mysSoftwareID + ' Node ';
DateTypeStr : Array[1..4] of String[8] = ('MM/DD/YY', 'DD/MM/YY', 'YY/DD/MM', 'Ask '); DateTypeStr : Array[1..4] of String[8] = ('MM/DD/YY', 'DD/MM/YY', 'YY/DD/MM', 'Ask ');
Var
Screen : TOutput;
Input : TInput;
CurRoom : Byte;
ConfigFile : File of RecConfig;
ChatFile : File of ChatRec;
RoomFile : File of RoomRec;
Room : RoomRec;
LastOnFile : File of RecLastOn;
LastOn : RecLastOn;
StatusPtr : Byte = 1;
Function DrawAccessFlags (Var Flags: AccessFlagType) : String; Function DrawAccessFlags (Var Flags: AccessFlagType) : String;
Procedure KillRecord (Var dFile; RecNum: LongInt; RecSize: Word); Procedure KillRecord (Var dFile; RecNum: LongInt; RecSize: Word);
Procedure AddRecord (var dFile; RecNum: LongInt; RecSize: Word); Procedure AddRecord (var dFile; RecNum: LongInt; RecSize: Word);
Function Bool_Search (Mask: String; Str: String) : Boolean; Function Bool_Search (Mask: String; Str: String) : Boolean;
Function strAddr2Str (Addr: RecEchoMailAddr) : String;
Function strStr2Addr (S : String; Var Addr: RecEchoMailAddr) : Boolean;
Function ShellDOS (ExecPath: String; Command: String) : LongInt; Function ShellDOS (ExecPath: String; Command: String) : LongInt;
{$IFNDEF UNIX} {$IFNDEF UNIX}
@ -138,50 +124,6 @@ Begin
Bool_Search := Pos(strUpper(Mask), strUpper(Str)) > 0; Bool_Search := Pos(strUpper(Mask), strUpper(Str)) > 0;
End; End;
Function strStr2Addr (S : String; Var Addr: RecEchoMailAddr) : Boolean;
{ converts address string to type. returns false is invalid string }
Var
A : Byte;
B : Byte;
C : Byte;
Point : Boolean;
Begin
Result := False;
Point := True;
A := Pos(':', S);
B := Pos('/', S);
C := Pos('.', S);
If (A = 0) or (B <= A) Then Exit;
If C = 0 Then Begin
Point := False;
C := Length(S) + 1;
Addr.Point := 0;
End;
Addr.Zone := strS2I(Copy(S, 1, A - 1));
Addr.Net := strS2I(Copy(S, A + 1, B - 1 - A));
Addr.Node := strS2I(Copy(S, B + 1, C - 1 - B));
If Point Then Addr.Point := strS2I(Copy(S, C + 1, Length(S)));
Result := True;
End;
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
Var
Temp : String[20];
Begin
Temp := strI2S(Addr.Zone) + ':' + strI2S(Addr.Net) + '/' +
strI2S(Addr.Node);
If Addr.Point <> 0 Then Temp := Temp + '.' + strI2S(Addr.Point);
Result := Temp;
End;
Function ShellDOS (ExecPath: String; Command: String) : LongInt; Function ShellDOS (ExecPath: String; Command: String) : LongInt;
Begin Begin
Session.SystemLog('DEBUG: In ShellOS for: (' + ExecPath + ') ' + Command); Session.SystemLog('DEBUG: In ShellOS for: (' + ExecPath + ') ' + Command);
@ -200,13 +142,13 @@ Begin
End; End;
{$IFNDEF UNIX} {$IFNDEF UNIX}
Screen.SetWindow (1, 1, 80, 25, False); Console.SetWindow (1, 1, 80, 25, False);
Screen.TextAttr := 7; Console.TextAttr := 7;
Screen.ClearScreen; Console.ClearScreen;
{$ENDIF} {$ENDIF}
{$IFDEF UNIX} {$IFDEF UNIX}
Screen.SetRawMode(False); Console.SetRawMode(False);
{$ENDIF} {$ENDIF}
If ExecPath <> '' Then Begin If ExecPath <> '' Then Begin
@ -231,11 +173,11 @@ Begin
{$ENDIF} {$ENDIF}
{$IFDEF UNIX} {$IFDEF UNIX}
Screen.SetRawMode(True); Console.SetRawMode(True);
{$ENDIF} {$ENDIF}
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
Screen.SetWindowTitle (WinConsoleTitle + strI2S(Session.NodeNum)); Console.SetWindowTitle (WinConsoleTitle + strI2S(Session.NodeNum));
{$ENDIF} {$ENDIF}
DirChange(bbsCfg.SystemPath); DirChange(bbsCfg.SystemPath);
@ -250,7 +192,7 @@ Begin
// Reset (Session.PromptFile); // Reset (Session.PromptFile);
{$IFNDEF UNIX} {$IFNDEF UNIX}
If Screen.Active Then If Console.Active Then
Session.io.LocalScreenEnable Session.io.LocalScreenEnable
Else Else
Session.io.LocalScreenDisable; Session.io.LocalScreenDisable;
@ -264,41 +206,41 @@ Procedure UpdateStatusLine (Mode: Byte; Str: String);
Begin Begin
If Not bbsCfg.UseStatusBar Then Exit; If Not bbsCfg.UseStatusBar Then Exit;
Screen.SetWindow (1, 1, 80, 25, False); Console.SetWindow (1, 1, 80, 25, False);
Case Mode of Case Mode of
0 : Screen.WriteXY (1, 25, bbsCfg.StatusColor3, strPadC(Str, 80, ' ')); 0 : Console.WriteXY (1, 25, bbsCfg.StatusColor3, strPadC(Str, 80, ' '));
1 : Begin 1 : Begin
Screen.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Alias ' + strRep(' ', 35) + 'Age SecLevel TimeLeft '); Console.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Alias ' + strRep(' ', 35) + 'Age SecLevel TimeLeft ');
Screen.WriteXY ( 8, 25, bbsCfg.StatusColor2, Session.User.ThisUser.Handle + ' #' + strI2S(Session.User.ThisUser.PermIdx)); Console.WriteXY ( 8, 25, bbsCfg.StatusColor2, Session.User.ThisUser.Handle + ' #' + strI2S(Session.User.ThisUser.PermIdx));
Screen.WriteXY (47, 25, bbsCfg.StatusColor2, Session.User.ThisUser.Gender + '/' + strI2S(DaysAgo(Session.User.ThisUser.Birthday, 1) DIV 365)); Console.WriteXY (47, 25, bbsCfg.StatusColor2, Session.User.ThisUser.Gender + '/' + strI2S(DaysAgo(Session.User.ThisUser.Birthday, 1) DIV 365));
Screen.WriteXY (62, 25, bbsCfg.StatusColor2, strI2S(Session.User.ThisUser.Security)); Console.WriteXY (62, 25, bbsCfg.StatusColor2, strI2S(Session.User.ThisUser.Security));
Screen.WriteXY (76, 25, bbsCfg.StatusColor2, strI2S(Session.TimeLeft)); Console.WriteXY (76, 25, bbsCfg.StatusColor2, strI2S(Session.TimeLeft));
End; End;
2 : Begin 2 : Begin
Screen.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Email ' + strRep(' ', 35) + ' Location ' + strRep(' ', 27) + ' '); Console.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Email ' + strRep(' ', 35) + ' Location ' + strRep(' ', 27) + ' ');
Screen.WriteXY ( 8, 25, bbsCfg.StatusColor2, strPadR(Session.User.ThisUser.Email, 36, ' ')); Console.WriteXY ( 8, 25, bbsCfg.StatusColor2, strPadR(Session.User.ThisUser.Email, 36, ' '));
Screen.WriteXY (53, 25, bbsCfg.StatusColor2, strPadR(Session.User.ThisUser.City, 27, ' ')); Console.WriteXY (53, 25, bbsCfg.StatusColor2, strPadR(Session.User.ThisUser.City, 27, ' '));
End; End;
3 : Begin 3 : Begin
Screen.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' IP ' + strRep(' ', 19) + ' Host ' + strRep(' ', 49) + ' '); Console.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' IP ' + strRep(' ', 19) + ' Host ' + strRep(' ', 49) + ' ');
Screen.WriteXY ( 5, 25, bbsCfg.StatusColor2, Session.UserIPInfo); Console.WriteXY ( 5, 25, bbsCfg.StatusColor2, Session.UserIPInfo);
Screen.WriteXY (31, 25, bbsCfg.StatusColor2, strPadR(Session.UserHostInfo, 49, ' ')); Console.WriteXY (31, 25, bbsCfg.StatusColor2, strPadR(Session.UserHostInfo, 49, ' '));
End; End;
4 : Begin 4 : Begin
Screen.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Flags 1 ' + strRep(' ', 35) + ' Flags 2 '); Console.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Flags 1 ' + strRep(' ', 35) + ' Flags 2 ');
Screen.WriteXY (10, 25, bbsCfg.StatusColor2, DrawAccessFlags(Session.User.ThisUser.AF1)); Console.WriteXY (10, 25, bbsCfg.StatusColor2, DrawAccessFlags(Session.User.ThisUser.AF1));
Screen.WriteXY (54, 25, bbsCfg.StatusColor2, DrawAccessFlags(Session.User.ThisUser.AF2)); Console.WriteXY (54, 25, bbsCfg.StatusColor2, DrawAccessFlags(Session.User.ThisUser.AF2));
End; End;
5 : Screen.WriteXY (1, 25, bbsCfg.StatusColor3, ' ALTS/C Chat ALTE Edit ALTH Hangup ALT+/- Time ALTB Info ALTT Bar ALTV Screen '); 5 : Console.WriteXY (1, 25, bbsCfg.StatusColor3, ' ALTS/C Chat ALTE Edit ALTH Hangup ALT+/- Time ALTB Info ALTT Bar ALTV Screen ');
End; End;
Screen.SetWindow (1, 1, 80, 24, False); Console.SetWindow (1, 1, 80, 24, False);
End; End;
Procedure ProcessSysopCommand (Cmd: Char); Procedure ProcessSysopCommand (Cmd: Char);
Begin Begin
If Not Screen.Active And (Cmd <> #47) Then Exit; If Not Console.Active And (Cmd <> #47) Then Exit;
Case Cmd of Case Cmd of
{E} #18 : If (Not Session.InUserEdit) and (Session.User.UserNum <> -1) Then {E} #18 : If (Not Session.InUserEdit) and (Session.User.UserNum <> -1) Then
@ -307,10 +249,10 @@ Begin
bbsCfg.UseStatusBar := Not bbsCfg.UseStatusBar; bbsCfg.UseStatusBar := Not bbsCfg.UseStatusBar;
If Not bbsCfg.UseStatusBar Then Begin If Not bbsCfg.UseStatusBar Then Begin
Screen.WriteXY (1, 25, 0, strRep(' ', 80)); Console.WriteXY (1, 25, 0, strRep(' ', 80));
Screen.SetWindow (1, 1, 80, 25, False); Console.SetWindow (1, 1, 80, 25, False);
End Else End Else
UpdateStatusLine (StatusPtr, ''); UpdateStatusLine (Session.StatusPtr, '');
End; End;
{S} #31 : If Not Session.User.InChat Then OpenChat(True); {S} #31 : If Not Session.User.InChat Then OpenChat(True);
{H} #35 : Begin {H} #35 : Begin
@ -318,17 +260,17 @@ Begin
Halt(0); Halt(0);
End; End;
{C} #46 : If Not Session.User.InChat Then OpenChat(False); {C} #46 : If Not Session.User.InChat Then OpenChat(False);
{V} #47 : If Screen.Active Then {V} #47 : If Console.Active Then
Session.io.LocalScreenDisable Session.io.LocalScreenDisable
Else Else
Session.io.LocalScreenEnable; Session.io.LocalScreenEnable;
{B} #48 : Begin {B} #48 : Begin
If StatusPtr < 5 Then If Session.StatusPtr < 5 Then
Inc (StatusPtr) Inc (Session.StatusPtr)
Else Else
StatusPtr := 1; Session.StatusPtr := 1;
UpdateStatusLine (StatusPtr, ''); UpdateStatusLine (Session.StatusPtr, '');
End; End;
#59.. #59..
#62 : Begin #62 : Begin
@ -343,11 +285,11 @@ Begin
End; End;
{+} #130: If Session.TimeLeft > 1 Then Begin {+} #130: If Session.TimeLeft > 1 Then Begin
Session.SetTimeLeft(Session.TimeLeft-1); Session.SetTimeLeft(Session.TimeLeft-1);
UpdateStatusLine(StatusPtr, ''); UpdateStatusLine(Session.StatusPtr, '');
End; End;
{-} #131: If Session.TimeLeft < 999 Then Begin {-} #131: If Session.TimeLeft < 999 Then Begin
Session.SetTimeLeft(Session.TimeLeft+1); Session.SetTimeLeft(Session.TimeLeft+1);
UpdateStatusLine(StatusPtr, ''); UpdateStatusLine(Session.StatusPtr, '');
End; End;
End; End;
End; End;

View File

@ -82,6 +82,14 @@ Type
LastScanHadNew : Boolean; LastScanHadNew : Boolean;
LastScanHadYou : Boolean; LastScanHadYou : Boolean;
PromptData : Array[0..mysMaxThemeText] of Pointer; PromptData : Array[0..mysMaxThemeText] of Pointer;
StatusPtr : Byte;
CurRoom : Byte;
ConfigFile : File of RecConfig;
ChatFile : File of ChatRec;
RoomFile : File of RoomRec;
Room : RoomRec;
LastOnFile : File of RecLastOn;
LastOn : RecLastOn;
Constructor Create; Constructor Create;
Destructor Destroy; Override; Destructor Destroy; Override;
@ -141,6 +149,7 @@ Begin
AllowMessages := True; AllowMessages := True;
InMessage := False; InMessage := False;
MessageCheck := mysMessageThreshold; MessageCheck := mysMessageThreshold;
StatusPtr := 1;
{$IFNDEF UNIX} {$IFNDEF UNIX}
Client := TIOSocket.Create; Client := TIOSocket.Create;

View File

@ -23,8 +23,8 @@ Var
bbsCfg : RecConfig; bbsCfg : RecConfig;
bbsCfgPath : String; bbsCfgPath : String;
bbsCfgStatus : Byte; bbsCfgStatus : Byte;
Console : TOutput = NIL; Console : TOutput;
Keyboard : TInput = NIL; Keyboard : TInput;
Const Const
CfgOK = 0; CfgOK = 0;
@ -40,6 +40,7 @@ Function GetBaseConfiguration (UseEnv: Boolean; Var TempCfg: RecConfig) : Byte
Function PutBaseConfiguration (Var TempCfg: RecConfig) : Boolean; Function PutBaseConfiguration (Var TempCfg: RecConfig) : Boolean;
Function ExecuteProgram (ExecPath: String; Command: String) : LongInt; Function ExecuteProgram (ExecPath: String; Command: String) : LongInt;
Function Addr2Str (Addr : RecEchoMailAddr) : String; Function Addr2Str (Addr : RecEchoMailAddr) : String;
Function Str2Addr (S : String; Var Addr: RecEchoMailAddr) : Boolean;
// MESSAGE BASE // MESSAGE BASE
@ -86,6 +87,37 @@ Begin
Result := Temp; Result := Temp;
End; End;
Function Str2Addr (S : String; Var Addr: RecEchoMailAddr) : Boolean;
Var
A : Byte;
B : Byte;
C : Byte;
Point : Boolean;
Begin
Result := False;
Point := True;
A := Pos(':', S);
B := Pos('/', S);
C := Pos('.', S);
If (A = 0) or (B <= A) Then Exit;
If C = 0 Then Begin
Point := False;
C := Length(S) + 1;
Addr.Point := 0;
End;
Addr.Zone := strS2I(Copy(S, 1, A - 1));
Addr.Net := strS2I(Copy(S, A + 1, B - 1 - A));
Addr.Node := strS2I(Copy(S, B + 1, C - 1 - B));
If Point Then Addr.Point := strS2I(Copy(S, C + 1, Length(S)));
Result := True;
End;
Function GetOriginLine (Var mArea: RecMessageBase) : String; Function GetOriginLine (Var mArea: RecMessageBase) : String;
Var Var
Loc : Byte; Loc : Byte;
@ -414,6 +446,7 @@ Begin
Msg^.SetPriv (TempBase.Flags and MBPrivate <> 0); Msg^.SetPriv (TempBase.Flags and MBPrivate <> 0);
Msg^.SetDate (DateDos2Str(CurDateDos, 1)); Msg^.SetDate (DateDos2Str(CurDateDos, 1));
Msg^.SetTime (TimeDos2Str(CurDateDos, 0)); Msg^.SetTime (TimeDos2Str(CurDateDos, 0));
Msg^.SetSent (False);
End; End;
Function GetTotalFiles (Var TempBase: RecFileBase) : LongInt; Function GetTotalFiles (Var TempBase: RecFileBase) : LongInt;
@ -597,5 +630,7 @@ End;
Initialization Initialization
bbsCfgStatus := GetBaseConfiguration(True, bbsCfg); bbsCfgStatus := GetBaseConfiguration(True, bbsCfg);
Console := NIL;
Keyboard := NIL;
End. End.

View File

@ -233,7 +233,7 @@ Begin
WRITE_DOOR32(PassHandle); WRITE_DOOR32(PassHandle);
Screen.GetScreenImage(1,1,80,25, Image); Console.GetScreenImage(1,1,80,25, Image);
Cmd := Cmd + #0; Cmd := Cmd + #0;
@ -264,10 +264,10 @@ Begin
Close (Session.User.UserFile); Close (Session.User.UserFile);
End; End;
Screen.SetWindowTitle(WinConsoleTitle + strI2S(Session.NodeNum)); Console.SetWindowTitle(WinConsoleTitle + strI2S(Session.NodeNum));
Screen.PutScreenImage(Image); Console.PutScreenImage(Image);
UpdateStatusLine(StatusPtr, ''); UpdateStatusLine(Session.StatusPtr, '');
Session.TimeOut := TimerSeconds; Session.TimeOut := TimerSeconds;
End; End;

View File

@ -211,17 +211,17 @@ Procedure ProtocolStatus (Start, Finish: Boolean; Status: RecProtocolStatus);
Var Var
KBRate : LongInt; KBRate : LongInt;
Begin Begin
Screen.WriteXY (19, 10, 113, strPadR(Status.FileName, 56, ' ')); Console.WriteXY (19, 10, 113, strPadR(Status.FileName, 56, ' '));
Screen.WriteXY (19, 11, 113, strPadR(strComma(Status.FileSize), 15, ' ')); Console.WriteXY (19, 11, 113, strPadR(strComma(Status.FileSize), 15, ' '));
Screen.WriteXY (19, 12, 113, strPadR(strComma(Status.Position), 15, ' ')); Console.WriteXY (19, 12, 113, strPadR(strComma(Status.Position), 15, ' '));
Screen.WriteXY (64, 11, 113, strPadR(strI2S(Status.Errors), 3, ' ')); Console.WriteXY (64, 11, 113, strPadR(strI2S(Status.Errors), 3, ' '));
KBRate := 0; KBRate := 0;
If (TimerSeconds - Status.StartTime > 0) and (Status.Position > 0) Then If (TimerSeconds - Status.StartTime > 0) and (Status.Position > 0) Then
KBRate := Round((Status.Position / (TimerSeconds - Status.StartTime)) / 1024); KBRate := Round((Status.Position / (TimerSeconds - Status.StartTime)) / 1024);
Screen.WriteXY (64, 12, 113, strPadR(strI2S(KBRate) + ' k/sec', 12, ' ')); Console.WriteXY (64, 12, 113, strPadR(strI2S(KBRate) + ' k/sec', 12, ' '));
End; End;
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
@ -232,17 +232,17 @@ Procedure XferStatus (P: AbstractProtocolPtr; First, Last: Boolean);
Var Var
KBRate : LongInt; KBRate : LongInt;
Begin Begin
Screen.WriteXY (19, 10, 113, strPadR(P^.PathName, 56, ' ')); Console.WriteXY (19, 10, 113, strPadR(P^.PathName, 56, ' '));
Screen.WriteXY (19, 11, 113, strPadR(strComma(P^.SrcFileLen), 15, ' ')); Console.WriteXY (19, 11, 113, strPadR(strComma(P^.SrcFileLen), 15, ' '));
Screen.WriteXY (19, 12, 113, strPadR(strComma(P^.BytesTransferred), 15, ' ')); Console.WriteXY (19, 12, 113, strPadR(strComma(P^.BytesTransferred), 15, ' '));
Screen.WriteXY (64, 11, 113, strPadR(strI2S(P^.TotalErrors), 3, ' ')); Console.WriteXY (64, 11, 113, strPadR(strI2S(P^.TotalErrors), 3, ' '));
KBRate := 0; KBRate := 0;
If (TimerSeconds - P^.StartTimer > 0) and (P^.BytesTransferred > 0) Then If (TimerSeconds - P^.StartTimer > 0) and (P^.BytesTransferred > 0) Then
KBRate := Round((P^.SrcFileLen / (TimerSeconds - P^.StartTimer)) / 1024); KBRate := Round((P^.SrcFileLen / (TimerSeconds - P^.StartTimer)) / 1024);
Screen.WriteXY (64, 12, 113, strPadR(strI2S(KBRate) + ' k/sec', 12, ' ')); Console.WriteXY (64, 12, 113, strPadR(strI2S(KBRate) + ' k/sec', 12, ' '));
End; End;
{$ENDIF} {$ENDIF}
Procedure XferResult (P: AbstractProtocolPTR; Status: LogFileType); Procedure XferResult (P: AbstractProtocolPTR; Status: LogFileType);
@ -354,7 +354,7 @@ Var
Protocol^.SetShowStatusProc(@XferStatus); Protocol^.SetShowStatusProc(@XferStatus);
SavedL := Session.LocalMode; SavedL := Session.LocalMode;
SavedA := Screen.Active; SavedA := Console.Active;
Session.LocalMode := True; Session.LocalMode := True;
Session.io.LocalScreenEnable; Session.io.LocalScreenEnable;
@ -368,11 +368,11 @@ Var
Box.Open (6, 8, 76, 14); Box.Open (6, 8, 76, 14);
Screen.WriteXY ( 8, 10, 112, 'File Name:'); Console.WriteXY ( 8, 10, 112, 'File Name:');
Screen.WriteXY (13, 11, 112, 'Size:'); Console.WriteXY (13, 11, 112, 'Size:');
Screen.WriteXY ( 9, 12, 112, 'Position:'); Console.WriteXY ( 9, 12, 112, 'Position:');
Screen.WriteXY (56, 11, 112, 'Errors:'); Console.WriteXY (56, 11, 112, 'Errors:');
Screen.WriteXY (58, 12, 112, 'Rate:'); Console.WriteXY (58, 12, 112, 'Rate:');
{$ENDIF} {$ENDIF}
Case Mode of Case Mode of
@ -452,7 +452,7 @@ Var
{$IFNDEF UNIX} {$IFNDEF UNIX}
SavedL := Session.LocalMode; SavedL := Session.LocalMode;
SavedA := Screen.Active; SavedA := Console.Active;
Session.LocalMode := True; Session.LocalMode := True;
Protocol.StatusProc := ProtocolStatus; Protocol.StatusProc := ProtocolStatus;
@ -467,11 +467,11 @@ Var
Box.Open (6, 8, 76, 14); Box.Open (6, 8, 76, 14);
Screen.WriteXY ( 8, 10, 112, 'File Name:'); Console.WriteXY ( 8, 10, 112, 'File Name:');
Screen.WriteXY (13, 11, 112, 'Size:'); Console.WriteXY (13, 11, 112, 'Size:');
Screen.WriteXY ( 9, 12, 112, 'Position:'); Console.WriteXY ( 9, 12, 112, 'Position:');
Screen.WriteXY (56, 11, 112, 'Errors:'); Console.WriteXY (56, 11, 112, 'Errors:');
Screen.WriteXY (58, 12, 112, 'Rate:'); Console.WriteXY (58, 12, 112, 'Rate:');
{$ENDIF} {$ENDIF}
Case Mode of Case Mode of
@ -940,7 +940,7 @@ Begin
Session.io.PromptInfo[1] := FBase.Name; Session.io.PromptInfo[1] := FBase.Name;
Session.io.PromptInfo[3] := strI2S(AreaFiles); Session.io.PromptInfo[3] := strI2S(AreaFiles);
Session.io.OutBS (Screen.CursorX, False); Session.io.OutBS (Console.CursorX, False);
Session.io.OutFullLn (Session.GetPrompt(223)); Session.io.OutFullLn (Session.GetPrompt(223));
End; End;
@ -2129,9 +2129,9 @@ Var
Attr : Byte; Attr : Byte;
Begin Begin
If Bool_Search(Data, Temp) Then Begin If Bool_Search(Data, Temp) Then Begin
Attr := Screen.TextAttr; Attr := Console.TextAttr;
Screen.TextAttr := 255; Console.TextAttr := 255;
Insert ( Insert (
Session.io.Attr2Ansi(Session.Theme.FileDescLo), Session.io.Attr2Ansi(Session.Theme.FileDescLo),
@ -2139,14 +2139,14 @@ Var
Pos(Data, strUpper(Temp)) + Length(Data) Pos(Data, strUpper(Temp)) + Length(Data)
); );
Screen.TextAttr := 255; Console.TextAttr := 255;
Insert ( Insert (
Session.io.Attr2Ansi(Session.Theme.FileDescHi), Session.io.Attr2Ansi(Session.Theme.FileDescHi),
Temp, Temp,
Pos(Data, strUpper(Temp))); Pos(Data, strUpper(Temp)));
Screen.TextAttr := Attr; Console.TextAttr := Attr;
End; End;
End; End;
@ -2396,7 +2396,7 @@ Var
Inc (ListSize); Inc (ListSize);
List[ListSize].FileName := FDir.FileName; List[ListSize].FileName := FDir.FileName;
List[ListSize].YPos := Screen.CursorY - 1; List[ListSize].YPos := Console.CursorY - 1;
List[ListSize].RecPos := FilePos(FDirFile) - 1; List[ListSize].RecPos := FilePos(FDirFile) - 1;
End Else End Else
HeaderCheck; HeaderCheck;
@ -3514,7 +3514,7 @@ Var
Begin Begin
Session.io.PromptInfo[1] := FBase.Name; Session.io.PromptInfo[1] := FBase.Name;
Session.io.OutBS (Screen.CursorX, True); Session.io.OutBS (Console.CursorX, True);
Session.io.OutFull (Session.GetPrompt(87)); Session.io.OutFull (Session.GetPrompt(87));
Session.io.BufFlush; Session.io.BufFlush;
@ -3597,7 +3597,7 @@ Var
Begin Begin
Session.io.PromptInfo[1] := FBase.Name; Session.io.PromptInfo[1] := FBase.Name;
Session.io.OutBS (Screen.CursorX, True); Session.io.OutBS (Console.CursorX, True);
Session.io.OutFull (Session.GetPrompt(87)); Session.io.OutFull (Session.GetPrompt(87));
Session.io.BufFlush; Session.io.BufFlush;

View File

@ -498,28 +498,28 @@ Procedure ShowLastCallers;
Begin Begin
Session.io.OutFullLn (Session.GetPrompt(141)); Session.io.OutFullLn (Session.GetPrompt(141));
Reset (LastOnFile); Reset (Session.LastOnFile);
While Not Eof(LastOnFile) Do Begin While Not Eof(Session.LastOnFile) Do Begin
Read (LastOnFile, LastOn); Read (Session.LastOnFile, Session.LastOn);
Session.io.PromptInfo[1] := LastOn.Handle; Session.io.PromptInfo[1] := Session.LastOn.Handle;
Session.io.PromptInfo[2] := strI2S(LastOn.Node); Session.io.PromptInfo[2] := strI2S(Session.LastOn.Node);
Session.io.PromptInfo[3] := LastOn.City; Session.io.PromptInfo[3] := Session.LastOn.City;
Session.io.PromptInfo[4] := DateDos2Str(LastOn.DateTime, Session.User.ThisUser.DateType); Session.io.PromptInfo[4] := DateDos2Str(Session.LastOn.DateTime, Session.User.ThisUser.DateType);
Session.io.PromptInfo[5] := TimeDos2Str(LastOn.DateTime, 1); Session.io.PromptInfo[5] := TimeDos2Str(Session.LastOn.DateTime, 1);
Session.io.PromptInfo[7] := strI2S(LastOn.CallNum); Session.io.PromptInfo[7] := strI2S(Session.LastOn.CallNum);
Session.io.PromptInfo[8] := LastOn.Address; Session.io.PromptInfo[8] := Session.LastOn.Address;
Session.io.PromptInfo[9] := LastOn.UserInfo; Session.io.PromptInfo[9] := Session.LastOn.UserInfo;
Session.io.PromptInfo[10] := LastOn.EmailAddr; Session.io.PromptInfo[10] := Session.LastOn.EmailAddr;
Session.io.PromptInfo[11] := LastOn.OptionData[1]; Session.io.PromptInfo[11] := Session.LastOn.OptionData[1];
Session.io.PromptInfo[12] := LastOn.OptionData[2]; Session.io.PromptInfo[12] := Session.LastOn.OptionData[2];
Session.io.PromptInfo[13] := LastOn.OptionData[3]; Session.io.PromptInfo[13] := Session.LastOn.OptionData[3];
Session.io.OutFullLn (Session.GetPrompt(142)); Session.io.OutFullLn (Session.GetPrompt(142));
End; End;
Close (LastOnFile); Close (Session.LastOnFile);
Session.io.OutFull (Session.GetPrompt(143)); Session.io.OutFull (Session.GetPrompt(143));
End; End;
@ -1524,9 +1524,9 @@ Begin
MessageBeep(0); MessageBeep(0);
If Input.KeyPressed Then If Keyboard.KeyPressed Then
If Input.ReadKey = #0 Then Begin If Keyboard.ReadKey = #0 Then Begin
Case Input.ReadKey of Case Keyboard.ReadKey of
#31 : OpenChat(True); #31 : OpenChat(True);
#46 : OpenChat(False); #46 : OpenChat(False);
End; End;
@ -1538,7 +1538,7 @@ Begin
End; End;
End; End;
UpdateStatusLine (StatusPtr, ''); UpdateStatusLine (Session.StatusPtr, '');
Session.io.OutFull (Session.GetPrompt(28)); Session.io.OutFull (Session.GetPrompt(28));

View File

@ -235,7 +235,7 @@ Begin
SocketEvent := WSACreateEvent; SocketEvent := WSACreateEvent;
{$ENDIF} {$ENDIF}
Term := TTermAnsi.Create(Screen); Term := TTermAnsi.Create(Console);
End; End;
Destructor TBBSIO.Destroy; Destructor TBBSIO.Destroy;
@ -328,7 +328,7 @@ Begin
OutBufPos := 0; OutBufPos := 0;
Screen.BufFlush; Console.BufFlush;
{$ENDIF} {$ENDIF}
End; End;
@ -338,7 +338,7 @@ Var
Begin Begin
If Graphics = 0 Then Exit; If Graphics = 0 Then Exit;
T := Screen.CursorY; T := Console.CursorY;
If Y > T Then BufAddStr (#27 + '[' + strI2S(Y-T) + 'B') Else If Y > T Then BufAddStr (#27 + '[' + strI2S(Y-T) + 'B') Else
If Y < T Then BufAddStr (#27 + '[' + strI2S(T-Y) + 'A'); If Y < T Then BufAddStr (#27 + '[' + strI2S(T-Y) + 'A');
@ -350,7 +350,7 @@ Var
Begin Begin
If Graphics = 0 Then Exit; If Graphics = 0 Then Exit;
T := Screen.CursorX; T := Console.CursorX;
If X > T Then BufAddStr (#27 + '[' + strI2S(X-T) + 'C') Else If X > T Then BufAddStr (#27 + '[' + strI2S(X-T) + 'C') Else
If X < T Then BufAddStr (#27 + '[' + strI2S(T-X) + 'D'); If X < T Then BufAddStr (#27 + '[' + strI2S(T-X) + 'D');
@ -361,7 +361,7 @@ Var
Attr : Byte; Attr : Byte;
Ch : Char; Ch : Char;
Begin Begin
Attr := Screen.TextAttr; Attr := Console.TextAttr;
OutFull (TBBSCore(Core).GetPrompt(22)); OutFull (TBBSCore(Core).GetPrompt(22));
@ -384,13 +384,13 @@ Var
Begin Begin
SavedMCI := AllowMCI; SavedMCI := AllowMCI;
AllowMCI := True; AllowMCI := True;
SavedAttr := Screen.TextAttr; SavedAttr := Console.TextAttr;
OutFull (TBBSCore(Core).GetPrompt(132)); OutFull (TBBSCore(Core).GetPrompt(132));
Ch := OneKey('YNC' + #13, False); Ch := OneKey('YNC' + #13, False);
OutBS (Screen.CursorX, True); OutBS (Console.CursorX, True);
AnsiColor (SavedAttr); AnsiColor (SavedAttr);
PausePtr := 1; PausePtr := 1;
@ -522,9 +522,9 @@ Begin
'!' : If Code[2] in ['0'..'9'] Then Begin '!' : If Code[2] in ['0'..'9'] Then Begin
A := strS2I(Code[2]); A := strS2I(Code[2]);
ScreenInfo[A].X := Screen.CursorX; ScreenInfo[A].X := Console.CursorX;
ScreenInfo[A].Y := Screen.CursorY; ScreenInfo[A].Y := Console.CursorY;
ScreenInfo[A].A := Screen.TextAttr; ScreenInfo[A].A := Console.TextAttr;
End Else Begin End Else Begin
Result := False; Result := False;
@ -885,19 +885,19 @@ Begin
FmtString := False; FmtString := False;
End; End;
8 : Begin 8 : Begin
AnsiMoveY (Screen.CursorY - FmtLen); AnsiMoveY (Console.CursorY - FmtLen);
FmtString := False; FmtString := False;
End; End;
9 : Begin 9 : Begin
AnsiMoveY (Screen.CursorY + FmtLen); AnsiMoveY (Console.CursorY + FmtLen);
FmtString := False; FmtString := False;
End; End;
10: Begin 10: Begin
AnsiMoveX (Screen.CursorX + FmtLen); AnsiMoveX (Console.CursorX + FmtLen);
FmtString := False; FmtString := False;
End; End;
11: Begin 11: Begin
AnsiMoveX (Screen.CursorX - FmtLen); AnsiMoveX (Console.CursorX - FmtLen);
FmtString := False; FmtString := False;
End; End;
12: Begin 12: Begin
@ -915,7 +915,7 @@ Begin
FmtString := False; FmtString := False;
End; End;
15: Begin 15: Begin
While Screen.CursorX > FmtLen Do While Console.CursorX > FmtLen Do
OutBS(1, True); OutBS(1, True);
FmtString := False; FmtString := False;
@ -924,8 +924,8 @@ Begin
Inc (A); Inc (A);
FmtString := False; FmtString := False;
If Screen.CursorX < FmtLen Then If Console.CursorX < FmtLen Then
BufAddStr (strRep(Str[A], FmtLen - Screen.CursorX + 1)); BufAddStr (strRep(Str[A], FmtLen - Console.CursorX + 1));
End; End;
End; End;
End; End;
@ -974,7 +974,7 @@ Begin
End; End;
If Color in [00..07] Then If Color in [00..07] Then
Color := (Screen.TextAttr SHR 4) and 7 + 16; Color := (Console.TextAttr SHR 4) and 7 + 16;
Case Color of Case Color of
16: Result := Result + #27 + '[40m'; 16: Result := Result + #27 + '[40m';
@ -999,14 +999,14 @@ Begin
If Graphics = 0 Then Exit; If Graphics = 0 Then Exit;
CurBG := (Screen.TextAttr SHR 4) AND 7; CurBG := (Console.TextAttr SHR 4) AND 7;
CurFG := Screen.TextAttr AND $F; CurFG := Console.TextAttr AND $F;
Prefix := ''; Prefix := '';
If Color < 16 Then Begin If Color < 16 Then Begin
If Color = CurFG Then Exit; If Color = CurFG Then Exit;
// Screen.TextAttr := Color + CurBG * 16; // Console.TextAttr := Color + CurBG * 16;
If (Color < 8) and (CurFG > 7) Then Prefix := '0;'; If (Color < 8) and (CurFG > 7) Then Prefix := '0;';
If (Color > 7) and (CurFG < 8) Then Prefix := '1;'; If (Color > 7) and (CurFG < 8) Then Prefix := '1;';
@ -1040,7 +1040,7 @@ Begin
End Else Begin End Else Begin
If (Color - 16) = CurBG Then Exit; If (Color - 16) = CurBG Then Exit;
// Screen.TextAttr := CurFG + (Color - 16) * 16; // Console.TextAttr := CurFG + (Color - 16) * 16;
Case Color of Case Color of
16: Result := #27 + '[40m'; 16: Result := #27 + '[40m';
@ -1086,12 +1086,12 @@ Var
Begin Begin
Result := ''; Result := '';
If (Attr = Screen.TextAttr) or (Graphics = 0) Then Exit; If (Attr = Console.TextAttr) or (Graphics = 0) Then Exit;
FG := Attr and $F; FG := Attr and $F;
BG := Attr shr 4; BG := Attr shr 4;
OldFG := Screen.TextAttr and $F; OldFG := Console.TextAttr and $F;
OldBG := Screen.TextAttr shr 4; OldBG := Console.TextAttr shr 4;
If (OldFG <> 7) or (FG = 7) or ((OldFG > 7) and (FG < 8)) or ((OldBG > 7) and (BG < 8)) Then Begin If (OldFG <> 7) or (FG = 7) or ((OldFG > 7) and (FG < 8)) or ((OldBG > 7) and (BG < 8)) Then Begin
Result := '0'; Result := '0';
@ -1137,10 +1137,10 @@ Procedure TBBSIO.AnsiGotoXY (X: Byte; Y: Byte);
Begin Begin
If Graphics = 0 Then Exit; If Graphics = 0 Then Exit;
// If (X = Screen.CursorX) and (Y = Screen.CursorY) Then Exit; // If (X = Console.CursorX) and (Y = Console.CursorY) Then Exit;
If X = 0 Then X := Screen.CursorX; If X = 0 Then X := Console.CursorX;
If Y = 0 Then Y := Screen.CursorY; If Y = 0 Then Y := Console.CursorY;
BufAddStr (#27'[' + strI2S(Y) + ';' + strI2S(X) + 'H'); BufAddStr (#27'[' + strI2S(Y) + ';' + strI2S(X) + 'H');
End; End;
@ -1347,19 +1347,19 @@ Begin
FmtString := False; FmtString := False;
End; End;
8 : Begin 8 : Begin
AnsiMoveY (Screen.CursorY - FmtLen); AnsiMoveY (Console.CursorY - FmtLen);
FmtString := False; FmtString := False;
End; End;
9 : Begin 9 : Begin
AnsiMoveY (Screen.CursorY + FmtLen); AnsiMoveY (Console.CursorY + FmtLen);
FmtString := False; FmtString := False;
End; End;
10: Begin 10: Begin
AnsiMoveX (Screen.CursorX + FmtLen); AnsiMoveX (Console.CursorX + FmtLen);
FmtString := False; FmtString := False;
End; End;
11: Begin 11: Begin
AnsiMoveX (Screen.CursorX - FmtLen); AnsiMoveX (Console.CursorX - FmtLen);
FmtString := False; FmtString := False;
End; End;
12: Begin 12: Begin
@ -1377,7 +1377,7 @@ Begin
FmtString := False; FmtString := False;
End; End;
15: Begin 15: Begin
While Screen.CursorX > FmtLen Do While Console.CursorX > FmtLen Do
OutBS(1, True); OutBS(1, True);
FmtString := False; FmtString := False;
@ -1389,8 +1389,8 @@ Begin
17: Begin 17: Begin
FmtString := False; FmtString := False;
If Screen.CursorX < FmtLen Then If Console.CursorX < FmtLen Then
BufAddStr (strRep(GetChar, FmtLen - Screen.CursorX + 1)); BufAddStr (strRep(GetChar, FmtLen - Console.CursorX + 1));
End; End;
End; End;
End; End;
@ -1440,7 +1440,7 @@ Var
Begin Begin
Result := #255; Result := #255;
Handles[0] := Input.ConIn; Handles[0] := Keyboard.ConIn;
If Not TBBSCore(Core).LocalMode Then Begin If Not TBBSCore(Core).LocalMode Then Begin
If TBBSCore(Core).Client.FInBufPos < TBBSCore(Core).Client.FInBufEnd Then If TBBSCore(Core).Client.FInBufPos < TBBSCore(Core).Client.FInBufEnd Then
@ -1467,16 +1467,16 @@ Begin
Case InType of Case InType of
1 : Begin // LOCAL input event 1 : Begin // LOCAL input event
If Not Input.ProcessQueue Then Exit; If Not Keyboard.ProcessQueue Then Exit;
Result := Input.ReadKey; Result := Keyboard.ReadKey;
LocalInput := True; LocalInput := True;
IsArrow := False; IsArrow := False;
If Result = #0 Then Begin If Result = #0 Then Begin
Result := Input.ReadKey; Result := Keyboard.ReadKey;
If (AllowArrow) and (Result in [#71..#73, #75, #77, #79..#83]) and (Screen.Active) Then Begin If (AllowArrow) and (Result in [#71..#73, #75, #77, #79..#83]) and (Console.Active) Then Begin
IsArrow := True; IsArrow := True;
Exit; Exit;
End; End;
@ -1486,7 +1486,7 @@ Begin
Result := #255; Result := #255;
End; End;
If Not Screen.Active Then Result := #255; If Not Console.Active Then Result := #255;
End; End;
2 : Begin // SOCKET read event 2 : Begin // SOCKET read event
If TBBSCore(Core).Client.ReadBuf(Result, 1) < 0 Then Begin If TBBSCore(Core).Client.ReadBuf(Result, 1) < 0 Then Begin
@ -1574,7 +1574,7 @@ Begin
Session.LastTimeLeft := TimeCount; Session.LastTimeLeft := TimeCount;
{$IFNDEF UNIX} {$IFNDEF UNIX}
UpdateStatusLine(StatusPtr, ''); UpdateStatusLine(Session.StatusPtr, '');
{$ENDIF} {$ENDIF}
If TBBSCore(Core).TimerOn Then Begin If TBBSCore(Core).TimerOn Then Begin
@ -1644,7 +1644,7 @@ Begin
Temp := AllowArrow; Temp := AllowArrow;
AllowArrow := True; AllowArrow := True;
X := Screen.CursorX; X := Console.CursorX;
Repeat Repeat
AnsiMoveX (X); AnsiMoveX (X);
@ -1765,7 +1765,7 @@ Begin
RangeValue := -1; RangeValue := -1;
HiStr := strI2S(Hi); HiStr := strI2S(Hi);
Field := Length(strI2S(Hi)); Field := Length(strI2S(Hi));
xPos := Screen.CursorX; xPos := Console.CursorX;
If UseInField and (Graphics = 1) Then Begin If UseInField and (Graphics = 1) Then Begin
AnsiColor (TBBSCore(Core).Theme.FieldColor2); AnsiColor (TBBSCore(Core).Theme.FieldColor2);
@ -1934,7 +1934,7 @@ Begin
If InSize <= Max Then Max := InSize; If InSize <= Max Then Max := InSize;
End; End;
xPos := Screen.CursorX; xPos := Console.CursorX;
FieldCh := ' '; FieldCh := ' ';
// this is poorly implemented but to expand on it will require MPL // this is poorly implemented but to expand on it will require MPL
@ -2014,7 +2014,7 @@ Begin
If CurPos < 1 then CurPos := 1; If CurPos < 1 then CurPos := 1;
AnsiMoveX (Screen.CursorX - 1); AnsiMoveX (Console.CursorX - 1);
End; End;
#77 : If StrPos < Length(Str) + 1 Then Begin #77 : If StrPos < Length(Str) + 1 Then Begin
If (CurPos = Field) and (StrPos < Length(Str)) Then If (CurPos = Field) and (StrPos < Length(Str)) Then
@ -2023,7 +2023,7 @@ Begin
Inc (CurPos); Inc (CurPos);
Inc (StrPos); Inc (StrPos);
AnsiMoveX (Screen.CursorX + 1); AnsiMoveX (Console.CursorX + 1);
End; End;
#79 : Begin #79 : Begin
StrPos := Length(Str) + 1; StrPos := Length(Str) + 1;
@ -2188,9 +2188,9 @@ Var
FillSize : Byte; FillSize : Byte;
Attr : Byte; Attr : Byte;
Begin Begin
Attr := Screen.TextAttr; Attr := Console.TextAttr;
Screen.TextAttr := 0; // kludge to force it to return full ansi codes Console.TextAttr := 0; // kludge to force it to return full ansi codes
If Part > Whole Then Part := Whole; If Part > Whole Then Part := Whole;
@ -2298,23 +2298,23 @@ Begin
{$ENDIF} {$ENDIF}
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
If Not TBBSCore(Core).LocalMode Then TBBSCore(Core).Client.PurgeInputData(100); If Not TBBSCore(Core).LocalMode Then TBBSCore(Core).Client.PurgeInputData(100);
If TBBSCore(Core).LocalMode Then While Input.KeyPressed Do Input.ReadKey; If TBBSCore(Core).LocalMode Then While Keyboard.KeyPressed Do Keyboard.ReadKey;
{$ENDIF} {$ENDIF}
End; End;
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
Procedure TBBSIO.LocalScreenDisable; Procedure TBBSIO.LocalScreenDisable;
Begin Begin
Screen.ClearScreenNoUpdate; Console.ClearScreenNoUpdate;
Screen.WriteXYNoUpdate(1, 1, 7, 'Screen disabled. Press ALT-V to view user'); Console.WriteXYNoUpdate(1, 1, 7, 'Screen disabled. Press ALT-V to view user');
Screen.Active := False; Console.Active := False;
End; End;
Procedure TBBSIO.LocalScreenEnable; Procedure TBBSIO.LocalScreenEnable;
Begin Begin
Screen.Active := True; Console.Active := True;
Screen.ShowBuffer; Console.ShowBuffer;
UpdateStatusLine(StatusPtr, ''); UpdateStatusLine(Session.StatusPtr, '');
End; End;
{$ENDIF} {$ENDIF}

View File

@ -492,7 +492,7 @@ Begin
Else Else
TBBSCore(Owner).io.OutFull(strPadR(Data.Item[Count]^.Text, Format + Length(Data.Item[Count]^.Text) - strMCILen(Data.Item[Count]^.Text), ' ')); TBBSCore(Owner).io.OutFull(strPadR(Data.Item[Count]^.Text, Format + Length(Data.Item[Count]^.Text) - strMCILen(Data.Item[Count]^.Text), ' '));
While Screen.CursorX < Format Do While Console.CursorX < Format Do
Session.io.BufAddChar(' '); Session.io.BufAddChar(' ');
If Listed MOD Cols = 0 Then If Listed MOD Cols = 0 Then
@ -761,20 +761,20 @@ Var
Session.io.OutFull(Data.Item[CurItem]^.TextLo); Session.io.OutFull(Data.Item[CurItem]^.TextLo);
If Screen.CursorX > MaxDESize Then If Console.CursorX > MaxDESize Then
MaxDESize := Screen.CursorX; MaxDESize := Console.CursorX;
While Screen.CursorX < MaxDESize Do While Console.CursorX < MaxDESize Do
Session.io.OutRaw(' '); Session.io.OutRaw(' ');
End; End;
Session.io.AnsiGotoXY (ItemX, ItemY); Session.io.AnsiGotoXY (ItemX, ItemY);
Session.io.OutFull (Data.Item[CurItem]^.TextHi); Session.io.OutFull (Data.Item[CurItem]^.TextHi);
If Screen.CursorX > MaxLBSize Then If Console.CursorX > MaxLBSize Then
MaxLBSize := Screen.CursorX; MaxLBSize := Console.CursorX;
While Screen.CursorX < MaxLBSize Do While Console.CursorX < MaxLBSize Do
Session.io.OutRaw(' '); Session.io.OutRaw(' ');
End; End;
@ -788,8 +788,8 @@ Begin
If ReDraw Then GenerateMenu(-1, False); If ReDraw Then GenerateMenu(-1, False);
ItemX := Screen.CursorX; ItemX := Console.CursorX;
ItemY := Screen.CursorY; ItemY := Console.CursorY;
TBBSCore(Owner).io.AllowArrow := True; TBBSCore(Owner).io.AllowArrow := True;
@ -958,7 +958,7 @@ Var
Exit; Exit;
End; End;
SavedAttr := Screen.TextAttr; // tbbscore SavedAttr := Console.TextAttr; // tbbscore
If Ch = #08 Then If Ch = #08 Then
Offset := Length(TempStr) + 1 Offset := Length(TempStr) + 1
@ -1041,9 +1041,9 @@ Begin
TBBSCore(Owner).io.BufFlush; TBBSCore(Owner).io.BufFlush;
PromptX := Screen.CursorX; //tbbscore PromptX := Console.CursorX; //tbbscore
PromptY := Screen.CursorY; //tbbscore PromptY := Console.CursorY; //tbbscore
PromptA := Screen.TextAttr; //tbbscore PromptA := Console.TextAttr; //tbbscore
End; End;
For Count := 1 to Data.NumItems Do For Count := 1 to Data.NumItems Do

View File

@ -156,7 +156,7 @@ Function TMsgBase.NetmailLookup (FromMenu: Boolean; MsgTo, DefAddr: String) : St
Str : String; Str : String;
Begin Begin
Case ShowType of Case ShowType of
0 : Str := strAddr2Str(NodeData.Address); 0 : Str := Addr2Str(NodeData.Address);
1, 1,
2 : If NodeData.Keyword = 'ZONE' Then 2 : If NodeData.Keyword = 'ZONE' Then
Str := 'ZONE' + strPadL(strI2S(NodeData.Address.Zone), 8, ' ') Str := 'ZONE' + strPadL(strI2S(NodeData.Address.Zone), 8, ' ')
@ -271,18 +271,18 @@ Begin
Session.io.PromptInfo[7] := MsgTo; Session.io.PromptInfo[7] := MsgTo;
If Session.io.GetYN(Session.GetPrompt(502), True) Then Begin If Session.io.GetYN(Session.GetPrompt(502), True) Then Begin
Result := strAddr2Str(NodeData.Address); Result := Addr2Str(NodeData.Address);
Break; Break;
End; End;
End Else End Else
If (Listed = 0) And Not FromMenu And Not bbsCfg.ForceNodelist Then Begin If (Listed = 0) And Not FromMenu And Not bbsCfg.ForceNodelist Then Begin
If strStr2Addr(Result, Addr) Then Begin If Str2Addr(Result, Addr) Then Begin
Session.io.PromptInfo[1] := strAddr2Str(Addr); Session.io.PromptInfo[1] := Addr2Str(Addr);
Session.io.PromptInfo[7] := MsgTo; Session.io.PromptInfo[7] := MsgTo;
If Session.io.GetYN(Session.GetPrompt(502), True) Then Begin If Session.io.GetYN(Session.GetPrompt(502), True) Then Begin
Result := strAddr2Str(Addr); Result := Addr2Str(Addr);
Break; Break;
End; End;
@ -496,7 +496,7 @@ Begin
End; End;
If ShowPrompt Then If ShowPrompt Then
Session.io.OutBS(Screen.CursorX, True); Session.io.OutBS(Console.CursorX, True);
Inc (ListPtr); Inc (ListPtr);
@ -635,7 +635,7 @@ Var
A : SmallInt; A : SmallInt;
Begin Begin
If (MBase.NetType > 0) and (MBase.NetType <> 3) and (MBase.QwkNetID = 0) Then Begin If (MBase.NetType > 0) and (MBase.NetType <> 3) and (MBase.QwkNetID = 0) Then Begin
Msg^.DoStringLn (#1 + 'MSGID: ' + strAddr2Str(bbsCfg.NetAddress[MBase.NetAddr]) + ' ' + strI2H(CurDateDos, 8)); Msg^.DoStringLn (#1 + 'MSGID: ' + Addr2Str(bbsCfg.NetAddress[MBase.NetAddr]) + ' ' + strI2H(CurDateDos, 8));
If ReplyID <> '' Then If ReplyID <> '' Then
Msg^.DoStringLn (#1 + 'REPLY: ' + ReplyID); Msg^.DoStringLn (#1 + 'REPLY: ' + ReplyID);
@ -667,7 +667,7 @@ Begin
S := ' * Origin: ' + ResolveOrigin(MBase); S := ' * Origin: ' + ResolveOrigin(MBase);
If MBase.QwkNetID = 0 Then If MBase.QwkNetID = 0 Then
S := S + ' (' + strAddr2Str(Msg^.GetOrigAddr) + ')'; S := S + ' (' + Addr2Str(Msg^.GetOrigAddr) + ')';
Msg^.DoStringLn (S); Msg^.DoStringLn (S);
End; End;
@ -1350,9 +1350,9 @@ Begin
If ReplyBase.NetType = 3 Then Begin If ReplyBase.NetType = 3 Then Begin
MsgBase^.GetOrig(Addr); MsgBase^.GetOrig(Addr);
TempStr := NetmailLookup(False, ToWho, strAddr2Str(Addr)); TempStr := NetmailLookup(False, ToWho, Addr2Str(Addr));
If Not strStr2Addr (TempStr, Addr) Then Exit; If Not Str2Addr (TempStr, Addr) Then Exit;
End; End;
Subj := MsgBase^.GetSubj; Subj := MsgBase^.GetSubj;
@ -1512,7 +1512,7 @@ Begin
If MBase.NetType = 3 Then Begin If MBase.NetType = 3 Then Begin
MsgBase^.GetDest(DestAddr); MsgBase^.GetDest(DestAddr);
Session.io.PromptInfo[1] := Session.io.PromptInfo[1] + ' (' + strAddr2Str(DestAddr) + ')'; Session.io.PromptInfo[1] := Session.io.PromptInfo[1] + ' (' + Addr2Str(DestAddr) + ')';
End; End;
Session.io.OutFull (Session.GetPrompt(296)); Session.io.OutFull (Session.GetPrompt(296));
@ -1526,7 +1526,7 @@ Begin
Session.io.OutFull (Session.GetPrompt(298)); Session.io.OutFull (Session.GetPrompt(298));
If strStr2Addr(Session.io.GetInput(20, 20, 12, strAddr2Str(DestAddr)), DestAddr) Then Begin If Str2Addr(Session.io.GetInput(20, 20, 12, Addr2Str(DestAddr)), DestAddr) Then Begin
MsgBase^.SetTo(Temp1); MsgBase^.SetTo(Temp1);
MsgBase^.SetDest(DestAddr) MsgBase^.SetDest(DestAddr)
End; End;
@ -1869,7 +1869,7 @@ Var
End; End;
If (ScanMode = 3) And First Then If (ScanMode = 3) And First Then
Session.io.OutBS (Screen.CursorX, True); Session.io.OutBS (Console.CursorX, True);
If Not WereMsgs Then WereMsgs := Res; If Not WereMsgs Then WereMsgs := Res;
@ -1887,14 +1887,14 @@ Var
If MBase.NetType = 3 Then Begin If MBase.NetType = 3 Then Begin
MsgBase^.GetOrig(NetAddr); MsgBase^.GetOrig(NetAddr);
Session.io.PromptInfo[1] := Session.io.PromptInfo[1] + ' (' + strAddr2Str(NetAddr) + ')'; Session.io.PromptInfo[1] := Session.io.PromptInfo[1] + ' (' + Addr2Str(NetAddr) + ')';
End; End;
Session.io.PromptInfo[2] := MsgBase^.GetTo; Session.io.PromptInfo[2] := MsgBase^.GetTo;
If MBase.NetType = 3 Then Begin If MBase.NetType = 3 Then Begin
MsgBase^.GetDest(NetAddr); MsgBase^.GetDest(NetAddr);
Session.io.PromptInfo[2] := Session.io.PromptInfo[2] + ' (' + strAddr2Str(NetAddr) + ')'; Session.io.PromptInfo[2] := Session.io.PromptInfo[2] + ' (' + Addr2Str(NetAddr) + ')';
End; End;
Session.io.PromptInfo[3] := MsgBase^.GetSubj; Session.io.PromptInfo[3] := MsgBase^.GetSubj;
@ -3087,7 +3087,7 @@ Begin
If Pos('/ADDR:', strUpper(TempStr)) > 0 Then Begin If Pos('/ADDR:', strUpper(TempStr)) > 0 Then Begin
MsgAddr := strReplace(Copy(TempStr, Pos('/ADDR:', strUpper(TempStr)) + 6, Length(TempStr)), '_', ' '); MsgAddr := strReplace(Copy(TempStr, Pos('/ADDR:', strUpper(TempStr)) + 6, Length(TempStr)), '_', ' ');
If Not strStr2Addr(MsgAddr, DestAddr) Then MsgAddr := ''; If Not Str2Addr(MsgAddr, DestAddr) Then MsgAddr := '';
End; End;
End; End;
@ -3105,7 +3105,7 @@ Begin
If MsgAddr = '' Then Begin If MsgAddr = '' Then Begin
MsgAddr := NetmailLookup(False, MsgTo, ''); MsgAddr := NetmailLookup(False, MsgTo, '');
If Not strStr2Addr(MsgAddr, DestAddr) Then MsgTo := ''; If Not Str2Addr(MsgAddr, DestAddr) Then MsgTo := '';
End; End;
End Else End Else
If IsPrivate Then Begin If IsPrivate Then Begin
@ -3422,7 +3422,7 @@ Begin
GetMessageScan; GetMessageScan;
If ((Mand) and (MBase.DefNScan = 2)) or ((Not Mand) and (MScan.NewScan > 0)) Then Begin If ((Mand) and (MBase.DefNScan = 2)) or ((Not Mand) and (MScan.NewScan > 0)) Then Begin
Session.io.OutBS (Screen.CursorX, True); Session.io.OutBS (Console.CursorX, True);
Session.io.OutFull (Session.GetPrompt(130)); Session.io.OutFull (Session.GetPrompt(130));
Session.io.BufFlush; Session.io.BufFlush;
@ -3769,7 +3769,7 @@ Var
Session.io.PromptInfo[9] := strI2S(Global_YourMsgs); Session.io.PromptInfo[9] := strI2S(Global_YourMsgs);
If ShowScanPrompt Then If ShowScanPrompt Then
Session.io.OutBS(Screen.CursorX, True); Session.io.OutBS(Console.CursorX, True);
If Not ShowMessage Then If Not ShowMessage Then
If (ShowIfNew And (NewMsgs > 0)) or (ShowIfYou And (YourMsgs > 0)) or (Not ShowIfNew And Not ShowIfYou) Then Begin If (ShowIfNew And (NewMsgs > 0)) or (ShowIfYou And (YourMsgs > 0)) or (Not ShowIfNew And Not ShowIfYou) Then Begin
@ -3907,7 +3907,7 @@ Begin
If mArea.NetType > 0 Then Begin If mArea.NetType > 0 Then Begin
Msg^.DoStringLn (#13 + '--- ' + mysSoftwareID + ' v' + mysVersion + ' (' + OSID + ')'); Msg^.DoStringLn (#13 + '--- ' + mysSoftwareID + ' v' + mysVersion + ' (' + OSID + ')');
Msg^.DoStringLn (' * Origin: ' + ResolveOrigin(mArea) + ' (' + strAddr2Str(Msg^.GetOrigAddr) + ')'); Msg^.DoStringLn (' * Origin: ' + ResolveOrigin(mArea) + ' (' + Addr2Str(Msg^.GetOrigAddr) + ')');
End; End;
Msg^.WriteMsg; Msg^.WriteMsg;
@ -3948,7 +3948,7 @@ Begin
Str := strWordGet(6, Data, ';'); Str := strWordGet(6, Data, ';');
If (Str = '') Then Str := '0:0/0'; If (Str = '') Then Str := '0:0/0';
strStr2Addr (Str, mAddr); Str2Addr (Str, mAddr);
If FileExist(bbsCfg.DataPath + mName) Then If FileExist(bbsCfg.DataPath + mName) Then
mName := bbsCfg.DataPath + mName mName := bbsCfg.DataPath + mName
@ -4388,7 +4388,7 @@ Begin
MsgBase^.CloseMsgBase; MsgBase^.CloseMsgBase;
Dispose (MsgBase, Done); Dispose (MsgBase, Done);
Session.io.OutBS (Screen.CursorX, True); Session.io.OutBS (Console.CursorX, True);
Session.io.OutFullLn (Session.GetPrompt(232)); Session.io.OutFullLn (Session.GetPrompt(232));
Result := LastRead; Result := LastRead;
@ -4677,7 +4677,7 @@ Begin
Line := ' * Origin: ' + ResolveOrigin(MBase); Line := ' * Origin: ' + ResolveOrigin(MBase);
If MBase.QwkNetID = 0 Then If MBase.QwkNetID = 0 Then
Line := Line + ' (' + strAddr2Str(MsgBase^.GetOrigAddr) + ')'; Line := Line + ' (' + Addr2Str(MsgBase^.GetOrigAddr) + ')';
MsgBase^.DoStringLn (Line); MsgBase^.DoStringLn (Line);
End; End;

View File

@ -12,7 +12,6 @@ Interface
Uses Uses
m_Strings, m_Strings,
BBS_Records, BBS_Records,
BBS_Common,
BBS_MsgBase_ABS; BBS_MsgBase_ABS;
Const Const
@ -256,7 +255,8 @@ Uses
m_CRC, m_CRC,
m_FileIO, m_FileIO,
m_DateTime, m_DateTime,
MKCRAP; // REMOVE THIS ASAP. BBS_DataBase,
MKCRAP;
Type Type
SubFieldPTR = ^SubFieldType; SubFieldPTR = ^SubFieldType;
@ -701,10 +701,10 @@ Begin
End; End;
If ((JM^.Dest.Zone <> 0) or (JM^.Dest.Net <> 0) or If ((JM^.Dest.Zone <> 0) or (JM^.Dest.Net <> 0) or
(JM^.Dest.Node <> 0) or (JM^.Dest.Point <> 0)) Then (JM^.Dest.Node <> 0) or (JM^.Dest.Point <> 0)) Then
AddSubField(1, strAddr2Str(JM^.Dest)); AddSubField(1, Addr2Str(JM^.Dest));
If ((JM^.Orig.Zone <> 0) or (JM^.Orig.Net <> 0) or If ((JM^.Orig.Zone <> 0) or (JM^.Orig.Net <> 0) or
(JM^.Orig.Node <> 0) or (JM^.Orig.Point <> 0)) Then (JM^.Orig.Node <> 0) or (JM^.Orig.Point <> 0)) Then
AddSubField(0, strAddr2Str(JM^.Orig)); AddSubField(0, Addr2Str(JM^.Orig));
WriteError := IoResult; WriteError := IoResult;
End; End;
@ -845,10 +845,10 @@ Begin
End; End;
If ((JM^.Dest.Zone <> 0) or (JM^.Dest.Net <> 0) or If ((JM^.Dest.Zone <> 0) or (JM^.Dest.Net <> 0) or
(JM^.Dest.Node <> 0) or (JM^.Dest.Point <> 0)) Then (JM^.Dest.Node <> 0) or (JM^.Dest.Point <> 0)) Then
AddSubField(1, strAddr2Str(JM^.Dest)); AddSubField(1, Addr2Str(JM^.Dest));
If ((JM^.Orig.Zone <> 0) or (JM^.Orig.Net <> 0) or If ((JM^.Orig.Zone <> 0) or (JM^.Orig.Net <> 0) or
(JM^.Orig.Node <> 0) or (JM^.Orig.Point <> 0)) Then (JM^.Orig.Node <> 0) or (JM^.Orig.Point <> 0)) Then
AddSubField(0, strAddr2Str(JM^.Orig)); AddSubField(0, Addr2Str(JM^.Orig));
Seek(JM^.HdrFile, FileSize(JM^.HdrFile)); {Seek to end of .jhr file} Seek(JM^.HdrFile, FileSize(JM^.HdrFile)); {Seek to end of .jhr file}
WriteError := IoResult; WriteError := IoResult;
End; End;
@ -957,7 +957,7 @@ Procedure TMsgBaseJAM.MsgStartUp;
TmpStr[0] := Chr(SubPtr^.DataLen and $ff); TmpStr[0] := Chr(SubPtr^.DataLen and $ff);
If Ord(TmpStr[0]) > 128 Then TmpStr[0] := #128; If Ord(TmpStr[0]) > 128 Then TmpStr[0] := #128;
Move(SubPtr^.Data, TmpStr[1], Ord(TmpStr[0])); Move(SubPtr^.Data, TmpStr[1], Ord(TmpStr[0]));
If strStr2Addr(TmpStr, JM^.Orig) Then; If Str2Addr(TmpStr, JM^.Orig) Then;
End; End;
1: Begin {Dest} 1: Begin {Dest}
FillChar(JM^.Dest, SizeOf(JM^.Dest), #0); FillChar(JM^.Dest, SizeOf(JM^.Dest), #0);
@ -965,7 +965,7 @@ Procedure TMsgBaseJAM.MsgStartUp;
If Ord(TmpStr[0]) > 128 Then If Ord(TmpStr[0]) > 128 Then
TmpStr[0] := #128; TmpStr[0] := #128;
Move(SubPtr^.Data, TmpStr[1], Ord(TmpStr[0])); Move(SubPtr^.Data, TmpStr[1], Ord(TmpStr[0]));
If strStr2Addr(TmpStr, JM^.Dest) Then; If Str2Addr(TmpStr, JM^.Dest) Then;
End; End;
2: Begin {MsgFrom} 2: Begin {MsgFrom}
JM^.MsgFrom[0] := Chr(SubPtr^.DataLen and $ff); JM^.MsgFrom[0] := Chr(SubPtr^.DataLen and $ff);

View File

@ -55,20 +55,20 @@ Var
Begin Begin
If (R < 1) or (R > 99) Then Exit; If (R < 1) or (R > 99) Then Exit;
Reset (RoomFile); Reset (Session.RoomFile);
Seek (RoomFile, R-1); Seek (Session.RoomFile, R - 1);
Read (RoomFile, Room); Read (Session.RoomFile, Session.Room);
Close (RoomFile); Close (Session.RoomFile);
Session.Chat.Room := R; Session.Chat.Room := R;
CurRoom := R; Session.CurRoom := R;
Assign (CF, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat'); Assign (CF, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
Reset (CF); Reset (CF);
Write (CF, Session.Chat); Write (CF, Session.Chat);
Close (CF); Close (CF);
Send_Node_Message (5, strI2S(Session.NodeNum) + ';' + 'Now chatting in channel ' + strI2S(CurRoom), 0); //++lang Send_Node_Message (5, strI2S(Session.NodeNum) + ';' + 'Now chatting in channel ' + strI2S(Session.CurRoom), 0); //++lang
End; End;
Procedure Update_Topic; Procedure Update_Topic;
@ -81,12 +81,12 @@ Begin
Session.io.AnsiGotoXY (Session.io.ScreenInfo[4].X, Session.io.ScreenInfo[4].Y); Session.io.AnsiGotoXY (Session.io.ScreenInfo[4].X, Session.io.ScreenInfo[4].Y);
Session.io.AnsiColor (Session.io.ScreenInfo[4].A); Session.io.AnsiColor (Session.io.ScreenInfo[4].A);
Session.io.OutRaw (strPadR(strI2S(CurRoom), 2, ' ')); Session.io.OutRaw (strPadR(strI2S(Session.CurRoom), 2, ' '));
Session.io.AnsiGotoXY (Session.io.ScreenInfo[5].X, Session.io.ScreenInfo[5].Y); Session.io.AnsiGotoXY (Session.io.ScreenInfo[5].X, Session.io.ScreenInfo[5].Y);
Session.io.AnsiColor (Session.io.ScreenInfo[5].A); Session.io.AnsiColor (Session.io.ScreenInfo[5].A);
Session.io.OutRaw (strPadR(Room.Name, 40, ' ')); Session.io.OutRaw (strPadR(Session.Room.Name, 40, ' '));
End; End;
Function GetKeyNodeChatFunc (Forced: Boolean) : Boolean; Function GetKeyNodeChatFunc (Forced: Boolean) : Boolean;
@ -131,9 +131,9 @@ Begin
If ioReset(MsgFile, SizeOf(Msg), fmRWDN) Then Begin If ioReset(MsgFile, SizeOf(Msg), fmRWDN) Then Begin
OldAttr := Screen.TextAttr; OldAttr := Console.TextAttr;
OldX := Screen.CursorX; OldX := Console.CursorX;
OldY := Screen.CursorY; OldY := Console.CursorY;
While Not Eof(MsgFile) Do Begin While Not Eof(MsgFile) Do Begin
Read (MsgFile, Msg); Read (MsgFile, Msg);
@ -145,7 +145,7 @@ Begin
1 : If Msg.Room = 0 Then 1 : If Msg.Room = 0 Then
Str := strReplace(Session.GetPrompt(319), '|&1', Msg.FromWho) Str := strReplace(Session.GetPrompt(319), '|&1', Msg.FromWho)
Else Else
If Msg.Room = CurRoom Then If Msg.Room = Session.CurRoom Then
Str := strReplace(Session.GetPrompt(181), '|&1', Msg.FromWho) Str := strReplace(Session.GetPrompt(181), '|&1', Msg.FromWho)
Else Else
Continue; Continue;
@ -153,10 +153,10 @@ Begin
5 : Str := Session.GetPrompt(226); 5 : Str := Session.GetPrompt(226);
6 : Str := strReplace(Session.GetPrompt(229), '|&1', Msg.FromWho); 6 : Str := strReplace(Session.GetPrompt(229), '|&1', Msg.FromWho);
7 : Begin 7 : Begin
Reset (RoomFile); Reset (Session.RoomFile);
Seek (RoomFile, CurRoom - 1); Seek (Session.RoomFile, Session.CurRoom - 1);
Read (RoomFile, Room); Read (Session.RoomFile, Session.Room);
Close (RoomFile); Close (Session.RoomFile);
Update_Topic; Update_Topic;
Str := Session.GetPrompt(226); Str := Session.GetPrompt(226);
@ -199,7 +199,7 @@ Begin
Session.io.AnsiGotoXY (OldX, OldY); Session.io.AnsiGotoXY (OldX, OldY);
End Else Begin End Else Begin
If Session.io.Graphics = 0 Then If Session.io.Graphics = 0 Then
Session.io.OutBS (Screen.CursorX, True) Session.io.OutBS (Console.CursorX, True)
Else Begin Else Begin
Session.io.AnsiMoveX(1); Session.io.AnsiMoveX(1);
Session.io.AnsiClrEOL; Session.io.AnsiClrEOL;
@ -237,8 +237,8 @@ Procedure Node_Chat;
Exit; Exit;
End; End;
Session.io.PromptInfo[1] := strI2S(CurRoom); Session.io.PromptInfo[1] := strI2S(Session.CurRoom);
Session.io.PromptInfo[2] := Room.Name; Session.io.PromptInfo[2] := Session.Room.Name;
Session.io.OutFile ('ansitele', True, 0); Session.io.OutFile ('ansitele', True, 0);
@ -258,10 +258,10 @@ Procedure Node_Chat;
For A := 1 to bbsCfg.INetTNNodes Do For A := 1 to bbsCfg.INetTNNodes Do
If GetChatRecord(A, Temp) Then If GetChatRecord(A, Temp) Then
If Temp.InChat Then Begin If Temp.InChat Then Begin
Reset (RoomFile); Reset (Session.RoomFile);
Seek (RoomFile, Temp.Room - 1); Seek (Session.RoomFile, Temp.Room - 1);
Read (RoomFile, RM); Read (Session.RoomFile, RM);
Close (RoomFile); Close (Session.RoomFile);
Session.io.PromptInfo[1] := Temp.Name; Session.io.PromptInfo[1] := Temp.Name;
Session.io.PromptInfo[2] := strI2S(A); Session.io.PromptInfo[2] := strI2S(A);
@ -372,10 +372,10 @@ Begin
Session.Chat.InChat := True; Session.Chat.InChat := True;
Session.Chat.Available := False; Session.Chat.Available := False;
Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat'); Assign (Session.ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
Reset (ChatFile); Reset (Session.ChatFile);
Write (ChatFile, Session.Chat); Write (Session.ChatFile, Session.Chat);
Close (ChatFile); Close (Session.ChatFile);
FileErase(Session.TempPath + 'chat.tmp'); FileErase(Session.TempPath + 'chat.tmp');
@ -403,9 +403,9 @@ Begin
Session.io.OutFull (Session.GetPrompt(427)); Session.io.OutFull (Session.GetPrompt(427));
If Full Then If Full Then
Str := Session.io.GetInput (79 - Screen.CursorX + 1, 250, 19, '') Str := Session.io.GetInput (79 - Console.CursorX + 1, 250, 19, '')
Else Else
Str := Session.io.GetInput (79 - Screen.CursorX + 1, 250, 11, ''); Str := Session.io.GetInput (79 - Console.CursorX + 1, 250, 11, '');
If Str[1] = '/' Then Begin If Str[1] = '/' Then Begin
Session.io.GetKeyCallBack := NIL; Session.io.GetKeyCallBack := NIL;
@ -439,7 +439,7 @@ Begin
Str := Copy(Str, 5, Length(Str)); Str := Copy(Str, 5, Length(Str));
If Str <> '' Then If Str <> '' Then
Send_Node_Message (6, '0;' + Str, CurRoom); Send_Node_Message (6, '0;' + Str, Session.CurRoom);
End Else End Else
If Str2 = '/MSG' Then If Str2 = '/MSG' Then
Send_Private_Message(Str) Send_Private_Message(Str)
@ -458,20 +458,20 @@ Begin
FullReDraw; FullReDraw;
End Else End Else
If Str2 = '/TOPIC' Then Begin If Str2 = '/TOPIC' Then Begin
Room.Name := Copy(Str, strWordPos(2, Str, ' '), Length(Str)); Session.Room.Name := Copy(Str, strWordPos(2, Str, ' '), Length(Str));
Reset (RoomFile); Reset (Session.RoomFile);
Seek (RoomFile, CurRoom - 1); Seek (Session.RoomFile, Session.CurRoom - 1);
Write (RoomFile, Room); Write (Session.RoomFile, Session.Room);
Close (RoomFile); Close (Session.RoomFile);
Send_Node_Message (7, '0;Topic changed to "' + Room.Name + '"', CurRoom); // ++lang Send_Node_Message (7, '0;Topic changed to "' + Session.Room.Name + '"', Session.CurRoom); // ++lang
End; End;
Session.io.GetKeyCallBack := GetKeyNodeChatFunc; Session.io.GetKeyCallBack := GetKeyNodeChatFunc;
End Else End Else
If Str <> '' Then Begin If Str <> '' Then Begin
Send_Node_Message (1, '0;' + Str, CurRoom); Send_Node_Message (1, '0;' + Str, Session.CurRoom);
If Not Full Then Session.io.OutRawLn(''); If Not Full Then Session.io.OutRawLn('');
GetKeyNodeChatFunc(True); GetKeyNodeChatFunc(True);
End; End;
@ -484,10 +484,10 @@ Begin
Session.AllowMessages := True; Session.AllowMessages := True;
Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat'); Assign (Session.ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
Reset (ChatFile); Reset (Session.ChatFile);
Write (ChatFile, Session.Chat); Write (Session.ChatFile, Session.Chat);
Close (ChatFile); Close (Session.ChatFile);
FileErase(Session.TempPath + 'chat.tmp'); FileErase(Session.TempPath + 'chat.tmp');

View File

@ -31,12 +31,12 @@ Function GetChatRecord (Node: Byte; Var Chat: ChatRec) : Boolean;
Begin Begin
Result := False; Result := False;
Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Node) + '.dat'); Assign (Session.ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Node) + '.dat');
If Not ioReset(ChatFile, SizeOf(ChatFile), fmRWDN) Then Exit; If Not ioReset(Session.ChatFile, SizeOf(Session.ChatFile), fmRWDN) Then Exit;
Read (ChatFile, Chat); Read (Session.ChatFile, Chat);
Close (ChatFile); Close (Session.ChatFile);
Result := True; Result := True;
End; End;
@ -59,8 +59,8 @@ End;
Procedure Set_Node_Action (Action: String); Procedure Set_Node_Action (Action: String);
Begin Begin
Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat'); Assign (Session.ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
ReWrite (ChatFile); ReWrite (Session.ChatFile);
If Action <> '' Then Begin If Action <> '' Then Begin
Session.Chat.Active := True; Session.Chat.Active := True;
@ -82,12 +82,12 @@ Begin
Session.Chat.Gender := '?'; Session.Chat.Gender := '?';
End; End;
Write (ChatFile, Session.Chat); Write (Session.ChatFile, Session.Chat);
Close (ChatFile); Close (Session.ChatFile);
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
Screen.SetWindowTitle (bbsCfg.BBSName + ' Node ' + strI2S(Session.NodeNum) + ' : ' + Session.User.ThisUser.Handle + ' : ' + strStripPipe(Action)); Console.SetWindowTitle (bbsCfg.BBSName + ' Node ' + strI2S(Session.NodeNum) + ' : ' + Session.User.ThisUser.Handle + ' : ' + strStripPipe(Action));
// Screen.SetWindowTitle (WinConsoleTitle + strI2S(Session.NodeNum) + ' - ' + Session.User.ThisUser.Handle + ' - ' + strStripPipe(Action)); // Console.SetWindowTitle (WinConsoleTitle + strI2S(Session.NodeNum) + ' - ' + Session.User.ThisUser.Handle + ' - ' + strStripPipe(Action));
{$ENDIF} {$ENDIF}
End; End;
@ -249,7 +249,7 @@ Begin
KillRecord (MsgFile, 1, SizeOf(Msg)); KillRecord (MsgFile, 1, SizeOf(Msg));
Close (MsgFile); Close (MsgFile);
Screen.GetScreenImage (1, 1, 79, 24, Image); Console.GetScreenImage (1, 1, 79, 24, Image);
Session.io.PromptInfo[1] := Msg.FromWho; Session.io.PromptInfo[1] := Msg.FromWho;
Session.io.PromptInfo[2] := strI2S(Msg.FromNode); Session.io.PromptInfo[2] := strI2S(Msg.FromNode);

View File

@ -63,9 +63,9 @@ Begin
Repeat Repeat
If Update <> TimerMinutes Then Begin If Update <> TimerMinutes Then Begin
X := Screen.CursorX; X := Console.CursorX;
Y := Screen.CursorY; Y := Console.CursorY;
A := Screen.TextAttr; A := Console.TextAttr;
If Session.io.ScreenInfo[9].X <> 0 Then Begin If Session.io.ScreenInfo[9].X <> 0 Then Begin
Session.io.AnsiGotoXY (Session.io.ScreenInfo[9].X, Session.io.ScreenInfo[9].Y); Session.io.AnsiGotoXY (Session.io.ScreenInfo[9].X, Session.io.ScreenInfo[9].Y);
@ -103,7 +103,7 @@ Begin
End; End;
Case Ch of Case Ch of
#00 : If Session.io.LocalInput Then ProcessSysopCommand(Input.ReadKey); #00 : If Session.io.LocalInput Then ProcessSysopCommand(Keyboard.ReadKey);
^R : If Session.io.LocalInput Then Total_ReDraw; ^R : If Session.io.LocalInput Then Total_ReDraw;
#08 : If Session.io.LocalInput Then Begin #08 : If Session.io.LocalInput Then Begin
If SysopX > Session.io.ScreenInfo[7].X Then Begin If SysopX > Session.io.ScreenInfo[7].X Then Begin
@ -173,7 +173,7 @@ Begin
inc (sysopy); inc (sysopy);
Session.io.AnsiGotoXY(Session.io.ScreenInfo[7].x, sysopy); Session.io.AnsiGotoXY(Session.io.ScreenInfo[7].x, sysopy);
Session.io.OutRaw (sysopstr); Session.io.OutRaw (sysopstr);
sysopx := Screen.CursorX; sysopx := Console.CursorX;
end; end;
End Else Begin End Else Begin
Session.io.BufAddChar (ch); Session.io.BufAddChar (ch);
@ -196,7 +196,7 @@ Begin
inc(usery); inc(usery);
Session.io.AnsiGotoXY (Session.io.ScreenInfo[3].x, usery); Session.io.AnsiGotoXY (Session.io.ScreenInfo[3].x, usery);
Session.io.OutRaw(userstr); Session.io.OutRaw(userstr);
userx := Screen.CursorX; userx := Console.CursorX;
end; end;
end; end;
End; End;
@ -259,7 +259,7 @@ Var
Begin Begin
Session.User.InChat := True; Session.User.InChat := True;
Screen.GetScreenImage(1,1,79,24,Image); Console.GetScreenImage(1,1,79,24,Image);
UpdateStatusLine (0, '(ESC) to Quit, (Ctrl-R) to Redraw'); UpdateStatusLine (0, '(ESC) to Quit, (Ctrl-R) to Redraw');
@ -287,7 +287,7 @@ Begin
Session.io.RemoteRestore(Image); Session.io.RemoteRestore(Image);
UpdateStatusLine (StatusPtr, ''); UpdateStatusLine (Session.StatusPtr, '');
End; End;
End. End.

View File

@ -423,8 +423,8 @@ Begin
Session.io.OutFull (Session.GetPrompt(258)); Session.io.OutFull (Session.GetPrompt(258));
Session.io.BufFlush; Session.io.BufFlush;
Screen.BufAddStr(#27 + '[6n'); Console.BufAddStr(#27 + '[6n');
Screen.BufFlush; Console.BufFlush;
For Loop := 1 to 24 Do Begin For Loop := 1 to 24 Do Begin
While Input.KeyPressed Do While Input.KeyPressed Do
@ -1067,30 +1067,30 @@ Begin
{ update last caller information } { update last caller information }
If Not Session.LocalMode And Not Session.Chat.Invisible And (ThisUser.Flags AND UserNoLastCall = 0) Then Begin If Not Session.LocalMode And Not Session.Chat.Invisible And (ThisUser.Flags AND UserNoLastCall = 0) Then Begin
Reset (LastOnFile); Reset (Session.LastOnFile);
If FileSize(LastOnFile) >= 10 Then If FileSize(Session.LastOnFile) >= 10 Then
KillRecord (LastOnFile, 1, SizeOf(RecLastOn)); KillRecord (Session.LastOnFile, 1, SizeOf(RecLastOn));
LastOn.Handle := ThisUser.Handle; Session.LastOn.Handle := ThisUser.Handle;
LastOn.City := ThisUser.City; Session.LastOn.City := ThisUser.City;
LastOn.Node := Session.NodeNum; Session.LastOn.Node := Session.NodeNum;
LastOn.DateTime := CurDateDos; Session.LastOn.DateTime := CurDateDos;
LastOn.CallNum := bbsCfg.SystemCalls; Session.LastOn.CallNum := bbsCfg.SystemCalls;
LastOn.Address := ThisUser.Address; Session.LastOn.Address := ThisUser.Address;
LastOn.EmailAddr := ThisUser.Email; Session.LastOn.EmailAddr := ThisUser.Email;
LastOn.UserInfo := ThisUser.UserInfo; Session.LastOn.UserInfo := ThisUser.UserInfo;
LastOn.Gender := ThisUser.Gender; Session.LastOn.Gender := ThisUser.Gender;
LastOn.PeerIP := Session.UserIPInfo; Session.LastOn.PeerIP := Session.UserIPInfo;
LastOn.PeerHost := Session.UserHostInfo; Session.LastOn.PeerHost := Session.UserHostInfo;
LastOn.NewUser := ThisUser.Calls = 0; Session.LastOn.NewUser := ThisUser.Calls = 0;
For Count := 1 to 10 Do For Count := 1 to 10 Do
LastOn.OptionData[Count] := ThisUser.OptionData[Count]; Session.LastOn.OptionData[Count] := ThisUser.OptionData[Count];
Seek (LastOnFile, FileSize(LastOnFile)); Seek (Session.LastOnFile, FileSize(Session.LastOnFile));
Write (LastOnFile, LastOn); Write (Session.LastOnFile, Session.LastOn);
Close (LastOnFile); Close (Session.LastOnFile);
End; End;
{ update node info / settings } { update node info / settings }
@ -1153,13 +1153,13 @@ Begin
End; End;
If Not Session.LocalMode And (ThisUser.Flags AND UserNoLastCall = 0) Then Begin If Not Session.LocalMode And (ThisUser.Flags AND UserNoLastCall = 0) Then Begin
Reset (ConfigFile); Reset (Session.ConfigFile);
Read (ConfigFile, bbsCfg); Read (Session.ConfigFile, bbsCfg);
Inc (bbsCfg.SystemCalls); Inc (bbsCfg.SystemCalls);
Reset (ConfigFile); Reset (Session.ConfigFile);
Write (ConfigFile, bbsCfg); Write (Session.ConfigFile, bbsCfg);
Close (ConfigFile); Close (Session.ConfigFile);
End; End;
Inc (ThisUser.Calls); Inc (ThisUser.Calls);
@ -1234,7 +1234,7 @@ Begin
End; End;
{$IFNDEF UNIX} {$IFNDEF UNIX}
UpdateStatusLine(StatusPtr, ''); UpdateStatusLine(Session.StatusPtr, '');
{$ENDIF} {$ENDIF}
End; End;

View File

@ -172,6 +172,7 @@ Begin
strPadL(strI2S(Count), 3, '0') + ' ' + strPadL(strI2S(Count), 3, '0') + ' ' +
strPadR(TFTPServer(FocusPtr.ClientList[Count - 1]).User.Handle, 31, ' ') + ' ' + strPadR(TFTPServer(FocusPtr.ClientList[Count - 1]).User.Handle, 31, ' ') + ' ' +
strPadL(TFTPServer(FocusPtr.ClientList[Count - 1]).Client.PeerIP, 15, ' ')); strPadL(TFTPServer(FocusPtr.ClientList[Count - 1]).Client.PeerIP, 15, ' '));
// this is broken... see the typecast of tftpserver kludge
End Else End Else
If Count <= FocusPtr.ClientMax Then If Count <= FocusPtr.ClientMax Then
Console.WriteXY (3, 3 + PosY, Attr, strPadL(strI2S(Count), 3, '0') + strPadR(' Waiting', 48, ' ')) Console.WriteXY (3, 3 + PosY, Attr, strPadL(strI2S(Count), 3, '0') + strPadR(' Waiting', 48, ' '))

View File

@ -120,6 +120,8 @@ Type
Destructor Destroy; Override; Destructor Destroy; Override;
Procedure RemoveFilesFromFLO (FN: String); Procedure RemoveFilesFromFLO (FN: String);
Function AuthenticateNode (AddrList: String) : Boolean; Function AuthenticateNode (AddrList: String) : Boolean;
Function EscapeFileName (Str: String) : String;
Function RestoreFileName (Str: String) : String;
Function GetDataStr : String; Function GetDataStr : String;
Procedure SendFrame (CmdType: Byte; CmdData: String); Procedure SendFrame (CmdType: Byte; CmdData: String);
Procedure SendDataFrame (Var Buf; BufSize: Word); Procedure SendDataFrame (Var Buf; BufSize: Word);
@ -130,6 +132,11 @@ Type
Function CreateBINKP (Owner: TServerManager; Config: RecConfig; ND: TNodeData; CliSock: TIOSocket) : TServerClient; Function CreateBINKP (Owner: TServerManager; Config: RecConfig; ND: TNodeData; CliSock: TIOSocket) : TServerClient;
// these need to be moved to a generic area
Function GetFTNOutPath (EchoNode: RecEchoMailNode) : String;
Procedure QueueByNode (Var Queue: TProtocolQueue; SkipHold: Boolean; EchoNode: RecEchoMailNode);
Type Type
TBINKPServer = Class(TServerClient) TBINKPServer = Class(TServerClient)
Server : TServerManager; Server : TServerManager;
@ -184,6 +191,34 @@ Begin
Inherited Destroy; Inherited Destroy;
End; End;
Function TBinkP.EscapeFileName (Str: String) : String;
Var
BadChars : Array[1..1] of Char = (' ');
Count : Byte;
Begin
Result := Str;
//Result := strReplace(Result, '\', '\ASCIICODEFORSLASH');
For Count := 1 to SizeOf(BadChars) Do
While Pos(BadChars[Count], Result) > 0 Do
Result := strReplace(Result, BadChars[Count], '\' + strI2H(Byte(BadChars[Count]), 2));
End;
Function TBinkP.RestoreFileName (Str: String) : String;
Var
Count : Byte;
Hex : String;
Begin
Result := Str;
While (Pos('\', Result) > 0) Do Begin
Count := Pos('\', Result);
Hex := Result[Count+1] + Result[Count+2];
Result := strReplace(Result, '\' + Hex, Char(strH2I(Hex)));
End;
End;
Function TBinkP.AuthenticateNode (AddrList: String) : Boolean; Function TBinkP.AuthenticateNode (AddrList: String) : Boolean;
Var Var
EchoFile : File; EchoFile : File;
@ -585,7 +620,7 @@ Begin
// translate filename, fix up file times // translate filename, fix up file times
Str := GetDataStr; Str := GetDataStr;
InFN := strWordGet(1, Str, ' '); InFN := RestoreFileName(strWordGet(1, Str, ' '));
InSize := strS2I(strWordGet(2, Str, ' ')); InSize := strS2I(strWordGet(2, Str, ' '));
InTime := strS2I(strWordGet(3, Str, ' ')); InTime := strS2I(strWordGet(3, Str, ' '));
InPos := strS2I(strWordGet(4, Str, ' ')); InPos := strS2I(strWordGet(4, Str, ' '));
@ -596,11 +631,11 @@ Begin
// fix timestamp and escape filen // fix timestamp and escape filen
If FSize >= InSize Then Begin If FSize >= InSize Then Begin
SendFrame (M_SKIP, InFN + ' ' + strI2S(FSize) + ' ' + strI2S(InTime)); SendFrame (M_SKIP, EscapeFileName(InFN) + ' ' + strI2S(FSize) + ' ' + strI2S(InTime));
Continue; Continue;
End Else Begin End Else Begin
SendFrame (M_GET, InFN + ' ' + strI2S(FSize) + ' ' + strI2S(InTime)); SendFrame (M_GET, EscapeFileName(InFN) + ' ' + strI2S(FSize) + ' ' + strI2S(InTime));
StatusUpdate(Owner, 'Receiving: ' + InFN); StatusUpdate(Owner, 'Receiving: ' + InFN);
@ -632,10 +667,11 @@ Begin
NeedHeader := True; NeedHeader := True;
If InPos = InSize Then Begin If InPos = InSize Then Begin
// fix time, escape filename // set file time based on intime value
// does this not work in linux?
Close (InFile); Close (InFile);
SendFrame (M_GOT, InFN + ' ' + strI2S(InSize) + ' ' + strI2S(InTime)); SendFrame (M_GOT, EscapeFileName(InFN) + ' ' + strI2S(InSize) + ' ' + strI2S(InTime));
Inc (RcvdFiles); Inc (RcvdFiles);
@ -673,8 +709,8 @@ Begin
If IoResult <> 0 Then Continue; If IoResult <> 0 Then Continue;
// need to escape filename here and fix file time // use real filetime instead of tempfiletime
SendFrame (M_FILE, FileList.QData[FileList.QPos].FileNew + ' ' + strI2S(FileList.QData[FileList.QPos].FileSize) + ' ' + strI2S(TempFileTime) + ' 0'); SendFrame (M_FILE, EscapeFileName(FileList.QData[FileList.QPos].FileNew) + ' ' + strI2S(FileList.QData[FileList.QPos].FileSize) + ' ' + strI2S(TempFileTime) + ' 0');
StatusUpdate (Owner, 'Sending ' + FileList.QData[FileList.QPos].FileNew); StatusUpdate (Owner, 'Sending ' + FileList.QData[FileList.QPos].FileNew);
@ -697,8 +733,9 @@ Begin
Seek (OutFile, strS2I(Str)); Seek (OutFile, strS2I(Str));
// fix file time and escape filename // use real filetime instead of tempfiletime
SendFrame (M_FILE, FileList.QData[FileList.QPos].FileNew + ' ' + Str + ' ' + strI2S(TempFileTime) + ' 0');
SendFrame (M_FILE, EscapeFileName(FileList.QData[FileList.QPos].FileNew) + ' ' + Str + ' ' + strI2S(TempFileTime) + ' 0');
HaveHeader := False; HaveHeader := False;
NeedHeader := True; NeedHeader := True;

View File

@ -16,7 +16,8 @@ Uses
MIS_Server, MIS_Server,
MIS_NodeData, MIS_NodeData,
MIS_Common, MIS_Common,
BBS_Records; BBS_Records,
BBS_DataBase;
Function CreateNNTP (Owner: TServerManager; Config: RecConfig; ND: TNodeData; CliSock: TIOSocket) : TServerClient; Function CreateNNTP (Owner: TServerManager; Config: RecConfig; ND: TNodeData; CliSock: TIOSocket) : TServerClient;
@ -180,21 +181,13 @@ Begin
If (TempBase.NewsName = Data) and CheckAccess(User, True, TempBase.ReadACS) Then Begin If (TempBase.NewsName = Data) and CheckAccess(User, True, TempBase.ReadACS) Then Begin
Found := True; Found := True;
Case TempBase.BaseType of If MBaseOpenCreate (MsgBase, TempBase, TempPath) Then Begin
0 : MsgBase := New(PMsgBaseJAM, Init);
1 : MsgBase := New(PMsgBaseSquish, Init);
End;
MsgBase^.SetMsgPath (TempBase.Path + TempBase.FileName);
MsgBase^.SetTempFile (TempPath + 'msgbuf.');
If MsgBase^.OpenMsgBase Then Begin
Low := 1; Low := 1;
High := MsgBase^.GetHighMsgNum; High := MsgBase^.GetHighMsgNum;
Active := MsgBase^.NumberOfMsgs; Active := MsgBase^.NumberOfMsgs;
End;
Dispose (MsgBase, Done); Dispose (MsgBase, Done);
End;
MBase := TempBase; MBase := TempBase;
MBasePos := MBaseFile.FilePosRecord; MBasePos := MBaseFile.FilePosRecord;
@ -261,20 +254,12 @@ Begin
True : PostAbility := 'y'; True : PostAbility := 'y';
End; End;
Case TempBase.BaseType of If MBaseOpenCreate (MsgBase, TempBase, TempPath) Then Begin
0 : MsgBase := New(PMsgBaseJAM, Init);
1 : MsgBase := New(PMsgBaseSquish, Init);
End;
MsgBase^.SetMsgPath (TempBase.Path + TempBase.FileName);
MsgBase^.SetTempFile (TempPath + 'msgbuf.');
If MsgBase^.OpenMsgBase Then Begin
LowMessage := 1; LowMessage := 1;
HighMessage := MsgBase^.GetHighActiveMsgNum; HighMessage := MsgBase^.GetHighActiveMsgNum;
End;
Dispose (MsgBase, Done); Dispose (MsgBase, Done);
End;
ClientWriteLine (TempBase.NewsName + ' ' + strI2S(LowMessage) + ' ' + strI2S(HighMessage) + ' ' + PostAbility); ClientWriteLine (TempBase.NewsName + ' ' + strI2S(LowMessage) + ' ' + strI2S(HighMessage) + ' ' + PostAbility);
End; End;
@ -561,6 +546,8 @@ Begin
Found := False; Found := False;
// ignore groups and check postacs in loop instead of below?
Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat'); Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat');
If ioReset(MBaseFile, SizeOf(RecMessageBase), fmRWDN) Then Begin If ioReset(MBaseFile, SizeOf(RecMessageBase), fmRWDN) Then Begin
@ -575,9 +562,9 @@ Begin
Break; Break;
End; End;
End; End;
End;
Close (MBaseFile); Close (MBaseFile);
End;
If Not Found or (Newsgroup = '') Then Begin If Not Found or (Newsgroup = '') Then Begin
MsgText.Free; MsgText.Free;
@ -595,63 +582,37 @@ Begin
Exit; Exit;
End; End;
Case TempBase.BaseType of If Not MBaseOpenCreate (MsgBase, TempBase, TempPath) Then Begin
0 : MsgBase := New(PMsgBaseJAM, Init);
1 : MsgBase := New(PMsgBaseSquish, Init);
End;
MsgBase^.SetMsgPath (TempBase.Path + TempBase.FileName);
MsgBase^.SetTempFile (TempPath + 'msgbuf.');
If Not MsgBase^.OpenMsgBase Then
If Not MsgBase^.CreateMsgBase (TempBase.MaxMsgs, TempBase.MaxAge) Then Begin
Dispose(MsgBase, Done);
MsgText.Free; MsgText.Free;
Client.WriteLine('441 Cannot save');
Exit; ClientWriteLine('441 Cannot save');
End Else
If Not MsgBase^.OpenMsgBase Then Begin
Dispose(MsgBase, Done);
MsgText.Free;
Client.WriteLine('411 Cannot save');
Exit; Exit;
End; End;
MsgBase^.StartNewMsg; MBaseAssignData (User, MsgBase, TempBase);
MsgBase^.SetLocal (True);
MsgBase^.SetDate (FormatDateTime('mm/dd/yy', Now));
MsgBase^.SetTime (FormatDateTime('hh:nn', Now));
MsgBase^.SetTo ('All'); MsgBase^.SetTo ('All');
MsgBase^.SetSubj (Subject); MsgBase^.SetSubj (Subject);
If TempBase.Flags And MBRealNames <> 0 Then
MsgBase^.SetFrom(User.RealName)
Else
MsgBase^.SetFrom(User.Handle);
If TempBase.NetType > 0 Then Begin
MsgBase^.SetMailType(mmtEchoMail);
Case TempBase.NetType of
1 : If TempBase.QwkConfID = 0 Then
Assign (SemFile, bbsConfig.SemaPath + fn_SemFileEchoOut)
Else
Assign (SemFile, bbsConfig.SemaPath + fn_SemFileQwk);
2 : Assign (SemFile, bbsConfig.SemaPath + fn_SemFileNews);
End;
ReWrite (SemFile);
Close (SemFile);
End Else
MsgBase^.SetMailType(mmtNormal);
MsgBase^.SetPriv (TempBase.Flags and MBPrivate <> 0);
For Count := 1 to MsgText.Count Do Begin For Count := 1 to MsgText.Count Do Begin
InData := MsgText.Strings[Count - 1]; InData := MsgText.Strings[Count - 1];
If Length(InData) > 79 Then InData[0] := #79; If Length(InData) > 79 Then InData[0] := #79;
// auto wrap option?
MsgBase^.DoStringLn(InData);
End;
// lets make a function to mbaseappendorigin
If TempBase.NetType > 0 Then Begin
MsgBase^.DoStringLn (#13 + '--- ' + mysSoftwareID + '/NNTP v' + mysVersion + ' (' + OSID + ')');
InData := ' * Origin: ' + GetOriginLine(TempBase);
If MBase.QwkNetID = 0 Then
InData := InData + ' (' + Addr2Str(MsgBase^.GetOrigAddr) + ')';
MsgBase^.DoStringLn (InData); MsgBase^.DoStringLn (InData);
End; End;
@ -663,7 +624,7 @@ Begin
MsgText.Free; MsgText.Free;
ClientWriteLine ('240 Article posted ok'); ClientWriteLine ('240 Article posted ok (' + TempBase.Name + ')');
End; End;
Procedure TNNTPServer.cmd_ARTICLE; Procedure TNNTPServer.cmd_ARTICLE;
@ -685,19 +646,9 @@ Begin
ArticleNum := strS2I(Data); ArticleNum := strS2I(Data);
Case MBase.BaseType of If Not MBaseOpenCreate (MsgBase, MBase, TempPath) THen Begin
0 : MsgBase := New(PMsgBaseJAM, Init);
1 : MsgBase := New(PMsgBaseSquish, Init);
End;
MsgBase^.SetMsgPath (MBase.Path + MBase.FileName);
MsgBase^.SetTempFile (TempPath + 'msgbuf.');
If Not MsgBase^.OpenMsgBase Then Begin
ClientWriteLine('423 No such article'); ClientWriteLine('423 No such article');
Dispose (MsgBase, Done);
Exit; Exit;
End; End;
@ -770,19 +721,9 @@ Begin
Last := First; Last := First;
End; End;
Case MBase.BaseType of If Not MBaseOpenCreate (MsgBase, MBase, TempPath) THen Begin
0 : MsgBase := New(PMsgBaseJAM, Init);
1 : MsgBase := New(PMsgBaseSquish, Init);
End;
MsgBase^.SetMsgPath (MBase.Path + MBase.FileName);
MsgBase^.SetTempFile (TempPath + 'msgbuf.');
If Not MsgBase^.OpenMsgBase Then Begin
ClientWriteLine('420 No article(s) selected'); ClientWriteLine('420 No article(s) selected');
Dispose (MsgBase, Done);
Exit; Exit;
End; End;

View File

@ -1563,11 +1563,11 @@ Begin
3 : Session.io.AnsiClrEOL; 3 : Session.io.AnsiClrEOL;
4 : Session.io.AnsiGotoXY(Param[1].B, Param[2].B); 4 : Session.io.AnsiGotoXY(Param[1].B, Param[2].B);
5 : Begin 5 : Begin
TempByte := Screen.CursorX; TempByte := Console.CursorX;
Store(TempByte, 1); Store(TempByte, 1);
End; End;
6 : Begin 6 : Begin
TempByte := Screen.CursorY; TempByte := Console.CursorY;
Store(TempByte, 1); Store(TempByte, 1);
End; End;
7 : Begin 7 : Begin
@ -1612,7 +1612,7 @@ Begin
{$IFDEF UNIX} {$IFDEF UNIX}
TempBool := Input.KeyPressed; TempBool := Input.KeyPressed;
{$ELSE} {$ELSE}
TempBool := Input.KeyPressed OR Session.Client.DataWaiting; TempBool := Keyboard.KeyPressed OR Session.Client.DataWaiting;
{$ENDIF} {$ENDIF}
Store (TempBool, 1); Store (TempBool, 1);
Session.io.BufFlush; Session.io.BufFlush;
@ -1873,7 +1873,7 @@ Begin
Store (TempStr, 256); Store (TempStr, 256);
End; End;
85 : Begin 85 : Begin
TempByte := Screen.TextAttr; TempByte := Console.TextAttr;
Store (TempByte, 1); Store (TempByte, 1);
End; End;
86 : Session.io.AnsiColor(Param[1].B); 86 : Session.io.AnsiColor(Param[1].B);
@ -2020,7 +2020,7 @@ Begin
TempChar := #0; TempChar := #0;
If (Param[1].B < 81) and (Param[2].B < 26) Then If (Param[1].B < 81) and (Param[2].B < 26) Then
TempChar := Screen.Buffer[Param[2].B][Param[1].B].UnicodeChar; TempChar := Console.Buffer[Param[2].B][Param[1].B].UnicodeChar;
Store (TempChar, 1); Store (TempChar, 1);
End; End;
@ -2028,7 +2028,7 @@ Begin
TempByte := 0; TempByte := 0;
If (Param[1].B < 81) and (Param[2].B < 26) Then If (Param[1].B < 81) and (Param[2].B < 26) Then
TempByte := Screen.Buffer[Param[2].B][Param[1].B].Attributes; TempByte := Console.Buffer[Param[2].B][Param[1].B].Attributes;
Store (TempByte, 1); Store (TempByte, 1);
End; End;
@ -2118,7 +2118,7 @@ Begin
Store (TempBool, 1); Store (TempBool, 1);
End; End;
559 : If ClassValid(Param[1].L, mplClass_Image) Then 559 : If ClassValid(Param[1].L, mplClass_Image) Then
Screen.GetScreenImage (Param[2].B, Param[3].B, Param[4].B, Param[5].B, TConsoleImageRec(ClassData[Param[1].L].ClassPtr^)); Console.GetScreenImage (Param[2].B, Param[3].B, Param[4].B, Param[5].B, TConsoleImageRec(ClassData[Param[1].L].ClassPtr^));
560 : If ClassValid(Param[1].L, mplClass_Image) Then 560 : If ClassValid(Param[1].L, mplClass_Image) Then
Session.io.RemoteRestore(TConsoleImageRec(ClassData[Param[1].L].ClassPtr^)); Session.io.RemoteRestore(TConsoleImageRec(ClassData[Param[1].L].ClassPtr^));
End; End;

View File

@ -12,7 +12,7 @@ Uses
m_FileIO, m_FileIO,
m_Strings, m_Strings,
BBS_Records, BBS_Records,
BBS_Common, BBS_DataBase,
mUtil_Common, mUtil_Common,
mUtil_Status; mUtil_Status;
@ -70,7 +70,7 @@ Begin
MsgSubj := INI.ReadString (Header_MsgPost, 'file' + strI2S(Count) + '_subj', ''); MsgSubj := INI.ReadString (Header_MsgPost, 'file' + strI2S(Count) + '_subj', '');
DelFile := INI.ReadBoolean (Header_MsgPost, 'file' + strI2S(Count) + '_delfile', False); DelFile := INI.ReadBoolean (Header_MsgPost, 'file' + strI2S(Count) + '_delfile', False);
strStr2Addr(INI.ReadString(Header_MsgPost, 'file' + strI2S(Count) + '_addr', '0:0/0'), MsgAddr); Str2Addr(INI.ReadString(Header_MsgPost, 'file' + strI2S(Count) + '_addr', '0:0/0'), MsgAddr);
If (MsgFrom = '') or (MsgTo = '') Then Begin If (MsgFrom = '') or (MsgTo = '') Then Begin
Log (2, '!', ' Invalid From to To: ' + MsgFrom + '/' + MsgTo); Log (2, '!', ' Invalid From to To: ' + MsgFrom + '/' + MsgTo);

View File

@ -65,31 +65,29 @@ End;
Procedure InitClasses; Procedure InitClasses;
Begin Begin
Assign (ConfigFile, 'mystic.dat'); Case BBSCfgStatus of
CfgNotFound : Begin
if ioReset(ConfigFile, SizeOf(RecConfig), fmReadWrite + fmDenyNone) Then Begin
Read (ConfigFile, bbsCfg);
Close (ConfigFile);
End Else Begin
WriteLn('ERROR: Unable to read mystic.dat'); WriteLn('ERROR: Unable to read mystic.dat');
Halt(1); Halt(1);
End; End;
CfgMisMatch : Begin
If bbsCfg.DataChanged <> mysDataChanged Then Begin
WriteLn('ERROR: Data files are not current and must be upgraded'); WriteLn('ERROR: Data files are not current and must be upgraded');
Halt(1); Halt(1);
End; End;
End;
Screen := TOutput.Create(True); Console := TOutput.Create(True);
Input := TInput.Create; Keyboard := TInput.Create;
Session := TBBSCore.Create; Session := TBBSCore.Create;
Assign (Session.ConfigFile, bbsCfgPath + 'mystic.dat');
End; End;
Procedure DisposeClasses; Procedure DisposeClasses;
Begin Begin
Session.Free; Session.Free;
Input.Free; Keyboard.Free;
Screen.Free; Console.Free;
End; End;
Var Var
@ -150,11 +148,11 @@ Begin
{$IFNDEF LOGGING} {$IFNDEF LOGGING}
{$IFNDEF UNIX} {$IFNDEF UNIX}
Screen.TextAttr := 14; Console.TextAttr := 14;
Screen.SetWindow (1, 1, 80, 25, False); Console.SetWindow (1, 1, 80, 25, False);
Screen.ClearScreen; Console.ClearScreen;
Screen.WriteLine ('Exiting with Errorlevel ' + strI2S(ExitCode)); Console.WriteLine ('Exiting with Errorlevel ' + strI2S(ExitCode));
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
@ -166,7 +164,7 @@ End;
Procedure CheckDIR (Dir: String); Procedure CheckDIR (Dir: String);
Begin Begin
If Not DirExists(Dir) Then Begin If Not DirExists(Dir) Then Begin
Screen.WriteLine ('ERROR: ' + Dir + ' does not exist.'); Console.WriteLine ('ERROR: ' + Dir + ' does not exist.');
DisposeClasses; DisposeClasses;
@ -182,15 +180,15 @@ Begin
Session.NodeNum := 0; Session.NodeNum := 0;
For Count := 1 to bbsCfg.INetTNNodes Do Begin For Count := 1 to bbsCfg.INetTNNodes Do Begin
Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Count) + '.dat'); Assign (Session.ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Count) + '.dat');
If Not ioReset (ChatFile, Sizeof(ChatRec), fmRWDN) Then Begin If Not ioReset (Session.ChatFile, Sizeof(ChatRec), fmRWDN) Then Begin
Session.NodeNum := Count; Session.NodeNum := Count;
Break; Break;
End Else Begin End Else Begin
ioRead (ChatFile, TChat); ioRead (Session.ChatFile, TChat);
Close (ChatFile); Close (Session.ChatFile);
If Not TChat.Active Then Begin If Not TChat.Active Then Begin
Session.NodeNum := Count; Session.NodeNum := Count;
@ -267,7 +265,7 @@ Begin
{$I-} Reset (Session.User.UserFile); {$I+} {$I-} Reset (Session.User.UserFile); {$I+}
If IoResult <> 0 Then Begin If IoResult <> 0 Then Begin
If FileExist(bbsCfg.DataPath + 'users.dat') Then Begin If FileExist(bbsCfg.DataPath + 'users.dat') Then Begin
Screen.WriteLine ('ERROR: Unable to access USERS.DAT'); Console.WriteLine ('ERROR: Unable to access USERS.DAT');
DisposeClasses; DisposeClasses;
Halt(1); Halt(1);
End; End;
@ -284,7 +282,7 @@ Begin
Assign (Session.ThemeFile, bbsCfg.DataPath + 'theme.dat'); Assign (Session.ThemeFile, bbsCfg.DataPath + 'theme.dat');
{$I-} Reset (Session.ThemeFile); {$I+} {$I-} Reset (Session.ThemeFile); {$I+}
If IoResult <> 0 Then Begin If IoResult <> 0 Then Begin
Screen.WriteLine ('ERROR: No theme configuration.'); Console.WriteLine ('ERROR: No theme configuration.');
DisposeClasses; DisposeClasses;
Halt(1); Halt(1);
End; End;
@ -292,7 +290,7 @@ Begin
If Not Session.LoadThemeData(bbsCfg.DefThemeFile) Then Begin If Not Session.LoadThemeData(bbsCfg.DefThemeFile) Then Begin
If Not Session.ConfigMode Then Begin If Not Session.ConfigMode Then Begin
Screen.WriteLine ('ERROR: Default theme prompts not found: ' + bbsCfg.DefThemeFile + '.txt'); Console.WriteLine ('ERROR: Default theme prompts not found: ' + bbsCfg.DefThemeFile + '.txt');
DisposeClasses; DisposeClasses;
Halt(1); Halt(1);
End; End;
@ -309,15 +307,15 @@ Begin
CheckDIR (bbsCfg.ScriptPath); CheckDIR (bbsCfg.ScriptPath);
CheckDIR (bbsCfg.LogsPath); CheckDIR (bbsCfg.LogsPath);
Assign (RoomFile, bbsCfg.DataPath + 'chatroom.dat'); Assign (Session.RoomFile, bbsCfg.DataPath + 'chatroom.dat');
{$I-} Reset (RoomFile); {$I+} {$I-} Reset (Session.RoomFile); {$I+}
If IoResult <> 0 Then Begin If IoResult <> 0 Then Begin
ReWrite (RoomFile); ReWrite (Session.RoomFile);
Room.Name := 'None'; Session.Room.Name := 'None';
For Count := 1 to 99 Do For Count := 1 to 99 Do
Write (RoomFile, Room); Write (Session.RoomFile, Session.Room);
End; End;
Close (RoomFile); Close (Session.RoomFile);
Assign (Session.FileBase.FBaseFile, bbsCfg.DataPath + 'fbases.dat'); Assign (Session.FileBase.FBaseFile, bbsCfg.DataPath + 'fbases.dat');
{$I-} Reset(Session.FileBase.FBaseFile); {$I+} {$I-} Reset(Session.FileBase.FBaseFile); {$I+}
@ -327,7 +325,7 @@ Begin
Assign (Session.Msgs.MBaseFile, bbsCfg.DataPath + 'mbases.dat'); Assign (Session.Msgs.MBaseFile, bbsCfg.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
Screen.WriteLine ('ERROR: No message base configuration. Use MYSTIC -CFG'); Console.WriteLine ('ERROR: No message base configuration. Use MYSTIC -CFG');
DisposeClasses; DisposeClasses;
Halt(1); Halt(1);
End; End;
@ -353,10 +351,10 @@ Begin
End; End;
Close (Session.User.SecurityFile); Close (Session.User.SecurityFile);
Assign (LastOnFile, bbsCfg.DataPath + 'callers.dat'); Assign (Session.LastOnFile, bbsCfg.DataPath + 'callers.dat');
{$I-} Reset(LastOnFile); {$I+} {$I-} Reset(Session.LastOnFile); {$I+}
If IoResult <> 0 Then ReWrite(LastOnFile); If IoResult <> 0 Then ReWrite(Session.LastOnFile);
Close (LastOnFile); Close (Session.LastOnFile);
Assign (Session.FileBase.ArcFile, bbsCfg.DataPath + 'archive.dat'); Assign (Session.FileBase.ArcFile, bbsCfg.DataPath + 'archive.dat');
{$I-} Reset(Session.FileBase.ArcFile); {$I+} {$I-} Reset(Session.FileBase.ArcFile); {$I+}
@ -384,8 +382,8 @@ Begin
InitClasses; InitClasses;
Screen.TextAttr := 7; Console.TextAttr := 7;
Screen.WriteLine(''); Console.WriteLine('');
For Count := 1 to ParamCount Do Begin For Count := 1 to ParamCount Do Begin
Temp := strUpper(ParamStr(Count)); Temp := strUpper(ParamStr(Count));
@ -461,13 +459,13 @@ Begin
If Session.ConfigMode Then Begin If Session.ConfigMode Then Begin
Session.NodeNum := 0; Session.NodeNum := 0;
Screen.SetWindowTitle ('Mystic Configuration'); Console.SetWindowTitle ('Mystic Configuration');
Configuration_MainMenu; Configuration_MainMenu;
Screen.TextAttr := 7; Console.TextAttr := 7;
Screen.ClearScreen; Console.ClearScreen;
Screen.BufFlush; Console.BufFlush;
Halt(0); Halt(0);
End; End;

View File

@ -14,94 +14,6 @@ Uses
Var Var
TempPath : String; TempPath : String;
(*
Function PollByQWKNet (QwkNet: RecQwkNetwork) : Boolean;
Var
QWK : TQwkEngine;
FTP : TFTPClient;
User : RecUser;
SentFile : Boolean;
ExpTotal : LongInt;
Begin
Result := False;
SentFile := False;
If (QwkNet.MemberType <> 1) or
(QwkNet.PacketID = '') or
(QwkNet.ArcType = '') Then Exit;
WriteLn ('- Exchanging Mail for ' + QwkNet.Description);
DirClean (TempPath, '');
User.Handle := QwkNet.PacketID;
User.QwkNetwork := QwkNet.Index;
QWK := TQwkEngine.Create (TempPath, QwkNet.PacketID, 1, User);
QWK.IsNetworked := True;
QWK.IsExtended := QwkNet.UseQWKE;
QWK.ExportPacket(True);
ExecuteArchive (TempPath, TempPath + QwkNet.PacketID + '.rep', QwkNet.ArcType, TempPath + '*', 1);
WriteLn (' - Exported @' + QwkNet.PacketID + '.rep -> ', QWK.TotalMessages, ' msgs ');
WriteLn (' - Connecting via FTP to ' + QWkNet.HostName);
ExpTotal := QWK.TotalMessages;
If ExpTotal = 0 Then
DirClean (TempPath, '');
FTP := TFTPClient.Create(bbsCfg.inetInterface);
If FTP.OpenConnection(QwkNet.HostName) Then Begin
WriteLn (' - Connected');
If FTP.Authenticate(QwkNet.Login, QwkNet.Password) Then Begin
WriteLn (' - Logged in as ', QwkNet.Login);
WriteLn (' - Sending reply packet');
SentFile := FTP.SendFile (QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.rep');
WriteLn (' - Downloading QWK packet');
DirClean (TempPath, '');
FTP.GetFile (QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.qwk');
If FileExist(TempPath + QwkNet.PacketID + '.qwk') Then Begin
WriteLn (' - Unpacking QWK packet');
ExecuteArchive (TempPath, TempPath + QwkNet.PacketID + '.qwk', QwkNet.ArcType, '*', 2);
WriteLn (' - Importing QWK packet');
If QWK.ImportPacket(True) Then
WriteLn (' - Imported ', QWK.RepOK, ' messages (', QWK.RepFailed, ' failed)')
Else
WriteLn (' - Unable to find QWK packet');
End Else
Writeln (' - No QWK file received');
End;
End;
If (ExpTotal > 0) and Not SentFile Then Begin
WriteLn (' - Send of REP failed; reseting export pointers');
QWK.ResetSentFlagByQLR;
writeln('DEBUG done');
End;
FTP.Free;
QWK.Free;
DirClean (TempPath, '');
WriteLn;
End;
*)
Function PollByQWKNet (QwkNet: RecQwkNetwork) : Boolean; Function PollByQWKNet (QwkNet: RecQwkNetwork) : Boolean;
Var Var
QWK : TQwkEngine; QWK : TQwkEngine;
@ -145,13 +57,24 @@ Begin
If FTP.Authenticate(QwkNet.Login, QwkNet.Password) Then Begin If FTP.Authenticate(QwkNet.Login, QwkNet.Password) Then Begin
WriteLn (' - Logged in as ', QwkNet.Login); WriteLn (' - Logged in as ', QwkNet.Login);
If QWK.TotalMessages > 0 Then Begin
WriteLn (' - Sending reply packet'); WriteLn (' - Sending reply packet');
SentFile := FTP.SendFile (QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.rep'); Case FTP.SendFile(QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.rep') of
ftpResOK : SentFile := True;
ftpResFailed : WriteLn (' - Failed');
ftpResBadData : WriteLn (' - Unable to open data connection');
End;
End;
WriteLn (' - Downloading QWK packet'); WriteLn (' - Downloading QWK packet');
FTP.GetFile (QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.qwk'); Case FTP.GetFile (QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.qwk') of
ftpResOK : WriteLn (' - OK: ' + QwkNet.PacketID + '.qwk', ' (' + strComma(FileByteSize(TempPath + QwkNet.PacketID + '.qwk')) + ' bytes)');
ftpResFailed : WriteLn (' - Failed');
ftpResBadData : WriteLn (' - Unable to open data connection');
End;
End; End;
End; End;

View File

@ -3757,4 +3757,10 @@
! Fixed a compatibility issue with the BINKP server when used against a BINKD ! Fixed a compatibility issue with the BINKP server when used against a BINKD
client. client.
! Fixed a bug when posting messages via NNTP. Since there is no "To" in
NNTP, Mystic now sets all posts to "To: All". This fixed a problem where
some messages posted via NNTP were not showing up inside of Mystic.
! Fixed: Posts to networked bases via NNTP were not adding origin lines.
<ALPHA 38 RELEASED> <ALPHA 38 RELEASED>