A38 work
This commit is contained in:
parent
484bfdf0a7
commit
8d8193c7a8
|
@ -112,7 +112,7 @@ Uses
|
|||
m_Strings,
|
||||
BBS_Core,
|
||||
BBS_IO,
|
||||
BBS_Common,
|
||||
BBS_DataBase,
|
||||
BBS_Ansi_MenuInput;
|
||||
|
||||
Procedure WriteXY (X, Y, A: Byte; S: String);
|
||||
|
@ -244,7 +244,7 @@ Var
|
|||
Count : Byte;
|
||||
Begin
|
||||
For Count := Y1 to Y2 Do
|
||||
WriteXY (X, Count, 112, '³');
|
||||
WriteXY (X, Count, 112, #179);
|
||||
End;
|
||||
|
||||
Function ShowMsgBox (BoxType : Byte; Str : String) : Boolean;
|
||||
|
@ -354,9 +354,9 @@ Var
|
|||
Begin
|
||||
If Not WasOpened Then
|
||||
If Shadow Then
|
||||
Screen.GetScreenImage(X1, Y1, X2 + 2, Y2 + 1, Image)
|
||||
Console.GetScreenImage(X1, Y1, X2 + 2, Y2 + 1, Image)
|
||||
Else
|
||||
Screen.GetScreenImage(X1, Y1, X2, Y2, Image);
|
||||
Console.GetScreenImage(X1, Y1, X2, Y2, Image);
|
||||
|
||||
WasOpened := True;
|
||||
|
||||
|
@ -389,14 +389,14 @@ Begin
|
|||
If Shadow Then Begin
|
||||
For A := Y1 + 1 to Y2 + 1 Do
|
||||
For B := X2 + 1 to X2 + 2 Do Begin
|
||||
Ch := Screen.ReadCharXY(B, A);
|
||||
Ch := Console.ReadCharXY(B, A);
|
||||
WriteXY (B, A, ShadowAttr, Ch);
|
||||
End;
|
||||
|
||||
A := Y2 + 1;
|
||||
|
||||
For B := (X1 + 2) To (X2 + 2) Do Begin
|
||||
Ch := Screen.ReadCharXY(B, A);
|
||||
Ch := Console.ReadCharXY(B, A);
|
||||
WriteXY (B, A, ShadowAttr, Ch);
|
||||
End;
|
||||
End;
|
||||
|
@ -413,7 +413,7 @@ Begin
|
|||
|
||||
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);
|
||||
End;
|
||||
|
|
|
@ -34,7 +34,7 @@ Implementation
|
|||
|
||||
Uses
|
||||
bbs_Core,
|
||||
bbs_Common,
|
||||
bbs_DataBase,
|
||||
bbs_IO;
|
||||
|
||||
Constructor TAnsiMenuInput.Create;
|
||||
|
@ -179,7 +179,7 @@ Var
|
|||
WriteXY (X, Y, Attr, 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;
|
||||
|
||||
Procedure ReDrawPart;
|
||||
|
@ -254,7 +254,7 @@ Begin
|
|||
Inc (CurPos);
|
||||
Inc (StrPos);
|
||||
|
||||
Session.io.AnsiGotoXY (Screen.CursorX + 1, Screen.CursorY);
|
||||
Session.io.AnsiGotoXY (Console.CursorX + 1, Console.CursorY);
|
||||
End;
|
||||
#75 : If StrPos > 1 Then Begin
|
||||
If CurPos = 1 Then ScrollLeft;
|
||||
|
@ -262,7 +262,7 @@ Begin
|
|||
Dec (StrPos);
|
||||
Dec (CurPos);
|
||||
|
||||
Session.io.AnsiGotoXY (Screen.CursorX - 1, Screen.CursorY);
|
||||
Session.io.AnsiGotoXY (Console.CursorX - 1, Console.CursorY);
|
||||
End;
|
||||
#71 : If StrPos > 1 Then Begin
|
||||
StrPos := 1;
|
||||
|
@ -303,7 +303,7 @@ Begin
|
|||
If CurPos = 1 Then
|
||||
ScrollLeft
|
||||
Else Begin
|
||||
Session.io.AnsiMoveX(Screen.CursorX - 1);
|
||||
Session.io.AnsiMoveX(Console.CursorX - 1);
|
||||
|
||||
Dec (CurPos);
|
||||
|
||||
|
|
|
@ -86,10 +86,10 @@ Begin
|
|||
Exit;
|
||||
End;
|
||||
|
||||
If Last - First > mdlMaxSortSize Then Begin
|
||||
ShowMsgBox(0, 'Cannot sort more than ' + strI2S(mdlMaxSortSize) + ' items');
|
||||
Exit;
|
||||
End;
|
||||
If Last - First > mdlMaxSortSize Then Begin
|
||||
ShowMsgBox(0, 'Cannot sort more than ' + strI2S(mdlMaxSortSize) + ' items');
|
||||
Exit;
|
||||
End;
|
||||
|
||||
Result := True;
|
||||
End;
|
||||
|
|
|
@ -309,7 +309,7 @@ Var
|
|||
While Not Eof(EchoFile) Do Begin
|
||||
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;
|
||||
|
||||
List.Add('', 2);
|
||||
|
@ -461,7 +461,7 @@ Function Configuration_EchomailAddress (Edit: Boolean) : Byte;
|
|||
Form.Free;
|
||||
Box.Free;
|
||||
|
||||
If strAddr2Str(bbsCfg.NetAddress[Num]) = '0:0/0' Then
|
||||
If Addr2Str(bbsCfg.NetAddress[Num]) = '0:0/0' Then
|
||||
bbsCfg.NetDomain[Num] := ''
|
||||
Else
|
||||
If bbsCfg.NetDomain[Num] = '' Then Begin
|
||||
|
@ -481,7 +481,7 @@ Var
|
|||
List.Clear;
|
||||
|
||||
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;
|
||||
|
||||
Var
|
||||
|
@ -547,7 +547,7 @@ Var
|
|||
Read (ExportFile, ExpNode);
|
||||
|
||||
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
|
||||
List.Add('XXX UNKNOWN - DELETE THIS', 0);
|
||||
End;
|
||||
|
|
|
@ -36,7 +36,7 @@ Procedure Configuration_ExecuteEditor (Mode: Char);
|
|||
Var
|
||||
TmpImage : TConsoleImageRec;
|
||||
Begin
|
||||
Screen.GetScreenImage (1, 1, 79, 24, TmpImage);
|
||||
Console.GetScreenImage (1, 1, 79, 24, TmpImage);
|
||||
|
||||
Case Mode of
|
||||
'A' : Configuration_ArchiveEditor;
|
||||
|
@ -98,7 +98,7 @@ Var
|
|||
Begin
|
||||
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, 2, 8, Len, 'Ý|09|17² |15' + Text + ' |00°|16|08Þ');
|
||||
|
@ -316,9 +316,9 @@ Begin
|
|||
|
||||
Form.Free;
|
||||
|
||||
ReWrite (ConfigFile);
|
||||
Write (ConfigFile, bbsCfg);
|
||||
Close (ConfigFile);
|
||||
ReWrite (Session.ConfigFile);
|
||||
Write (Session.ConfigFile, bbsCfg);
|
||||
Close (Session.ConfigFile);
|
||||
End;
|
||||
|
||||
End.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Unit bbs_cfg_MenuEdit;
|
||||
Unit BBS_Cfg_MenuEdit;
|
||||
|
||||
{$I M_OPS.PAS}
|
||||
|
||||
|
@ -174,7 +174,7 @@ Var
|
|||
OldData : TMenuData;
|
||||
TmpImage : TConsoleImageRec;
|
||||
Begin
|
||||
Screen.GetScreenImage (1, 1, 79, 24, TmpImage);
|
||||
Console.GetScreenImage (1, 1, 79, 24, TmpImage);
|
||||
|
||||
Session.io.OutFull('|07|16|CL');
|
||||
Session.io.BufFlush;
|
||||
|
|
|
@ -158,7 +158,7 @@ Begin
|
|||
Form.AddBits ('9', ' Pvt Reply' , 55, 21, 68, 21, 11, MBPrivReply, @MBase.Flags, Topic + 'Allow private posts in public?');
|
||||
|
||||
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');
|
||||
|
||||
|
@ -299,7 +299,7 @@ Var
|
|||
Form.LoExitChars := #21#27;
|
||||
|
||||
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
|
||||
WriteXY (28, 20, 113, strPadR(AddStr, 12, ' '));
|
||||
|
@ -312,13 +312,13 @@ Var
|
|||
AddIdx := Configuration_EchoMailNodes(False);
|
||||
|
||||
If GetNodeByIndex(AddIdx, EN) Then
|
||||
AddStr := strAddr2Str(EN.Address);
|
||||
AddStr := Addr2Str(EN.Address);
|
||||
End;
|
||||
'8' : Begin
|
||||
DelIdx := Configuration_EchoMailNodes(False);
|
||||
|
||||
If GetNodeByIndex(DelIdx, EN) Then
|
||||
DelStr := strAddr2Str(EN.Address);
|
||||
DelStr := Addr2Str(EN.Address);
|
||||
End;
|
||||
'D' : Global.NetAddr := Configuration_EchoMailAddress(False);
|
||||
#21 : Begin
|
||||
|
@ -404,7 +404,7 @@ Var
|
|||
If MBase.QwkNetID <> 0 Then
|
||||
Addr := 'QwkNet'
|
||||
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);
|
||||
End;
|
||||
|
|
|
@ -414,8 +414,8 @@ Var
|
|||
|
||||
Session.io.OutFull(SimStr);
|
||||
|
||||
SavedX := Screen.CursorX;
|
||||
SavedY := Screen.CursorY;
|
||||
SavedX := Console.CursorX;
|
||||
SavedY := Console.CursorY;
|
||||
|
||||
WriteXY (1, 23, 112, strPadC('Simulating Prompt', 79, ' '));
|
||||
|
||||
|
@ -463,7 +463,7 @@ Var
|
|||
Image : TConsoleImageRec;
|
||||
SavedTheme : RecTheme;
|
||||
Begin
|
||||
Screen.GetScreenImage(1, 1, 79, 24, Image);
|
||||
Console.GetScreenImage(1, 1, 79, 24, Image);
|
||||
|
||||
If Not LoadStringData Then Exit;
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ Begin
|
|||
|
||||
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);
|
||||
FirstCall := DateDos2Str(U.FirstOn, 1);
|
||||
|
@ -352,7 +352,7 @@ Begin
|
|||
|
||||
Configuration_EditUser (Session.User.ThisUser);
|
||||
|
||||
Screen.WriteXY (1, 24, 7, strRep(' ', 80));
|
||||
Console.WriteXY (1, 24, 7, strRep(' ', 80));
|
||||
|
||||
Session.InUserEdit := False;
|
||||
Session.LocalMode := SavedLocal;
|
||||
|
@ -360,7 +360,7 @@ Begin
|
|||
Session.SetTimeLeft(Session.User.ThisUser.TimeLeft);
|
||||
|
||||
{$IFNDEF UNIX}
|
||||
UpdateStatusLine(StatusPtr, '');
|
||||
UpdateStatusLine(Session.StatusPtr, '');
|
||||
{$ENDIF}
|
||||
End;
|
||||
|
||||
|
|
|
@ -28,24 +28,10 @@ Const
|
|||
WinConsoleTitle = mysSoftwareID + ' Node ';
|
||||
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;
|
||||
Procedure KillRecord (Var dFile; RecNum: LongInt; RecSize: Word);
|
||||
Procedure AddRecord (var dFile; RecNum: LongInt; RecSize: Word);
|
||||
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;
|
||||
|
||||
{$IFNDEF UNIX}
|
||||
|
@ -138,50 +124,6 @@ Begin
|
|||
Bool_Search := Pos(strUpper(Mask), strUpper(Str)) > 0;
|
||||
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;
|
||||
Begin
|
||||
Session.SystemLog('DEBUG: In ShellOS for: (' + ExecPath + ') ' + Command);
|
||||
|
@ -200,13 +142,13 @@ Begin
|
|||
End;
|
||||
|
||||
{$IFNDEF UNIX}
|
||||
Screen.SetWindow (1, 1, 80, 25, False);
|
||||
Screen.TextAttr := 7;
|
||||
Screen.ClearScreen;
|
||||
Console.SetWindow (1, 1, 80, 25, False);
|
||||
Console.TextAttr := 7;
|
||||
Console.ClearScreen;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF UNIX}
|
||||
Screen.SetRawMode(False);
|
||||
Console.SetRawMode(False);
|
||||
{$ENDIF}
|
||||
|
||||
If ExecPath <> '' Then Begin
|
||||
|
@ -231,11 +173,11 @@ Begin
|
|||
{$ENDIF}
|
||||
|
||||
{$IFDEF UNIX}
|
||||
Screen.SetRawMode(True);
|
||||
Console.SetRawMode(True);
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
Screen.SetWindowTitle (WinConsoleTitle + strI2S(Session.NodeNum));
|
||||
Console.SetWindowTitle (WinConsoleTitle + strI2S(Session.NodeNum));
|
||||
{$ENDIF}
|
||||
|
||||
DirChange(bbsCfg.SystemPath);
|
||||
|
@ -250,7 +192,7 @@ Begin
|
|||
// Reset (Session.PromptFile);
|
||||
|
||||
{$IFNDEF UNIX}
|
||||
If Screen.Active Then
|
||||
If Console.Active Then
|
||||
Session.io.LocalScreenEnable
|
||||
Else
|
||||
Session.io.LocalScreenDisable;
|
||||
|
@ -264,41 +206,41 @@ Procedure UpdateStatusLine (Mode: Byte; Str: String);
|
|||
Begin
|
||||
If Not bbsCfg.UseStatusBar Then Exit;
|
||||
|
||||
Screen.SetWindow (1, 1, 80, 25, False);
|
||||
Console.SetWindow (1, 1, 80, 25, False);
|
||||
|
||||
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
|
||||
Screen.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));
|
||||
Screen.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));
|
||||
Screen.WriteXY (76, 25, bbsCfg.StatusColor2, strI2S(Session.TimeLeft));
|
||||
Console.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Alias ' + strRep(' ', 35) + 'Age SecLevel TimeLeft ');
|
||||
Console.WriteXY ( 8, 25, bbsCfg.StatusColor2, Session.User.ThisUser.Handle + ' #' + strI2S(Session.User.ThisUser.PermIdx));
|
||||
Console.WriteXY (47, 25, bbsCfg.StatusColor2, Session.User.ThisUser.Gender + '/' + strI2S(DaysAgo(Session.User.ThisUser.Birthday, 1) DIV 365));
|
||||
Console.WriteXY (62, 25, bbsCfg.StatusColor2, strI2S(Session.User.ThisUser.Security));
|
||||
Console.WriteXY (76, 25, bbsCfg.StatusColor2, strI2S(Session.TimeLeft));
|
||||
End;
|
||||
2 : Begin
|
||||
Screen.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Email ' + strRep(' ', 35) + ' Location ' + strRep(' ', 27) + ' ');
|
||||
Screen.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 ( 1, 25, bbsCfg.StatusColor1, ' Email ' + strRep(' ', 35) + ' Location ' + strRep(' ', 27) + ' ');
|
||||
Console.WriteXY ( 8, 25, bbsCfg.StatusColor2, strPadR(Session.User.ThisUser.Email, 36, ' '));
|
||||
Console.WriteXY (53, 25, bbsCfg.StatusColor2, strPadR(Session.User.ThisUser.City, 27, ' '));
|
||||
End;
|
||||
3 : Begin
|
||||
Screen.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' IP ' + strRep(' ', 19) + ' Host ' + strRep(' ', 49) + ' ');
|
||||
Screen.WriteXY ( 5, 25, bbsCfg.StatusColor2, Session.UserIPInfo);
|
||||
Screen.WriteXY (31, 25, bbsCfg.StatusColor2, strPadR(Session.UserHostInfo, 49, ' '));
|
||||
Console.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' IP ' + strRep(' ', 19) + ' Host ' + strRep(' ', 49) + ' ');
|
||||
Console.WriteXY ( 5, 25, bbsCfg.StatusColor2, Session.UserIPInfo);
|
||||
Console.WriteXY (31, 25, bbsCfg.StatusColor2, strPadR(Session.UserHostInfo, 49, ' '));
|
||||
End;
|
||||
4 : Begin
|
||||
Screen.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Flags 1 ' + strRep(' ', 35) + ' Flags 2 ');
|
||||
Screen.WriteXY (10, 25, bbsCfg.StatusColor2, DrawAccessFlags(Session.User.ThisUser.AF1));
|
||||
Screen.WriteXY (54, 25, bbsCfg.StatusColor2, DrawAccessFlags(Session.User.ThisUser.AF2));
|
||||
Console.WriteXY ( 1, 25, bbsCfg.StatusColor1, ' Flags 1 ' + strRep(' ', 35) + ' Flags 2 ');
|
||||
Console.WriteXY (10, 25, bbsCfg.StatusColor2, DrawAccessFlags(Session.User.ThisUser.AF1));
|
||||
Console.WriteXY (54, 25, bbsCfg.StatusColor2, DrawAccessFlags(Session.User.ThisUser.AF2));
|
||||
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;
|
||||
|
||||
Screen.SetWindow (1, 1, 80, 24, False);
|
||||
Console.SetWindow (1, 1, 80, 24, False);
|
||||
End;
|
||||
|
||||
Procedure ProcessSysopCommand (Cmd: Char);
|
||||
Begin
|
||||
If Not Screen.Active And (Cmd <> #47) Then Exit;
|
||||
If Not Console.Active And (Cmd <> #47) Then Exit;
|
||||
|
||||
Case Cmd of
|
||||
{E} #18 : If (Not Session.InUserEdit) and (Session.User.UserNum <> -1) Then
|
||||
|
@ -307,10 +249,10 @@ Begin
|
|||
bbsCfg.UseStatusBar := Not bbsCfg.UseStatusBar;
|
||||
|
||||
If Not bbsCfg.UseStatusBar Then Begin
|
||||
Screen.WriteXY (1, 25, 0, strRep(' ', 80));
|
||||
Screen.SetWindow (1, 1, 80, 25, False);
|
||||
Console.WriteXY (1, 25, 0, strRep(' ', 80));
|
||||
Console.SetWindow (1, 1, 80, 25, False);
|
||||
End Else
|
||||
UpdateStatusLine (StatusPtr, '');
|
||||
UpdateStatusLine (Session.StatusPtr, '');
|
||||
End;
|
||||
{S} #31 : If Not Session.User.InChat Then OpenChat(True);
|
||||
{H} #35 : Begin
|
||||
|
@ -318,17 +260,17 @@ Begin
|
|||
Halt(0);
|
||||
End;
|
||||
{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
|
||||
Else
|
||||
Session.io.LocalScreenEnable;
|
||||
{B} #48 : Begin
|
||||
If StatusPtr < 5 Then
|
||||
Inc (StatusPtr)
|
||||
If Session.StatusPtr < 5 Then
|
||||
Inc (Session.StatusPtr)
|
||||
Else
|
||||
StatusPtr := 1;
|
||||
Session.StatusPtr := 1;
|
||||
|
||||
UpdateStatusLine (StatusPtr, '');
|
||||
UpdateStatusLine (Session.StatusPtr, '');
|
||||
End;
|
||||
#59..
|
||||
#62 : Begin
|
||||
|
@ -343,11 +285,11 @@ Begin
|
|||
End;
|
||||
{+} #130: If Session.TimeLeft > 1 Then Begin
|
||||
Session.SetTimeLeft(Session.TimeLeft-1);
|
||||
UpdateStatusLine(StatusPtr, '');
|
||||
UpdateStatusLine(Session.StatusPtr, '');
|
||||
End;
|
||||
{-} #131: If Session.TimeLeft < 999 Then Begin
|
||||
Session.SetTimeLeft(Session.TimeLeft+1);
|
||||
UpdateStatusLine(StatusPtr, '');
|
||||
UpdateStatusLine(Session.StatusPtr, '');
|
||||
End;
|
||||
End;
|
||||
End;
|
||||
|
|
|
@ -82,6 +82,14 @@ Type
|
|||
LastScanHadNew : Boolean;
|
||||
LastScanHadYou : Boolean;
|
||||
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;
|
||||
Destructor Destroy; Override;
|
||||
|
@ -141,6 +149,7 @@ Begin
|
|||
AllowMessages := True;
|
||||
InMessage := False;
|
||||
MessageCheck := mysMessageThreshold;
|
||||
StatusPtr := 1;
|
||||
|
||||
{$IFNDEF UNIX}
|
||||
Client := TIOSocket.Create;
|
||||
|
|
|
@ -23,8 +23,8 @@ Var
|
|||
bbsCfg : RecConfig;
|
||||
bbsCfgPath : String;
|
||||
bbsCfgStatus : Byte;
|
||||
Console : TOutput = NIL;
|
||||
Keyboard : TInput = NIL;
|
||||
Console : TOutput;
|
||||
Keyboard : TInput;
|
||||
|
||||
Const
|
||||
CfgOK = 0;
|
||||
|
@ -40,6 +40,7 @@ Function GetBaseConfiguration (UseEnv: Boolean; Var TempCfg: RecConfig) : Byte
|
|||
Function PutBaseConfiguration (Var TempCfg: RecConfig) : Boolean;
|
||||
Function ExecuteProgram (ExecPath: String; Command: String) : LongInt;
|
||||
Function Addr2Str (Addr : RecEchoMailAddr) : String;
|
||||
Function Str2Addr (S : String; Var Addr: RecEchoMailAddr) : Boolean;
|
||||
|
||||
// MESSAGE BASE
|
||||
|
||||
|
@ -86,6 +87,37 @@ Begin
|
|||
Result := Temp;
|
||||
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;
|
||||
Var
|
||||
Loc : Byte;
|
||||
|
@ -414,6 +446,7 @@ Begin
|
|||
Msg^.SetPriv (TempBase.Flags and MBPrivate <> 0);
|
||||
Msg^.SetDate (DateDos2Str(CurDateDos, 1));
|
||||
Msg^.SetTime (TimeDos2Str(CurDateDos, 0));
|
||||
Msg^.SetSent (False);
|
||||
End;
|
||||
|
||||
Function GetTotalFiles (Var TempBase: RecFileBase) : LongInt;
|
||||
|
@ -597,5 +630,7 @@ End;
|
|||
Initialization
|
||||
|
||||
bbsCfgStatus := GetBaseConfiguration(True, bbsCfg);
|
||||
Console := NIL;
|
||||
Keyboard := NIL;
|
||||
|
||||
End.
|
||||
|
|
|
@ -233,7 +233,7 @@ Begin
|
|||
|
||||
WRITE_DOOR32(PassHandle);
|
||||
|
||||
Screen.GetScreenImage(1,1,80,25, Image);
|
||||
Console.GetScreenImage(1,1,80,25, Image);
|
||||
|
||||
Cmd := Cmd + #0;
|
||||
|
||||
|
@ -264,10 +264,10 @@ Begin
|
|||
Close (Session.User.UserFile);
|
||||
End;
|
||||
|
||||
Screen.SetWindowTitle(WinConsoleTitle + strI2S(Session.NodeNum));
|
||||
Screen.PutScreenImage(Image);
|
||||
Console.SetWindowTitle(WinConsoleTitle + strI2S(Session.NodeNum));
|
||||
Console.PutScreenImage(Image);
|
||||
|
||||
UpdateStatusLine(StatusPtr, '');
|
||||
UpdateStatusLine(Session.StatusPtr, '');
|
||||
|
||||
Session.TimeOut := TimerSeconds;
|
||||
End;
|
||||
|
|
|
@ -12,7 +12,7 @@ Const
|
|||
fseMaxCutText = 60;
|
||||
|
||||
GlyphTypeMax = 10;
|
||||
GlyphTypeStr : Array[1..10] of String[10] = (
|
||||
GlyphTypeStr : Array[1..10] of String[10] = (
|
||||
('纶坷倌趁戳'),
|
||||
('松蝗纪禾故'),
|
||||
('颜冈就称迪'),
|
||||
|
|
|
@ -211,17 +211,17 @@ Procedure ProtocolStatus (Start, Finish: Boolean; Status: RecProtocolStatus);
|
|||
Var
|
||||
KBRate : LongInt;
|
||||
Begin
|
||||
Screen.WriteXY (19, 10, 113, strPadR(Status.FileName, 56, ' '));
|
||||
Screen.WriteXY (19, 11, 113, strPadR(strComma(Status.FileSize), 15, ' '));
|
||||
Screen.WriteXY (19, 12, 113, strPadR(strComma(Status.Position), 15, ' '));
|
||||
Screen.WriteXY (64, 11, 113, strPadR(strI2S(Status.Errors), 3, ' '));
|
||||
Console.WriteXY (19, 10, 113, strPadR(Status.FileName, 56, ' '));
|
||||
Console.WriteXY (19, 11, 113, strPadR(strComma(Status.FileSize), 15, ' '));
|
||||
Console.WriteXY (19, 12, 113, strPadR(strComma(Status.Position), 15, ' '));
|
||||
Console.WriteXY (64, 11, 113, strPadR(strI2S(Status.Errors), 3, ' '));
|
||||
|
||||
KBRate := 0;
|
||||
|
||||
If (TimerSeconds - Status.StartTime > 0) and (Status.Position > 0) Then
|
||||
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;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
@ -232,17 +232,17 @@ Procedure XferStatus (P: AbstractProtocolPtr; First, Last: Boolean);
|
|||
Var
|
||||
KBRate : LongInt;
|
||||
Begin
|
||||
Screen.WriteXY (19, 10, 113, strPadR(P^.PathName, 56, ' '));
|
||||
Screen.WriteXY (19, 11, 113, strPadR(strComma(P^.SrcFileLen), 15, ' '));
|
||||
Screen.WriteXY (19, 12, 113, strPadR(strComma(P^.BytesTransferred), 15, ' '));
|
||||
Screen.WriteXY (64, 11, 113, strPadR(strI2S(P^.TotalErrors), 3, ' '));
|
||||
Console.WriteXY (19, 10, 113, strPadR(P^.PathName, 56, ' '));
|
||||
Console.WriteXY (19, 11, 113, strPadR(strComma(P^.SrcFileLen), 15, ' '));
|
||||
Console.WriteXY (19, 12, 113, strPadR(strComma(P^.BytesTransferred), 15, ' '));
|
||||
Console.WriteXY (64, 11, 113, strPadR(strI2S(P^.TotalErrors), 3, ' '));
|
||||
|
||||
KBRate := 0;
|
||||
|
||||
If (TimerSeconds - P^.StartTimer > 0) and (P^.BytesTransferred > 0) Then
|
||||
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;
|
||||
{$ENDIF}
|
||||
Procedure XferResult (P: AbstractProtocolPTR; Status: LogFileType);
|
||||
|
@ -354,7 +354,7 @@ Var
|
|||
Protocol^.SetShowStatusProc(@XferStatus);
|
||||
|
||||
SavedL := Session.LocalMode;
|
||||
SavedA := Screen.Active;
|
||||
SavedA := Console.Active;
|
||||
Session.LocalMode := True;
|
||||
|
||||
Session.io.LocalScreenEnable;
|
||||
|
@ -368,11 +368,11 @@ Var
|
|||
|
||||
Box.Open (6, 8, 76, 14);
|
||||
|
||||
Screen.WriteXY ( 8, 10, 112, 'File Name:');
|
||||
Screen.WriteXY (13, 11, 112, 'Size:');
|
||||
Screen.WriteXY ( 9, 12, 112, 'Position:');
|
||||
Screen.WriteXY (56, 11, 112, 'Errors:');
|
||||
Screen.WriteXY (58, 12, 112, 'Rate:');
|
||||
Console.WriteXY ( 8, 10, 112, 'File Name:');
|
||||
Console.WriteXY (13, 11, 112, 'Size:');
|
||||
Console.WriteXY ( 9, 12, 112, 'Position:');
|
||||
Console.WriteXY (56, 11, 112, 'Errors:');
|
||||
Console.WriteXY (58, 12, 112, 'Rate:');
|
||||
{$ENDIF}
|
||||
|
||||
Case Mode of
|
||||
|
@ -452,7 +452,7 @@ Var
|
|||
|
||||
{$IFNDEF UNIX}
|
||||
SavedL := Session.LocalMode;
|
||||
SavedA := Screen.Active;
|
||||
SavedA := Console.Active;
|
||||
Session.LocalMode := True;
|
||||
Protocol.StatusProc := ProtocolStatus;
|
||||
|
||||
|
@ -467,11 +467,11 @@ Var
|
|||
|
||||
Box.Open (6, 8, 76, 14);
|
||||
|
||||
Screen.WriteXY ( 8, 10, 112, 'File Name:');
|
||||
Screen.WriteXY (13, 11, 112, 'Size:');
|
||||
Screen.WriteXY ( 9, 12, 112, 'Position:');
|
||||
Screen.WriteXY (56, 11, 112, 'Errors:');
|
||||
Screen.WriteXY (58, 12, 112, 'Rate:');
|
||||
Console.WriteXY ( 8, 10, 112, 'File Name:');
|
||||
Console.WriteXY (13, 11, 112, 'Size:');
|
||||
Console.WriteXY ( 9, 12, 112, 'Position:');
|
||||
Console.WriteXY (56, 11, 112, 'Errors:');
|
||||
Console.WriteXY (58, 12, 112, 'Rate:');
|
||||
{$ENDIF}
|
||||
|
||||
Case Mode of
|
||||
|
@ -940,7 +940,7 @@ Begin
|
|||
Session.io.PromptInfo[1] := FBase.Name;
|
||||
Session.io.PromptInfo[3] := strI2S(AreaFiles);
|
||||
|
||||
Session.io.OutBS (Screen.CursorX, False);
|
||||
Session.io.OutBS (Console.CursorX, False);
|
||||
Session.io.OutFullLn (Session.GetPrompt(223));
|
||||
End;
|
||||
|
||||
|
@ -2129,9 +2129,9 @@ Var
|
|||
Attr : Byte;
|
||||
Begin
|
||||
If Bool_Search(Data, Temp) Then Begin
|
||||
Attr := Screen.TextAttr;
|
||||
Attr := Console.TextAttr;
|
||||
|
||||
Screen.TextAttr := 255;
|
||||
Console.TextAttr := 255;
|
||||
|
||||
Insert (
|
||||
Session.io.Attr2Ansi(Session.Theme.FileDescLo),
|
||||
|
@ -2139,14 +2139,14 @@ Var
|
|||
Pos(Data, strUpper(Temp)) + Length(Data)
|
||||
);
|
||||
|
||||
Screen.TextAttr := 255;
|
||||
Console.TextAttr := 255;
|
||||
|
||||
Insert (
|
||||
Session.io.Attr2Ansi(Session.Theme.FileDescHi),
|
||||
Temp,
|
||||
Pos(Data, strUpper(Temp)));
|
||||
|
||||
Screen.TextAttr := Attr;
|
||||
Console.TextAttr := Attr;
|
||||
End;
|
||||
End;
|
||||
|
||||
|
@ -2396,7 +2396,7 @@ Var
|
|||
Inc (ListSize);
|
||||
|
||||
List[ListSize].FileName := FDir.FileName;
|
||||
List[ListSize].YPos := Screen.CursorY - 1;
|
||||
List[ListSize].YPos := Console.CursorY - 1;
|
||||
List[ListSize].RecPos := FilePos(FDirFile) - 1;
|
||||
End Else
|
||||
HeaderCheck;
|
||||
|
@ -3514,7 +3514,7 @@ Var
|
|||
Begin
|
||||
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.BufFlush;
|
||||
|
@ -3597,7 +3597,7 @@ Var
|
|||
Begin
|
||||
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.BufFlush;
|
||||
|
||||
|
|
|
@ -498,28 +498,28 @@ Procedure ShowLastCallers;
|
|||
Begin
|
||||
Session.io.OutFullLn (Session.GetPrompt(141));
|
||||
|
||||
Reset (LastOnFile);
|
||||
Reset (Session.LastOnFile);
|
||||
|
||||
While Not Eof(LastOnFile) Do Begin
|
||||
Read (LastOnFile, LastOn);
|
||||
While Not Eof(Session.LastOnFile) Do Begin
|
||||
Read (Session.LastOnFile, Session.LastOn);
|
||||
|
||||
Session.io.PromptInfo[1] := LastOn.Handle;
|
||||
Session.io.PromptInfo[2] := strI2S(LastOn.Node);
|
||||
Session.io.PromptInfo[3] := LastOn.City;
|
||||
Session.io.PromptInfo[4] := DateDos2Str(LastOn.DateTime, Session.User.ThisUser.DateType);
|
||||
Session.io.PromptInfo[5] := TimeDos2Str(LastOn.DateTime, 1);
|
||||
Session.io.PromptInfo[7] := strI2S(LastOn.CallNum);
|
||||
Session.io.PromptInfo[8] := LastOn.Address;
|
||||
Session.io.PromptInfo[9] := LastOn.UserInfo;
|
||||
Session.io.PromptInfo[10] := LastOn.EmailAddr;
|
||||
Session.io.PromptInfo[11] := LastOn.OptionData[1];
|
||||
Session.io.PromptInfo[12] := LastOn.OptionData[2];
|
||||
Session.io.PromptInfo[13] := LastOn.OptionData[3];
|
||||
Session.io.PromptInfo[1] := Session.LastOn.Handle;
|
||||
Session.io.PromptInfo[2] := strI2S(Session.LastOn.Node);
|
||||
Session.io.PromptInfo[3] := Session.LastOn.City;
|
||||
Session.io.PromptInfo[4] := DateDos2Str(Session.LastOn.DateTime, Session.User.ThisUser.DateType);
|
||||
Session.io.PromptInfo[5] := TimeDos2Str(Session.LastOn.DateTime, 1);
|
||||
Session.io.PromptInfo[7] := strI2S(Session.LastOn.CallNum);
|
||||
Session.io.PromptInfo[8] := Session.LastOn.Address;
|
||||
Session.io.PromptInfo[9] := Session.LastOn.UserInfo;
|
||||
Session.io.PromptInfo[10] := Session.LastOn.EmailAddr;
|
||||
Session.io.PromptInfo[11] := Session.LastOn.OptionData[1];
|
||||
Session.io.PromptInfo[12] := Session.LastOn.OptionData[2];
|
||||
Session.io.PromptInfo[13] := Session.LastOn.OptionData[3];
|
||||
|
||||
Session.io.OutFullLn (Session.GetPrompt(142));
|
||||
End;
|
||||
|
||||
Close (LastOnFile);
|
||||
Close (Session.LastOnFile);
|
||||
|
||||
Session.io.OutFull (Session.GetPrompt(143));
|
||||
End;
|
||||
|
@ -1524,9 +1524,9 @@ Begin
|
|||
|
||||
MessageBeep(0);
|
||||
|
||||
If Input.KeyPressed Then
|
||||
If Input.ReadKey = #0 Then Begin
|
||||
Case Input.ReadKey of
|
||||
If Keyboard.KeyPressed Then
|
||||
If Keyboard.ReadKey = #0 Then Begin
|
||||
Case Keyboard.ReadKey of
|
||||
#31 : OpenChat(True);
|
||||
#46 : OpenChat(False);
|
||||
End;
|
||||
|
@ -1538,7 +1538,7 @@ Begin
|
|||
End;
|
||||
End;
|
||||
|
||||
UpdateStatusLine (StatusPtr, '');
|
||||
UpdateStatusLine (Session.StatusPtr, '');
|
||||
|
||||
Session.io.OutFull (Session.GetPrompt(28));
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ Begin
|
|||
SocketEvent := WSACreateEvent;
|
||||
{$ENDIF}
|
||||
|
||||
Term := TTermAnsi.Create(Screen);
|
||||
Term := TTermAnsi.Create(Console);
|
||||
End;
|
||||
|
||||
Destructor TBBSIO.Destroy;
|
||||
|
@ -328,7 +328,7 @@ Begin
|
|||
|
||||
OutBufPos := 0;
|
||||
|
||||
Screen.BufFlush;
|
||||
Console.BufFlush;
|
||||
{$ENDIF}
|
||||
End;
|
||||
|
||||
|
@ -338,7 +338,7 @@ Var
|
|||
Begin
|
||||
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(T-Y) + 'A');
|
||||
|
@ -350,7 +350,7 @@ Var
|
|||
Begin
|
||||
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(T-X) + 'D');
|
||||
|
@ -361,7 +361,7 @@ Var
|
|||
Attr : Byte;
|
||||
Ch : Char;
|
||||
Begin
|
||||
Attr := Screen.TextAttr;
|
||||
Attr := Console.TextAttr;
|
||||
|
||||
OutFull (TBBSCore(Core).GetPrompt(22));
|
||||
|
||||
|
@ -384,13 +384,13 @@ Var
|
|||
Begin
|
||||
SavedMCI := AllowMCI;
|
||||
AllowMCI := True;
|
||||
SavedAttr := Screen.TextAttr;
|
||||
SavedAttr := Console.TextAttr;
|
||||
|
||||
OutFull (TBBSCore(Core).GetPrompt(132));
|
||||
|
||||
Ch := OneKey('YNC' + #13, False);
|
||||
|
||||
OutBS (Screen.CursorX, True);
|
||||
OutBS (Console.CursorX, True);
|
||||
AnsiColor (SavedAttr);
|
||||
|
||||
PausePtr := 1;
|
||||
|
@ -522,9 +522,9 @@ Begin
|
|||
'!' : If Code[2] in ['0'..'9'] Then Begin
|
||||
A := strS2I(Code[2]);
|
||||
|
||||
ScreenInfo[A].X := Screen.CursorX;
|
||||
ScreenInfo[A].Y := Screen.CursorY;
|
||||
ScreenInfo[A].A := Screen.TextAttr;
|
||||
ScreenInfo[A].X := Console.CursorX;
|
||||
ScreenInfo[A].Y := Console.CursorY;
|
||||
ScreenInfo[A].A := Console.TextAttr;
|
||||
End Else Begin
|
||||
Result := False;
|
||||
|
||||
|
@ -885,19 +885,19 @@ Begin
|
|||
FmtString := False;
|
||||
End;
|
||||
8 : Begin
|
||||
AnsiMoveY (Screen.CursorY - FmtLen);
|
||||
AnsiMoveY (Console.CursorY - FmtLen);
|
||||
FmtString := False;
|
||||
End;
|
||||
9 : Begin
|
||||
AnsiMoveY (Screen.CursorY + FmtLen);
|
||||
AnsiMoveY (Console.CursorY + FmtLen);
|
||||
FmtString := False;
|
||||
End;
|
||||
10: Begin
|
||||
AnsiMoveX (Screen.CursorX + FmtLen);
|
||||
AnsiMoveX (Console.CursorX + FmtLen);
|
||||
FmtString := False;
|
||||
End;
|
||||
11: Begin
|
||||
AnsiMoveX (Screen.CursorX - FmtLen);
|
||||
AnsiMoveX (Console.CursorX - FmtLen);
|
||||
FmtString := False;
|
||||
End;
|
||||
12: Begin
|
||||
|
@ -915,7 +915,7 @@ Begin
|
|||
FmtString := False;
|
||||
End;
|
||||
15: Begin
|
||||
While Screen.CursorX > FmtLen Do
|
||||
While Console.CursorX > FmtLen Do
|
||||
OutBS(1, True);
|
||||
|
||||
FmtString := False;
|
||||
|
@ -924,8 +924,8 @@ Begin
|
|||
Inc (A);
|
||||
FmtString := False;
|
||||
|
||||
If Screen.CursorX < FmtLen Then
|
||||
BufAddStr (strRep(Str[A], FmtLen - Screen.CursorX + 1));
|
||||
If Console.CursorX < FmtLen Then
|
||||
BufAddStr (strRep(Str[A], FmtLen - Console.CursorX + 1));
|
||||
End;
|
||||
End;
|
||||
End;
|
||||
|
@ -974,7 +974,7 @@ Begin
|
|||
End;
|
||||
|
||||
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
|
||||
16: Result := Result + #27 + '[40m';
|
||||
|
@ -999,14 +999,14 @@ Begin
|
|||
|
||||
If Graphics = 0 Then Exit;
|
||||
|
||||
CurBG := (Screen.TextAttr SHR 4) AND 7;
|
||||
CurFG := Screen.TextAttr AND $F;
|
||||
CurBG := (Console.TextAttr SHR 4) AND 7;
|
||||
CurFG := Console.TextAttr AND $F;
|
||||
Prefix := '';
|
||||
|
||||
If Color < 16 Then Begin
|
||||
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 > 7) and (CurFG < 8) Then Prefix := '1;';
|
||||
|
@ -1040,7 +1040,7 @@ Begin
|
|||
End Else Begin
|
||||
If (Color - 16) = CurBG Then Exit;
|
||||
|
||||
// Screen.TextAttr := CurFG + (Color - 16) * 16;
|
||||
// Console.TextAttr := CurFG + (Color - 16) * 16;
|
||||
|
||||
Case Color of
|
||||
16: Result := #27 + '[40m';
|
||||
|
@ -1086,12 +1086,12 @@ Var
|
|||
Begin
|
||||
Result := '';
|
||||
|
||||
If (Attr = Screen.TextAttr) or (Graphics = 0) Then Exit;
|
||||
If (Attr = Console.TextAttr) or (Graphics = 0) Then Exit;
|
||||
|
||||
FG := Attr and $F;
|
||||
BG := Attr shr 4;
|
||||
OldFG := Screen.TextAttr and $F;
|
||||
OldBG := Screen.TextAttr shr 4;
|
||||
OldFG := Console.TextAttr and $F;
|
||||
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
|
||||
Result := '0';
|
||||
|
@ -1137,10 +1137,10 @@ Procedure TBBSIO.AnsiGotoXY (X: Byte; Y: Byte);
|
|||
Begin
|
||||
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 Y = 0 Then Y := Screen.CursorY;
|
||||
If X = 0 Then X := Console.CursorX;
|
||||
If Y = 0 Then Y := Console.CursorY;
|
||||
|
||||
BufAddStr (#27'[' + strI2S(Y) + ';' + strI2S(X) + 'H');
|
||||
End;
|
||||
|
@ -1347,19 +1347,19 @@ Begin
|
|||
FmtString := False;
|
||||
End;
|
||||
8 : Begin
|
||||
AnsiMoveY (Screen.CursorY - FmtLen);
|
||||
AnsiMoveY (Console.CursorY - FmtLen);
|
||||
FmtString := False;
|
||||
End;
|
||||
9 : Begin
|
||||
AnsiMoveY (Screen.CursorY + FmtLen);
|
||||
AnsiMoveY (Console.CursorY + FmtLen);
|
||||
FmtString := False;
|
||||
End;
|
||||
10: Begin
|
||||
AnsiMoveX (Screen.CursorX + FmtLen);
|
||||
AnsiMoveX (Console.CursorX + FmtLen);
|
||||
FmtString := False;
|
||||
End;
|
||||
11: Begin
|
||||
AnsiMoveX (Screen.CursorX - FmtLen);
|
||||
AnsiMoveX (Console.CursorX - FmtLen);
|
||||
FmtString := False;
|
||||
End;
|
||||
12: Begin
|
||||
|
@ -1377,7 +1377,7 @@ Begin
|
|||
FmtString := False;
|
||||
End;
|
||||
15: Begin
|
||||
While Screen.CursorX > FmtLen Do
|
||||
While Console.CursorX > FmtLen Do
|
||||
OutBS(1, True);
|
||||
|
||||
FmtString := False;
|
||||
|
@ -1389,8 +1389,8 @@ Begin
|
|||
17: Begin
|
||||
FmtString := False;
|
||||
|
||||
If Screen.CursorX < FmtLen Then
|
||||
BufAddStr (strRep(GetChar, FmtLen - Screen.CursorX + 1));
|
||||
If Console.CursorX < FmtLen Then
|
||||
BufAddStr (strRep(GetChar, FmtLen - Console.CursorX + 1));
|
||||
End;
|
||||
End;
|
||||
End;
|
||||
|
@ -1440,7 +1440,7 @@ Var
|
|||
Begin
|
||||
Result := #255;
|
||||
|
||||
Handles[0] := Input.ConIn;
|
||||
Handles[0] := Keyboard.ConIn;
|
||||
|
||||
If Not TBBSCore(Core).LocalMode Then Begin
|
||||
If TBBSCore(Core).Client.FInBufPos < TBBSCore(Core).Client.FInBufEnd Then
|
||||
|
@ -1467,16 +1467,16 @@ Begin
|
|||
|
||||
Case InType of
|
||||
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;
|
||||
IsArrow := False;
|
||||
|
||||
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;
|
||||
Exit;
|
||||
End;
|
||||
|
@ -1486,7 +1486,7 @@ Begin
|
|||
Result := #255;
|
||||
End;
|
||||
|
||||
If Not Screen.Active Then Result := #255;
|
||||
If Not Console.Active Then Result := #255;
|
||||
End;
|
||||
2 : Begin // SOCKET read event
|
||||
If TBBSCore(Core).Client.ReadBuf(Result, 1) < 0 Then Begin
|
||||
|
@ -1574,7 +1574,7 @@ Begin
|
|||
Session.LastTimeLeft := TimeCount;
|
||||
|
||||
{$IFNDEF UNIX}
|
||||
UpdateStatusLine(StatusPtr, '');
|
||||
UpdateStatusLine(Session.StatusPtr, '');
|
||||
{$ENDIF}
|
||||
|
||||
If TBBSCore(Core).TimerOn Then Begin
|
||||
|
@ -1644,7 +1644,7 @@ Begin
|
|||
|
||||
Temp := AllowArrow;
|
||||
AllowArrow := True;
|
||||
X := Screen.CursorX;
|
||||
X := Console.CursorX;
|
||||
|
||||
Repeat
|
||||
AnsiMoveX (X);
|
||||
|
@ -1765,7 +1765,7 @@ Begin
|
|||
RangeValue := -1;
|
||||
HiStr := strI2S(Hi);
|
||||
Field := Length(strI2S(Hi));
|
||||
xPos := Screen.CursorX;
|
||||
xPos := Console.CursorX;
|
||||
|
||||
If UseInField and (Graphics = 1) Then Begin
|
||||
AnsiColor (TBBSCore(Core).Theme.FieldColor2);
|
||||
|
@ -1934,7 +1934,7 @@ Begin
|
|||
If InSize <= Max Then Max := InSize;
|
||||
End;
|
||||
|
||||
xPos := Screen.CursorX;
|
||||
xPos := Console.CursorX;
|
||||
FieldCh := ' ';
|
||||
|
||||
// this is poorly implemented but to expand on it will require MPL
|
||||
|
@ -2014,7 +2014,7 @@ Begin
|
|||
|
||||
If CurPos < 1 then CurPos := 1;
|
||||
|
||||
AnsiMoveX (Screen.CursorX - 1);
|
||||
AnsiMoveX (Console.CursorX - 1);
|
||||
End;
|
||||
#77 : If StrPos < Length(Str) + 1 Then Begin
|
||||
If (CurPos = Field) and (StrPos < Length(Str)) Then
|
||||
|
@ -2023,7 +2023,7 @@ Begin
|
|||
Inc (CurPos);
|
||||
Inc (StrPos);
|
||||
|
||||
AnsiMoveX (Screen.CursorX + 1);
|
||||
AnsiMoveX (Console.CursorX + 1);
|
||||
End;
|
||||
#79 : Begin
|
||||
StrPos := Length(Str) + 1;
|
||||
|
@ -2188,9 +2188,9 @@ Var
|
|||
FillSize : Byte;
|
||||
Attr : Byte;
|
||||
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;
|
||||
|
||||
|
@ -2298,23 +2298,23 @@ Begin
|
|||
{$ENDIF}
|
||||
{$IFDEF WINDOWS}
|
||||
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}
|
||||
End;
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
Procedure TBBSIO.LocalScreenDisable;
|
||||
Begin
|
||||
Screen.ClearScreenNoUpdate;
|
||||
Screen.WriteXYNoUpdate(1, 1, 7, 'Screen disabled. Press ALT-V to view user');
|
||||
Screen.Active := False;
|
||||
Console.ClearScreenNoUpdate;
|
||||
Console.WriteXYNoUpdate(1, 1, 7, 'Screen disabled. Press ALT-V to view user');
|
||||
Console.Active := False;
|
||||
End;
|
||||
|
||||
Procedure TBBSIO.LocalScreenEnable;
|
||||
Begin
|
||||
Screen.Active := True;
|
||||
Screen.ShowBuffer;
|
||||
UpdateStatusLine(StatusPtr, '');
|
||||
Console.Active := True;
|
||||
Console.ShowBuffer;
|
||||
UpdateStatusLine(Session.StatusPtr, '');
|
||||
End;
|
||||
{$ENDIF}
|
||||
|
||||
|
|
|
@ -492,7 +492,7 @@ Begin
|
|||
Else
|
||||
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(' ');
|
||||
|
||||
If Listed MOD Cols = 0 Then
|
||||
|
@ -761,20 +761,20 @@ Var
|
|||
|
||||
Session.io.OutFull(Data.Item[CurItem]^.TextLo);
|
||||
|
||||
If Screen.CursorX > MaxDESize Then
|
||||
MaxDESize := Screen.CursorX;
|
||||
If Console.CursorX > MaxDESize Then
|
||||
MaxDESize := Console.CursorX;
|
||||
|
||||
While Screen.CursorX < MaxDESize Do
|
||||
While Console.CursorX < MaxDESize Do
|
||||
Session.io.OutRaw(' ');
|
||||
End;
|
||||
|
||||
Session.io.AnsiGotoXY (ItemX, ItemY);
|
||||
Session.io.OutFull (Data.Item[CurItem]^.TextHi);
|
||||
|
||||
If Screen.CursorX > MaxLBSize Then
|
||||
MaxLBSize := Screen.CursorX;
|
||||
If Console.CursorX > MaxLBSize Then
|
||||
MaxLBSize := Console.CursorX;
|
||||
|
||||
While Screen.CursorX < MaxLBSize Do
|
||||
While Console.CursorX < MaxLBSize Do
|
||||
Session.io.OutRaw(' ');
|
||||
End;
|
||||
|
||||
|
@ -788,8 +788,8 @@ Begin
|
|||
|
||||
If ReDraw Then GenerateMenu(-1, False);
|
||||
|
||||
ItemX := Screen.CursorX;
|
||||
ItemY := Screen.CursorY;
|
||||
ItemX := Console.CursorX;
|
||||
ItemY := Console.CursorY;
|
||||
|
||||
TBBSCore(Owner).io.AllowArrow := True;
|
||||
|
||||
|
@ -958,7 +958,7 @@ Var
|
|||
Exit;
|
||||
End;
|
||||
|
||||
SavedAttr := Screen.TextAttr; // tbbscore
|
||||
SavedAttr := Console.TextAttr; // tbbscore
|
||||
|
||||
If Ch = #08 Then
|
||||
Offset := Length(TempStr) + 1
|
||||
|
@ -1041,9 +1041,9 @@ Begin
|
|||
|
||||
TBBSCore(Owner).io.BufFlush;
|
||||
|
||||
PromptX := Screen.CursorX; //tbbscore
|
||||
PromptY := Screen.CursorY; //tbbscore
|
||||
PromptA := Screen.TextAttr; //tbbscore
|
||||
PromptX := Console.CursorX; //tbbscore
|
||||
PromptY := Console.CursorY; //tbbscore
|
||||
PromptA := Console.TextAttr; //tbbscore
|
||||
End;
|
||||
|
||||
For Count := 1 to Data.NumItems Do
|
||||
|
|
|
@ -156,7 +156,7 @@ Function TMsgBase.NetmailLookup (FromMenu: Boolean; MsgTo, DefAddr: String) : St
|
|||
Str : String;
|
||||
Begin
|
||||
Case ShowType of
|
||||
0 : Str := strAddr2Str(NodeData.Address);
|
||||
0 : Str := Addr2Str(NodeData.Address);
|
||||
1,
|
||||
2 : If NodeData.Keyword = 'ZONE' Then
|
||||
Str := 'ZONE' + strPadL(strI2S(NodeData.Address.Zone), 8, ' ')
|
||||
|
@ -271,18 +271,18 @@ Begin
|
|||
Session.io.PromptInfo[7] := MsgTo;
|
||||
|
||||
If Session.io.GetYN(Session.GetPrompt(502), True) Then Begin
|
||||
Result := strAddr2Str(NodeData.Address);
|
||||
Result := Addr2Str(NodeData.Address);
|
||||
|
||||
Break;
|
||||
End;
|
||||
End Else
|
||||
If (Listed = 0) And Not FromMenu And Not bbsCfg.ForceNodelist Then Begin
|
||||
If strStr2Addr(Result, Addr) Then Begin
|
||||
Session.io.PromptInfo[1] := strAddr2Str(Addr);
|
||||
If Str2Addr(Result, Addr) Then Begin
|
||||
Session.io.PromptInfo[1] := Addr2Str(Addr);
|
||||
Session.io.PromptInfo[7] := MsgTo;
|
||||
|
||||
If Session.io.GetYN(Session.GetPrompt(502), True) Then Begin
|
||||
Result := strAddr2Str(Addr);
|
||||
Result := Addr2Str(Addr);
|
||||
|
||||
Break;
|
||||
End;
|
||||
|
@ -496,7 +496,7 @@ Begin
|
|||
End;
|
||||
|
||||
If ShowPrompt Then
|
||||
Session.io.OutBS(Screen.CursorX, True);
|
||||
Session.io.OutBS(Console.CursorX, True);
|
||||
|
||||
Inc (ListPtr);
|
||||
|
||||
|
@ -635,7 +635,7 @@ Var
|
|||
A : SmallInt;
|
||||
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
|
||||
Msg^.DoStringLn (#1 + 'REPLY: ' + ReplyID);
|
||||
|
@ -667,7 +667,7 @@ Begin
|
|||
S := ' * Origin: ' + ResolveOrigin(MBase);
|
||||
|
||||
If MBase.QwkNetID = 0 Then
|
||||
S := S + ' (' + strAddr2Str(Msg^.GetOrigAddr) + ')';
|
||||
S := S + ' (' + Addr2Str(Msg^.GetOrigAddr) + ')';
|
||||
|
||||
Msg^.DoStringLn (S);
|
||||
End;
|
||||
|
@ -1350,9 +1350,9 @@ Begin
|
|||
If ReplyBase.NetType = 3 Then Begin
|
||||
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;
|
||||
|
||||
Subj := MsgBase^.GetSubj;
|
||||
|
@ -1512,7 +1512,7 @@ Begin
|
|||
If MBase.NetType = 3 Then Begin
|
||||
MsgBase^.GetDest(DestAddr);
|
||||
|
||||
Session.io.PromptInfo[1] := Session.io.PromptInfo[1] + ' (' + strAddr2Str(DestAddr) + ')';
|
||||
Session.io.PromptInfo[1] := Session.io.PromptInfo[1] + ' (' + Addr2Str(DestAddr) + ')';
|
||||
End;
|
||||
|
||||
Session.io.OutFull (Session.GetPrompt(296));
|
||||
|
@ -1526,7 +1526,7 @@ Begin
|
|||
|
||||
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^.SetDest(DestAddr)
|
||||
End;
|
||||
|
@ -1869,7 +1869,7 @@ Var
|
|||
End;
|
||||
|
||||
If (ScanMode = 3) And First Then
|
||||
Session.io.OutBS (Screen.CursorX, True);
|
||||
Session.io.OutBS (Console.CursorX, True);
|
||||
|
||||
If Not WereMsgs Then WereMsgs := Res;
|
||||
|
||||
|
@ -1887,14 +1887,14 @@ Var
|
|||
If MBase.NetType = 3 Then Begin
|
||||
MsgBase^.GetOrig(NetAddr);
|
||||
|
||||
Session.io.PromptInfo[1] := Session.io.PromptInfo[1] + ' (' + strAddr2Str(NetAddr) + ')';
|
||||
Session.io.PromptInfo[1] := Session.io.PromptInfo[1] + ' (' + Addr2Str(NetAddr) + ')';
|
||||
End;
|
||||
|
||||
Session.io.PromptInfo[2] := MsgBase^.GetTo;
|
||||
|
||||
If MBase.NetType = 3 Then Begin
|
||||
MsgBase^.GetDest(NetAddr);
|
||||
Session.io.PromptInfo[2] := Session.io.PromptInfo[2] + ' (' + strAddr2Str(NetAddr) + ')';
|
||||
Session.io.PromptInfo[2] := Session.io.PromptInfo[2] + ' (' + Addr2Str(NetAddr) + ')';
|
||||
End;
|
||||
|
||||
Session.io.PromptInfo[3] := MsgBase^.GetSubj;
|
||||
|
@ -3087,7 +3087,7 @@ Begin
|
|||
If Pos('/ADDR:', strUpper(TempStr)) > 0 Then Begin
|
||||
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;
|
||||
|
||||
|
@ -3105,7 +3105,7 @@ Begin
|
|||
If MsgAddr = '' Then Begin
|
||||
MsgAddr := NetmailLookup(False, MsgTo, '');
|
||||
|
||||
If Not strStr2Addr(MsgAddr, DestAddr) Then MsgTo := '';
|
||||
If Not Str2Addr(MsgAddr, DestAddr) Then MsgTo := '';
|
||||
End;
|
||||
End Else
|
||||
If IsPrivate Then Begin
|
||||
|
@ -3422,7 +3422,7 @@ Begin
|
|||
GetMessageScan;
|
||||
|
||||
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.BufFlush;
|
||||
|
||||
|
@ -3769,7 +3769,7 @@ Var
|
|||
Session.io.PromptInfo[9] := strI2S(Global_YourMsgs);
|
||||
|
||||
If ShowScanPrompt Then
|
||||
Session.io.OutBS(Screen.CursorX, True);
|
||||
Session.io.OutBS(Console.CursorX, True);
|
||||
|
||||
If Not ShowMessage Then
|
||||
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
|
||||
Msg^.DoStringLn (#13 + '--- ' + mysSoftwareID + ' v' + mysVersion + ' (' + OSID + ')');
|
||||
Msg^.DoStringLn (' * Origin: ' + ResolveOrigin(mArea) + ' (' + strAddr2Str(Msg^.GetOrigAddr) + ')');
|
||||
Msg^.DoStringLn (' * Origin: ' + ResolveOrigin(mArea) + ' (' + Addr2Str(Msg^.GetOrigAddr) + ')');
|
||||
End;
|
||||
|
||||
Msg^.WriteMsg;
|
||||
|
@ -3948,7 +3948,7 @@ Begin
|
|||
|
||||
Str := strWordGet(6, Data, ';');
|
||||
If (Str = '') Then Str := '0:0/0';
|
||||
strStr2Addr (Str, mAddr);
|
||||
Str2Addr (Str, mAddr);
|
||||
|
||||
If FileExist(bbsCfg.DataPath + mName) Then
|
||||
mName := bbsCfg.DataPath + mName
|
||||
|
@ -4388,7 +4388,7 @@ Begin
|
|||
MsgBase^.CloseMsgBase;
|
||||
Dispose (MsgBase, Done);
|
||||
|
||||
Session.io.OutBS (Screen.CursorX, True);
|
||||
Session.io.OutBS (Console.CursorX, True);
|
||||
Session.io.OutFullLn (Session.GetPrompt(232));
|
||||
|
||||
Result := LastRead;
|
||||
|
@ -4677,7 +4677,7 @@ Begin
|
|||
Line := ' * Origin: ' + ResolveOrigin(MBase);
|
||||
|
||||
If MBase.QwkNetID = 0 Then
|
||||
Line := Line + ' (' + strAddr2Str(MsgBase^.GetOrigAddr) + ')';
|
||||
Line := Line + ' (' + Addr2Str(MsgBase^.GetOrigAddr) + ')';
|
||||
|
||||
MsgBase^.DoStringLn (Line);
|
||||
End;
|
||||
|
|
|
@ -12,7 +12,6 @@ Interface
|
|||
Uses
|
||||
m_Strings,
|
||||
BBS_Records,
|
||||
BBS_Common,
|
||||
BBS_MsgBase_ABS;
|
||||
|
||||
Const
|
||||
|
@ -256,7 +255,8 @@ Uses
|
|||
m_CRC,
|
||||
m_FileIO,
|
||||
m_DateTime,
|
||||
MKCRAP; // REMOVE THIS ASAP.
|
||||
BBS_DataBase,
|
||||
MKCRAP;
|
||||
|
||||
Type
|
||||
SubFieldPTR = ^SubFieldType;
|
||||
|
@ -701,10 +701,10 @@ Begin
|
|||
End;
|
||||
If ((JM^.Dest.Zone <> 0) or (JM^.Dest.Net <> 0) or
|
||||
(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
|
||||
(JM^.Orig.Node <> 0) or (JM^.Orig.Point <> 0)) Then
|
||||
AddSubField(0, strAddr2Str(JM^.Orig));
|
||||
AddSubField(0, Addr2Str(JM^.Orig));
|
||||
WriteError := IoResult;
|
||||
End;
|
||||
|
||||
|
@ -845,10 +845,10 @@ Begin
|
|||
End;
|
||||
If ((JM^.Dest.Zone <> 0) or (JM^.Dest.Net <> 0) or
|
||||
(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
|
||||
(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}
|
||||
WriteError := IoResult;
|
||||
End;
|
||||
|
@ -957,7 +957,7 @@ Procedure TMsgBaseJAM.MsgStartUp;
|
|||
TmpStr[0] := Chr(SubPtr^.DataLen and $ff);
|
||||
If Ord(TmpStr[0]) > 128 Then TmpStr[0] := #128;
|
||||
Move(SubPtr^.Data, TmpStr[1], Ord(TmpStr[0]));
|
||||
If strStr2Addr(TmpStr, JM^.Orig) Then;
|
||||
If Str2Addr(TmpStr, JM^.Orig) Then;
|
||||
End;
|
||||
1: Begin {Dest}
|
||||
FillChar(JM^.Dest, SizeOf(JM^.Dest), #0);
|
||||
|
@ -965,7 +965,7 @@ Procedure TMsgBaseJAM.MsgStartUp;
|
|||
If Ord(TmpStr[0]) > 128 Then
|
||||
TmpStr[0] := #128;
|
||||
Move(SubPtr^.Data, TmpStr[1], Ord(TmpStr[0]));
|
||||
If strStr2Addr(TmpStr, JM^.Dest) Then;
|
||||
If Str2Addr(TmpStr, JM^.Dest) Then;
|
||||
End;
|
||||
2: Begin {MsgFrom}
|
||||
JM^.MsgFrom[0] := Chr(SubPtr^.DataLen and $ff);
|
||||
|
|
|
@ -55,20 +55,20 @@ Var
|
|||
Begin
|
||||
If (R < 1) or (R > 99) Then Exit;
|
||||
|
||||
Reset (RoomFile);
|
||||
Seek (RoomFile, R-1);
|
||||
Read (RoomFile, Room);
|
||||
Close (RoomFile);
|
||||
Reset (Session.RoomFile);
|
||||
Seek (Session.RoomFile, R - 1);
|
||||
Read (Session.RoomFile, Session.Room);
|
||||
Close (Session.RoomFile);
|
||||
|
||||
Session.Chat.Room := R;
|
||||
CurRoom := R;
|
||||
Session.CurRoom := R;
|
||||
|
||||
Assign (CF, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
|
||||
Reset (CF);
|
||||
Write (CF, Session.Chat);
|
||||
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;
|
||||
|
||||
Procedure Update_Topic;
|
||||
|
@ -81,12 +81,12 @@ Begin
|
|||
Session.io.AnsiGotoXY (Session.io.ScreenInfo[4].X, Session.io.ScreenInfo[4].Y);
|
||||
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.AnsiColor (Session.io.ScreenInfo[5].A);
|
||||
|
||||
Session.io.OutRaw (strPadR(Room.Name, 40, ' '));
|
||||
Session.io.OutRaw (strPadR(Session.Room.Name, 40, ' '));
|
||||
End;
|
||||
|
||||
Function GetKeyNodeChatFunc (Forced: Boolean) : Boolean;
|
||||
|
@ -131,9 +131,9 @@ Begin
|
|||
|
||||
If ioReset(MsgFile, SizeOf(Msg), fmRWDN) Then Begin
|
||||
|
||||
OldAttr := Screen.TextAttr;
|
||||
OldX := Screen.CursorX;
|
||||
OldY := Screen.CursorY;
|
||||
OldAttr := Console.TextAttr;
|
||||
OldX := Console.CursorX;
|
||||
OldY := Console.CursorY;
|
||||
|
||||
While Not Eof(MsgFile) Do Begin
|
||||
Read (MsgFile, Msg);
|
||||
|
@ -145,7 +145,7 @@ Begin
|
|||
1 : If Msg.Room = 0 Then
|
||||
Str := strReplace(Session.GetPrompt(319), '|&1', Msg.FromWho)
|
||||
Else
|
||||
If Msg.Room = CurRoom Then
|
||||
If Msg.Room = Session.CurRoom Then
|
||||
Str := strReplace(Session.GetPrompt(181), '|&1', Msg.FromWho)
|
||||
Else
|
||||
Continue;
|
||||
|
@ -153,10 +153,10 @@ Begin
|
|||
5 : Str := Session.GetPrompt(226);
|
||||
6 : Str := strReplace(Session.GetPrompt(229), '|&1', Msg.FromWho);
|
||||
7 : Begin
|
||||
Reset (RoomFile);
|
||||
Seek (RoomFile, CurRoom - 1);
|
||||
Read (RoomFile, Room);
|
||||
Close (RoomFile);
|
||||
Reset (Session.RoomFile);
|
||||
Seek (Session.RoomFile, Session.CurRoom - 1);
|
||||
Read (Session.RoomFile, Session.Room);
|
||||
Close (Session.RoomFile);
|
||||
|
||||
Update_Topic;
|
||||
Str := Session.GetPrompt(226);
|
||||
|
@ -199,7 +199,7 @@ Begin
|
|||
Session.io.AnsiGotoXY (OldX, OldY);
|
||||
End Else Begin
|
||||
If Session.io.Graphics = 0 Then
|
||||
Session.io.OutBS (Screen.CursorX, True)
|
||||
Session.io.OutBS (Console.CursorX, True)
|
||||
Else Begin
|
||||
Session.io.AnsiMoveX(1);
|
||||
Session.io.AnsiClrEOL;
|
||||
|
@ -237,8 +237,8 @@ Procedure Node_Chat;
|
|||
Exit;
|
||||
End;
|
||||
|
||||
Session.io.PromptInfo[1] := strI2S(CurRoom);
|
||||
Session.io.PromptInfo[2] := Room.Name;
|
||||
Session.io.PromptInfo[1] := strI2S(Session.CurRoom);
|
||||
Session.io.PromptInfo[2] := Session.Room.Name;
|
||||
|
||||
Session.io.OutFile ('ansitele', True, 0);
|
||||
|
||||
|
@ -258,10 +258,10 @@ Procedure Node_Chat;
|
|||
For A := 1 to bbsCfg.INetTNNodes Do
|
||||
If GetChatRecord(A, Temp) Then
|
||||
If Temp.InChat Then Begin
|
||||
Reset (RoomFile);
|
||||
Seek (RoomFile, Temp.Room - 1);
|
||||
Read (RoomFile, RM);
|
||||
Close (RoomFile);
|
||||
Reset (Session.RoomFile);
|
||||
Seek (Session.RoomFile, Temp.Room - 1);
|
||||
Read (Session.RoomFile, RM);
|
||||
Close (Session.RoomFile);
|
||||
|
||||
Session.io.PromptInfo[1] := Temp.Name;
|
||||
Session.io.PromptInfo[2] := strI2S(A);
|
||||
|
@ -372,10 +372,10 @@ Begin
|
|||
Session.Chat.InChat := True;
|
||||
Session.Chat.Available := False;
|
||||
|
||||
Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
|
||||
Reset (ChatFile);
|
||||
Write (ChatFile, Session.Chat);
|
||||
Close (ChatFile);
|
||||
Assign (Session.ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
|
||||
Reset (Session.ChatFile);
|
||||
Write (Session.ChatFile, Session.Chat);
|
||||
Close (Session.ChatFile);
|
||||
|
||||
FileErase(Session.TempPath + 'chat.tmp');
|
||||
|
||||
|
@ -403,9 +403,9 @@ Begin
|
|||
Session.io.OutFull (Session.GetPrompt(427));
|
||||
|
||||
If Full Then
|
||||
Str := Session.io.GetInput (79 - Screen.CursorX + 1, 250, 19, '')
|
||||
Str := Session.io.GetInput (79 - Console.CursorX + 1, 250, 19, '')
|
||||
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
|
||||
Session.io.GetKeyCallBack := NIL;
|
||||
|
@ -439,7 +439,7 @@ Begin
|
|||
Str := Copy(Str, 5, Length(Str));
|
||||
|
||||
If Str <> '' Then
|
||||
Send_Node_Message (6, '0;' + Str, CurRoom);
|
||||
Send_Node_Message (6, '0;' + Str, Session.CurRoom);
|
||||
End Else
|
||||
If Str2 = '/MSG' Then
|
||||
Send_Private_Message(Str)
|
||||
|
@ -458,20 +458,20 @@ Begin
|
|||
FullReDraw;
|
||||
End Else
|
||||
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);
|
||||
Seek (RoomFile, CurRoom - 1);
|
||||
Write (RoomFile, Room);
|
||||
Close (RoomFile);
|
||||
Reset (Session.RoomFile);
|
||||
Seek (Session.RoomFile, Session.CurRoom - 1);
|
||||
Write (Session.RoomFile, Session.Room);
|
||||
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;
|
||||
|
||||
Session.io.GetKeyCallBack := GetKeyNodeChatFunc;
|
||||
End Else
|
||||
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('');
|
||||
GetKeyNodeChatFunc(True);
|
||||
End;
|
||||
|
@ -484,10 +484,10 @@ Begin
|
|||
|
||||
Session.AllowMessages := True;
|
||||
|
||||
Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
|
||||
Reset (ChatFile);
|
||||
Write (ChatFile, Session.Chat);
|
||||
Close (ChatFile);
|
||||
Assign (Session.ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
|
||||
Reset (Session.ChatFile);
|
||||
Write (Session.ChatFile, Session.Chat);
|
||||
Close (Session.ChatFile);
|
||||
|
||||
FileErase(Session.TempPath + 'chat.tmp');
|
||||
|
||||
|
|
|
@ -31,12 +31,12 @@ Function GetChatRecord (Node: Byte; Var Chat: ChatRec) : Boolean;
|
|||
Begin
|
||||
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);
|
||||
Close (ChatFile);
|
||||
Read (Session.ChatFile, Chat);
|
||||
Close (Session.ChatFile);
|
||||
|
||||
Result := True;
|
||||
End;
|
||||
|
@ -59,8 +59,8 @@ End;
|
|||
|
||||
Procedure Set_Node_Action (Action: String);
|
||||
Begin
|
||||
Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
|
||||
ReWrite (ChatFile);
|
||||
Assign (Session.ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
|
||||
ReWrite (Session.ChatFile);
|
||||
|
||||
If Action <> '' Then Begin
|
||||
Session.Chat.Active := True;
|
||||
|
@ -82,12 +82,12 @@ Begin
|
|||
Session.Chat.Gender := '?';
|
||||
End;
|
||||
|
||||
Write (ChatFile, Session.Chat);
|
||||
Close (ChatFile);
|
||||
Write (Session.ChatFile, Session.Chat);
|
||||
Close (Session.ChatFile);
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
Screen.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 (bbsCfg.BBSName + ' Node ' + strI2S(Session.NodeNum) + ' : ' + Session.User.ThisUser.Handle + ' : ' + strStripPipe(Action));
|
||||
// Console.SetWindowTitle (WinConsoleTitle + strI2S(Session.NodeNum) + ' - ' + Session.User.ThisUser.Handle + ' - ' + strStripPipe(Action));
|
||||
{$ENDIF}
|
||||
End;
|
||||
|
||||
|
@ -249,7 +249,7 @@ Begin
|
|||
KillRecord (MsgFile, 1, SizeOf(Msg));
|
||||
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[2] := strI2S(Msg.FromNode);
|
||||
|
|
|
@ -63,9 +63,9 @@ Begin
|
|||
|
||||
Repeat
|
||||
If Update <> TimerMinutes Then Begin
|
||||
X := Screen.CursorX;
|
||||
Y := Screen.CursorY;
|
||||
A := Screen.TextAttr;
|
||||
X := Console.CursorX;
|
||||
Y := Console.CursorY;
|
||||
A := Console.TextAttr;
|
||||
|
||||
If Session.io.ScreenInfo[9].X <> 0 Then Begin
|
||||
Session.io.AnsiGotoXY (Session.io.ScreenInfo[9].X, Session.io.ScreenInfo[9].Y);
|
||||
|
@ -103,7 +103,7 @@ Begin
|
|||
End;
|
||||
|
||||
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;
|
||||
#08 : If Session.io.LocalInput Then Begin
|
||||
If SysopX > Session.io.ScreenInfo[7].X Then Begin
|
||||
|
@ -173,7 +173,7 @@ Begin
|
|||
inc (sysopy);
|
||||
Session.io.AnsiGotoXY(Session.io.ScreenInfo[7].x, sysopy);
|
||||
Session.io.OutRaw (sysopstr);
|
||||
sysopx := Screen.CursorX;
|
||||
sysopx := Console.CursorX;
|
||||
end;
|
||||
End Else Begin
|
||||
Session.io.BufAddChar (ch);
|
||||
|
@ -196,7 +196,7 @@ Begin
|
|||
inc(usery);
|
||||
Session.io.AnsiGotoXY (Session.io.ScreenInfo[3].x, usery);
|
||||
Session.io.OutRaw(userstr);
|
||||
userx := Screen.CursorX;
|
||||
userx := Console.CursorX;
|
||||
end;
|
||||
end;
|
||||
End;
|
||||
|
@ -259,7 +259,7 @@ Var
|
|||
Begin
|
||||
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');
|
||||
|
||||
|
@ -287,7 +287,7 @@ Begin
|
|||
|
||||
Session.io.RemoteRestore(Image);
|
||||
|
||||
UpdateStatusLine (StatusPtr, '');
|
||||
UpdateStatusLine (Session.StatusPtr, '');
|
||||
End;
|
||||
|
||||
End.
|
||||
|
|
|
@ -423,8 +423,8 @@ Begin
|
|||
Session.io.OutFull (Session.GetPrompt(258));
|
||||
Session.io.BufFlush;
|
||||
|
||||
Screen.BufAddStr(#27 + '[6n');
|
||||
Screen.BufFlush;
|
||||
Console.BufAddStr(#27 + '[6n');
|
||||
Console.BufFlush;
|
||||
|
||||
For Loop := 1 to 24 Do Begin
|
||||
While Input.KeyPressed Do
|
||||
|
@ -1067,30 +1067,30 @@ Begin
|
|||
{ update last caller information }
|
||||
|
||||
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
|
||||
KillRecord (LastOnFile, 1, SizeOf(RecLastOn));
|
||||
If FileSize(Session.LastOnFile) >= 10 Then
|
||||
KillRecord (Session.LastOnFile, 1, SizeOf(RecLastOn));
|
||||
|
||||
LastOn.Handle := ThisUser.Handle;
|
||||
LastOn.City := ThisUser.City;
|
||||
LastOn.Node := Session.NodeNum;
|
||||
LastOn.DateTime := CurDateDos;
|
||||
LastOn.CallNum := bbsCfg.SystemCalls;
|
||||
LastOn.Address := ThisUser.Address;
|
||||
LastOn.EmailAddr := ThisUser.Email;
|
||||
LastOn.UserInfo := ThisUser.UserInfo;
|
||||
LastOn.Gender := ThisUser.Gender;
|
||||
LastOn.PeerIP := Session.UserIPInfo;
|
||||
LastOn.PeerHost := Session.UserHostInfo;
|
||||
LastOn.NewUser := ThisUser.Calls = 0;
|
||||
Session.LastOn.Handle := ThisUser.Handle;
|
||||
Session.LastOn.City := ThisUser.City;
|
||||
Session.LastOn.Node := Session.NodeNum;
|
||||
Session.LastOn.DateTime := CurDateDos;
|
||||
Session.LastOn.CallNum := bbsCfg.SystemCalls;
|
||||
Session.LastOn.Address := ThisUser.Address;
|
||||
Session.LastOn.EmailAddr := ThisUser.Email;
|
||||
Session.LastOn.UserInfo := ThisUser.UserInfo;
|
||||
Session.LastOn.Gender := ThisUser.Gender;
|
||||
Session.LastOn.PeerIP := Session.UserIPInfo;
|
||||
Session.LastOn.PeerHost := Session.UserHostInfo;
|
||||
Session.LastOn.NewUser := ThisUser.Calls = 0;
|
||||
|
||||
For Count := 1 to 10 Do
|
||||
LastOn.OptionData[Count] := ThisUser.OptionData[Count];
|
||||
Session.LastOn.OptionData[Count] := ThisUser.OptionData[Count];
|
||||
|
||||
Seek (LastOnFile, FileSize(LastOnFile));
|
||||
Write (LastOnFile, LastOn);
|
||||
Close (LastOnFile);
|
||||
Seek (Session.LastOnFile, FileSize(Session.LastOnFile));
|
||||
Write (Session.LastOnFile, Session.LastOn);
|
||||
Close (Session.LastOnFile);
|
||||
End;
|
||||
|
||||
{ update node info / settings }
|
||||
|
@ -1153,13 +1153,13 @@ Begin
|
|||
End;
|
||||
|
||||
If Not Session.LocalMode And (ThisUser.Flags AND UserNoLastCall = 0) Then Begin
|
||||
Reset (ConfigFile);
|
||||
Read (ConfigFile, bbsCfg);
|
||||
Reset (Session.ConfigFile);
|
||||
Read (Session.ConfigFile, bbsCfg);
|
||||
Inc (bbsCfg.SystemCalls);
|
||||
|
||||
Reset (ConfigFile);
|
||||
Write (ConfigFile, bbsCfg);
|
||||
Close (ConfigFile);
|
||||
Reset (Session.ConfigFile);
|
||||
Write (Session.ConfigFile, bbsCfg);
|
||||
Close (Session.ConfigFile);
|
||||
End;
|
||||
|
||||
Inc (ThisUser.Calls);
|
||||
|
@ -1234,7 +1234,7 @@ Begin
|
|||
End;
|
||||
|
||||
{$IFNDEF UNIX}
|
||||
UpdateStatusLine(StatusPtr, '');
|
||||
UpdateStatusLine(Session.StatusPtr, '');
|
||||
{$ENDIF}
|
||||
End;
|
||||
|
||||
|
|
|
@ -172,6 +172,7 @@ Begin
|
|||
strPadL(strI2S(Count), 3, '0') + ' ' +
|
||||
strPadR(TFTPServer(FocusPtr.ClientList[Count - 1]).User.Handle, 31, ' ') + ' ' +
|
||||
strPadL(TFTPServer(FocusPtr.ClientList[Count - 1]).Client.PeerIP, 15, ' '));
|
||||
// this is broken... see the typecast of tftpserver kludge
|
||||
End Else
|
||||
If Count <= FocusPtr.ClientMax Then
|
||||
Console.WriteXY (3, 3 + PosY, Attr, strPadL(strI2S(Count), 3, '0') + strPadR(' Waiting', 48, ' '))
|
||||
|
|
|
@ -120,6 +120,8 @@ Type
|
|||
Destructor Destroy; Override;
|
||||
Procedure RemoveFilesFromFLO (FN: String);
|
||||
Function AuthenticateNode (AddrList: String) : Boolean;
|
||||
Function EscapeFileName (Str: String) : String;
|
||||
Function RestoreFileName (Str: String) : String;
|
||||
Function GetDataStr : String;
|
||||
Procedure SendFrame (CmdType: Byte; CmdData: String);
|
||||
Procedure SendDataFrame (Var Buf; BufSize: Word);
|
||||
|
@ -130,6 +132,11 @@ Type
|
|||
|
||||
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
|
||||
TBINKPServer = Class(TServerClient)
|
||||
Server : TServerManager;
|
||||
|
@ -184,6 +191,34 @@ Begin
|
|||
Inherited Destroy;
|
||||
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;
|
||||
Var
|
||||
EchoFile : File;
|
||||
|
@ -585,7 +620,7 @@ Begin
|
|||
// translate filename, fix up file times
|
||||
|
||||
Str := GetDataStr;
|
||||
InFN := strWordGet(1, Str, ' ');
|
||||
InFN := RestoreFileName(strWordGet(1, Str, ' '));
|
||||
InSize := strS2I(strWordGet(2, Str, ' '));
|
||||
InTime := strS2I(strWordGet(3, Str, ' '));
|
||||
InPos := strS2I(strWordGet(4, Str, ' '));
|
||||
|
@ -596,11 +631,11 @@ Begin
|
|||
// fix timestamp and escape filen
|
||||
|
||||
If FSize >= InSize Then Begin
|
||||
SendFrame (M_SKIP, InFN + ' ' + strI2S(FSize) + ' ' + strI2S(InTime));
|
||||
SendFrame (M_SKIP, EscapeFileName(InFN) + ' ' + strI2S(FSize) + ' ' + strI2S(InTime));
|
||||
|
||||
Continue;
|
||||
End Else Begin
|
||||
SendFrame (M_GET, InFN + ' ' + strI2S(FSize) + ' ' + strI2S(InTime));
|
||||
SendFrame (M_GET, EscapeFileName(InFN) + ' ' + strI2S(FSize) + ' ' + strI2S(InTime));
|
||||
|
||||
StatusUpdate(Owner, 'Receiving: ' + InFN);
|
||||
|
||||
|
@ -632,10 +667,11 @@ Begin
|
|||
NeedHeader := True;
|
||||
|
||||
If InPos = InSize Then Begin
|
||||
// fix time, escape filename
|
||||
// set file time based on intime value
|
||||
// does this not work in linux?
|
||||
|
||||
Close (InFile);
|
||||
SendFrame (M_GOT, InFN + ' ' + strI2S(InSize) + ' ' + strI2S(InTime));
|
||||
SendFrame (M_GOT, EscapeFileName(InFN) + ' ' + strI2S(InSize) + ' ' + strI2S(InTime));
|
||||
|
||||
Inc (RcvdFiles);
|
||||
|
||||
|
@ -673,8 +709,8 @@ Begin
|
|||
|
||||
If IoResult <> 0 Then Continue;
|
||||
|
||||
// need to escape filename here and fix file time
|
||||
SendFrame (M_FILE, FileList.QData[FileList.QPos].FileNew + ' ' + strI2S(FileList.QData[FileList.QPos].FileSize) + ' ' + strI2S(TempFileTime) + ' 0');
|
||||
// use real filetime instead of tempfiletime
|
||||
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);
|
||||
|
||||
|
@ -697,8 +733,9 @@ Begin
|
|||
|
||||
Seek (OutFile, strS2I(Str));
|
||||
|
||||
// fix file time and escape filename
|
||||
SendFrame (M_FILE, FileList.QData[FileList.QPos].FileNew + ' ' + Str + ' ' + strI2S(TempFileTime) + ' 0');
|
||||
// use real filetime instead of tempfiletime
|
||||
|
||||
SendFrame (M_FILE, EscapeFileName(FileList.QData[FileList.QPos].FileNew) + ' ' + Str + ' ' + strI2S(TempFileTime) + ' 0');
|
||||
|
||||
HaveHeader := False;
|
||||
NeedHeader := True;
|
||||
|
|
|
@ -16,7 +16,8 @@ Uses
|
|||
MIS_Server,
|
||||
MIS_NodeData,
|
||||
MIS_Common,
|
||||
BBS_Records;
|
||||
BBS_Records,
|
||||
BBS_DataBase;
|
||||
|
||||
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
|
||||
Found := True;
|
||||
|
||||
Case TempBase.BaseType of
|
||||
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
|
||||
If MBaseOpenCreate (MsgBase, TempBase, TempPath) Then Begin
|
||||
Low := 1;
|
||||
High := MsgBase^.GetHighMsgNum;
|
||||
Active := MsgBase^.NumberOfMsgs;
|
||||
End;
|
||||
|
||||
Dispose (MsgBase, Done);
|
||||
Dispose (MsgBase, Done);
|
||||
End;
|
||||
|
||||
MBase := TempBase;
|
||||
MBasePos := MBaseFile.FilePosRecord;
|
||||
|
@ -261,20 +254,12 @@ Begin
|
|||
True : PostAbility := 'y';
|
||||
End;
|
||||
|
||||
Case TempBase.BaseType of
|
||||
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
|
||||
If MBaseOpenCreate (MsgBase, TempBase, TempPath) Then Begin
|
||||
LowMessage := 1;
|
||||
HighMessage := MsgBase^.GetHighActiveMsgNum;
|
||||
End;
|
||||
|
||||
Dispose (MsgBase, Done);
|
||||
Dispose (MsgBase, Done);
|
||||
End;
|
||||
|
||||
ClientWriteLine (TempBase.NewsName + ' ' + strI2S(LowMessage) + ' ' + strI2S(HighMessage) + ' ' + PostAbility);
|
||||
End;
|
||||
|
@ -559,7 +544,9 @@ Begin
|
|||
Exit;
|
||||
End;
|
||||
|
||||
Found := False;
|
||||
Found := False;
|
||||
|
||||
// ignore groups and check postacs in loop instead of below?
|
||||
|
||||
Assign (MBaseFile, bbsConfig.DataPath + 'mbases.dat');
|
||||
|
||||
|
@ -575,9 +562,9 @@ Begin
|
|||
Break;
|
||||
End;
|
||||
End;
|
||||
End;
|
||||
|
||||
Close (MBaseFile);
|
||||
Close (MBaseFile);
|
||||
End;
|
||||
|
||||
If Not Found or (Newsgroup = '') Then Begin
|
||||
MsgText.Free;
|
||||
|
@ -595,67 +582,41 @@ Begin
|
|||
Exit;
|
||||
End;
|
||||
|
||||
Case TempBase.BaseType of
|
||||
0 : MsgBase := New(PMsgBaseJAM, Init);
|
||||
1 : MsgBase := New(PMsgBaseSquish, Init);
|
||||
If Not MBaseOpenCreate (MsgBase, TempBase, TempPath) Then Begin
|
||||
MsgText.Free;
|
||||
|
||||
ClientWriteLine('441 Cannot save');
|
||||
|
||||
Exit;
|
||||
End;
|
||||
|
||||
MsgBase^.SetMsgPath (TempBase.Path + TempBase.FileName);
|
||||
MsgBase^.SetTempFile (TempPath + 'msgbuf.');
|
||||
MBaseAssignData (User, MsgBase, TempBase);
|
||||
|
||||
If Not MsgBase^.OpenMsgBase Then
|
||||
If Not MsgBase^.CreateMsgBase (TempBase.MaxMsgs, TempBase.MaxAge) Then Begin
|
||||
Dispose(MsgBase, Done);
|
||||
MsgText.Free;
|
||||
Client.WriteLine('441 Cannot save');
|
||||
Exit;
|
||||
End Else
|
||||
If Not MsgBase^.OpenMsgBase Then Begin
|
||||
Dispose(MsgBase, Done);
|
||||
MsgText.Free;
|
||||
Client.WriteLine('411 Cannot save');
|
||||
Exit;
|
||||
End;
|
||||
|
||||
MsgBase^.StartNewMsg;
|
||||
|
||||
MsgBase^.SetLocal (True);
|
||||
MsgBase^.SetDate (FormatDateTime('mm/dd/yy', Now));
|
||||
MsgBase^.SetTime (FormatDateTime('hh:nn', Now));
|
||||
MsgBase^.SetTo ('All');
|
||||
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);
|
||||
MsgBase^.SetTo ('All');
|
||||
MsgBase^.SetSubj (Subject);
|
||||
|
||||
For Count := 1 to MsgText.Count Do Begin
|
||||
InData := MsgText.Strings[Count - 1];
|
||||
|
||||
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);
|
||||
End;
|
||||
|
||||
MsgBase^.WriteMsg;
|
||||
MsgBase^.CloseMsgBase;
|
||||
|
||||
|
@ -663,7 +624,7 @@ Begin
|
|||
|
||||
MsgText.Free;
|
||||
|
||||
ClientWriteLine ('240 Article posted ok');
|
||||
ClientWriteLine ('240 Article posted ok (' + TempBase.Name + ')');
|
||||
End;
|
||||
|
||||
Procedure TNNTPServer.cmd_ARTICLE;
|
||||
|
@ -685,19 +646,9 @@ Begin
|
|||
|
||||
ArticleNum := strS2I(Data);
|
||||
|
||||
Case MBase.BaseType of
|
||||
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
|
||||
If Not MBaseOpenCreate (MsgBase, MBase, TempPath) THen Begin
|
||||
ClientWriteLine('423 No such article');
|
||||
|
||||
Dispose (MsgBase, Done);
|
||||
|
||||
Exit;
|
||||
End;
|
||||
|
||||
|
@ -770,19 +721,9 @@ Begin
|
|||
Last := First;
|
||||
End;
|
||||
|
||||
Case MBase.BaseType of
|
||||
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
|
||||
If Not MBaseOpenCreate (MsgBase, MBase, TempPath) THen Begin
|
||||
ClientWriteLine('420 No article(s) selected');
|
||||
|
||||
Dispose (MsgBase, Done);
|
||||
|
||||
Exit;
|
||||
End;
|
||||
|
||||
|
|
|
@ -1563,11 +1563,11 @@ Begin
|
|||
3 : Session.io.AnsiClrEOL;
|
||||
4 : Session.io.AnsiGotoXY(Param[1].B, Param[2].B);
|
||||
5 : Begin
|
||||
TempByte := Screen.CursorX;
|
||||
TempByte := Console.CursorX;
|
||||
Store(TempByte, 1);
|
||||
End;
|
||||
6 : Begin
|
||||
TempByte := Screen.CursorY;
|
||||
TempByte := Console.CursorY;
|
||||
Store(TempByte, 1);
|
||||
End;
|
||||
7 : Begin
|
||||
|
@ -1612,7 +1612,7 @@ Begin
|
|||
{$IFDEF UNIX}
|
||||
TempBool := Input.KeyPressed;
|
||||
{$ELSE}
|
||||
TempBool := Input.KeyPressed OR Session.Client.DataWaiting;
|
||||
TempBool := Keyboard.KeyPressed OR Session.Client.DataWaiting;
|
||||
{$ENDIF}
|
||||
Store (TempBool, 1);
|
||||
Session.io.BufFlush;
|
||||
|
@ -1873,7 +1873,7 @@ Begin
|
|||
Store (TempStr, 256);
|
||||
End;
|
||||
85 : Begin
|
||||
TempByte := Screen.TextAttr;
|
||||
TempByte := Console.TextAttr;
|
||||
Store (TempByte, 1);
|
||||
End;
|
||||
86 : Session.io.AnsiColor(Param[1].B);
|
||||
|
@ -2020,7 +2020,7 @@ Begin
|
|||
TempChar := #0;
|
||||
|
||||
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);
|
||||
End;
|
||||
|
@ -2028,7 +2028,7 @@ Begin
|
|||
TempByte := 0;
|
||||
|
||||
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);
|
||||
End;
|
||||
|
@ -2118,7 +2118,7 @@ Begin
|
|||
Store (TempBool, 1);
|
||||
End;
|
||||
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
|
||||
Session.io.RemoteRestore(TConsoleImageRec(ClassData[Param[1].L].ClassPtr^));
|
||||
End;
|
||||
|
|
|
@ -12,7 +12,7 @@ Uses
|
|||
m_FileIO,
|
||||
m_Strings,
|
||||
BBS_Records,
|
||||
BBS_Common,
|
||||
BBS_DataBase,
|
||||
mUtil_Common,
|
||||
mUtil_Status;
|
||||
|
||||
|
@ -70,7 +70,7 @@ Begin
|
|||
MsgSubj := INI.ReadString (Header_MsgPost, 'file' + strI2S(Count) + '_subj', '');
|
||||
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
|
||||
Log (2, '!', ' Invalid From to To: ' + MsgFrom + '/' + MsgTo);
|
||||
|
|
|
@ -65,31 +65,29 @@ End;
|
|||
|
||||
Procedure InitClasses;
|
||||
Begin
|
||||
Assign (ConfigFile, 'mystic.dat');
|
||||
|
||||
if ioReset(ConfigFile, SizeOf(RecConfig), fmReadWrite + fmDenyNone) Then Begin
|
||||
Read (ConfigFile, bbsCfg);
|
||||
Close (ConfigFile);
|
||||
End Else Begin
|
||||
WriteLn('ERROR: Unable to read mystic.dat');
|
||||
Halt(1);
|
||||
Case BBSCfgStatus of
|
||||
CfgNotFound : Begin
|
||||
WriteLn('ERROR: Unable to read mystic.dat');
|
||||
Halt(1);
|
||||
End;
|
||||
CfgMisMatch : Begin
|
||||
WriteLn('ERROR: Data files are not current and must be upgraded');
|
||||
Halt(1);
|
||||
End;
|
||||
End;
|
||||
|
||||
If bbsCfg.DataChanged <> mysDataChanged Then Begin
|
||||
WriteLn('ERROR: Data files are not current and must be upgraded');
|
||||
Halt(1);
|
||||
End;
|
||||
Console := TOutput.Create(True);
|
||||
Keyboard := TInput.Create;
|
||||
Session := TBBSCore.Create;
|
||||
|
||||
Screen := TOutput.Create(True);
|
||||
Input := TInput.Create;
|
||||
Session := TBBSCore.Create;
|
||||
Assign (Session.ConfigFile, bbsCfgPath + 'mystic.dat');
|
||||
End;
|
||||
|
||||
Procedure DisposeClasses;
|
||||
Begin
|
||||
Session.Free;
|
||||
Input.Free;
|
||||
Screen.Free;
|
||||
Keyboard.Free;
|
||||
Console.Free;
|
||||
End;
|
||||
|
||||
Var
|
||||
|
@ -150,11 +148,11 @@ Begin
|
|||
|
||||
{$IFNDEF LOGGING}
|
||||
{$IFNDEF UNIX}
|
||||
Screen.TextAttr := 14;
|
||||
Console.TextAttr := 14;
|
||||
|
||||
Screen.SetWindow (1, 1, 80, 25, False);
|
||||
Screen.ClearScreen;
|
||||
Screen.WriteLine ('Exiting with Errorlevel ' + strI2S(ExitCode));
|
||||
Console.SetWindow (1, 1, 80, 25, False);
|
||||
Console.ClearScreen;
|
||||
Console.WriteLine ('Exiting with Errorlevel ' + strI2S(ExitCode));
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
|
@ -166,7 +164,7 @@ End;
|
|||
Procedure CheckDIR (Dir: String);
|
||||
Begin
|
||||
If Not DirExists(Dir) Then Begin
|
||||
Screen.WriteLine ('ERROR: ' + Dir + ' does not exist.');
|
||||
Console.WriteLine ('ERROR: ' + Dir + ' does not exist.');
|
||||
|
||||
DisposeClasses;
|
||||
|
||||
|
@ -182,15 +180,15 @@ Begin
|
|||
Session.NodeNum := 0;
|
||||
|
||||
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;
|
||||
|
||||
Break;
|
||||
End Else Begin
|
||||
ioRead (ChatFile, TChat);
|
||||
Close (ChatFile);
|
||||
ioRead (Session.ChatFile, TChat);
|
||||
Close (Session.ChatFile);
|
||||
|
||||
If Not TChat.Active Then Begin
|
||||
Session.NodeNum := Count;
|
||||
|
@ -267,7 +265,7 @@ Begin
|
|||
{$I-} Reset (Session.User.UserFile); {$I+}
|
||||
If IoResult <> 0 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;
|
||||
Halt(1);
|
||||
End;
|
||||
|
@ -284,7 +282,7 @@ Begin
|
|||
Assign (Session.ThemeFile, bbsCfg.DataPath + 'theme.dat');
|
||||
{$I-} Reset (Session.ThemeFile); {$I+}
|
||||
If IoResult <> 0 Then Begin
|
||||
Screen.WriteLine ('ERROR: No theme configuration.');
|
||||
Console.WriteLine ('ERROR: No theme configuration.');
|
||||
DisposeClasses;
|
||||
Halt(1);
|
||||
End;
|
||||
|
@ -292,7 +290,7 @@ Begin
|
|||
|
||||
If Not Session.LoadThemeData(bbsCfg.DefThemeFile) 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;
|
||||
Halt(1);
|
||||
End;
|
||||
|
@ -309,15 +307,15 @@ Begin
|
|||
CheckDIR (bbsCfg.ScriptPath);
|
||||
CheckDIR (bbsCfg.LogsPath);
|
||||
|
||||
Assign (RoomFile, bbsCfg.DataPath + 'chatroom.dat');
|
||||
{$I-} Reset (RoomFile); {$I+}
|
||||
Assign (Session.RoomFile, bbsCfg.DataPath + 'chatroom.dat');
|
||||
{$I-} Reset (Session.RoomFile); {$I+}
|
||||
If IoResult <> 0 Then Begin
|
||||
ReWrite (RoomFile);
|
||||
Room.Name := 'None';
|
||||
ReWrite (Session.RoomFile);
|
||||
Session.Room.Name := 'None';
|
||||
For Count := 1 to 99 Do
|
||||
Write (RoomFile, Room);
|
||||
Write (Session.RoomFile, Session.Room);
|
||||
End;
|
||||
Close (RoomFile);
|
||||
Close (Session.RoomFile);
|
||||
|
||||
Assign (Session.FileBase.FBaseFile, bbsCfg.DataPath + 'fbases.dat');
|
||||
{$I-} Reset(Session.FileBase.FBaseFile); {$I+}
|
||||
|
@ -327,7 +325,7 @@ Begin
|
|||
Assign (Session.Msgs.MBaseFile, bbsCfg.DataPath + 'mbases.dat');
|
||||
{$I-} Reset(Session.Msgs.MBaseFile); {$I+}
|
||||
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;
|
||||
Halt(1);
|
||||
End;
|
||||
|
@ -353,10 +351,10 @@ Begin
|
|||
End;
|
||||
Close (Session.User.SecurityFile);
|
||||
|
||||
Assign (LastOnFile, bbsCfg.DataPath + 'callers.dat');
|
||||
{$I-} Reset(LastOnFile); {$I+}
|
||||
If IoResult <> 0 Then ReWrite(LastOnFile);
|
||||
Close (LastOnFile);
|
||||
Assign (Session.LastOnFile, bbsCfg.DataPath + 'callers.dat');
|
||||
{$I-} Reset(Session.LastOnFile); {$I+}
|
||||
If IoResult <> 0 Then ReWrite(Session.LastOnFile);
|
||||
Close (Session.LastOnFile);
|
||||
|
||||
Assign (Session.FileBase.ArcFile, bbsCfg.DataPath + 'archive.dat');
|
||||
{$I-} Reset(Session.FileBase.ArcFile); {$I+}
|
||||
|
@ -384,8 +382,8 @@ Begin
|
|||
|
||||
InitClasses;
|
||||
|
||||
Screen.TextAttr := 7;
|
||||
Screen.WriteLine('');
|
||||
Console.TextAttr := 7;
|
||||
Console.WriteLine('');
|
||||
|
||||
For Count := 1 to ParamCount Do Begin
|
||||
Temp := strUpper(ParamStr(Count));
|
||||
|
@ -461,13 +459,13 @@ Begin
|
|||
If Session.ConfigMode Then Begin
|
||||
Session.NodeNum := 0;
|
||||
|
||||
Screen.SetWindowTitle ('Mystic Configuration');
|
||||
Console.SetWindowTitle ('Mystic Configuration');
|
||||
|
||||
Configuration_MainMenu;
|
||||
|
||||
Screen.TextAttr := 7;
|
||||
Screen.ClearScreen;
|
||||
Screen.BufFlush;
|
||||
Console.TextAttr := 7;
|
||||
Console.ClearScreen;
|
||||
Console.BufFlush;
|
||||
|
||||
Halt(0);
|
||||
End;
|
||||
|
|
|
@ -14,94 +14,6 @@ Uses
|
|||
Var
|
||||
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;
|
||||
Var
|
||||
QWK : TQwkEngine;
|
||||
|
@ -145,13 +57,24 @@ Begin
|
|||
|
||||
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');
|
||||
If QWK.TotalMessages > 0 Then Begin
|
||||
WriteLn (' - Sending reply packet');
|
||||
|
||||
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');
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -3757,4 +3757,10 @@
|
|||
! Fixed a compatibility issue with the BINKP server when used against a BINKD
|
||||
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>
|
||||
|
|
Loading…
Reference in New Issue