New security level editor
This commit is contained in:
parent
c25341b0f1
commit
7f60eb3e69
|
@ -3898,3 +3898,5 @@
|
||||||
+ Message base path expanded to 80 characters from 40.
|
+ Message base path expanded to 80 characters from 40.
|
||||||
|
|
||||||
+ Added new ANSI message base editor.
|
+ Added new ANSI message base editor.
|
||||||
|
|
||||||
|
+ Added new ANSI security level editor.
|
||||||
|
|
|
@ -23,12 +23,12 @@ Uses
|
||||||
bbs_cfg_FileBase,
|
bbs_cfg_FileBase,
|
||||||
bbs_cfg_MsgBase,
|
bbs_cfg_MsgBase,
|
||||||
bbs_cfg_Groups,
|
bbs_cfg_Groups,
|
||||||
|
bbs_cfg_SecLevel,
|
||||||
|
|
||||||
//old editors to be rewritten
|
//old editors to be rewritten
|
||||||
bbs_cfg_useredit,
|
bbs_cfg_useredit,
|
||||||
bbs_cfg_events,
|
bbs_cfg_events,
|
||||||
bbs_cfg_language,
|
bbs_cfg_language,
|
||||||
bbs_cfg_seclevel,
|
|
||||||
bbs_cfg_vote,
|
bbs_cfg_vote,
|
||||||
bbs_cfg_menuedit;
|
bbs_cfg_menuedit;
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ Begin
|
||||||
'B' : Configuration_MessageBaseEditor;
|
'B' : Configuration_MessageBaseEditor;
|
||||||
'F' : Configuration_FileBaseEditor;
|
'F' : Configuration_FileBaseEditor;
|
||||||
'G' : Configuration_GroupEditor(True);
|
'G' : Configuration_GroupEditor(True);
|
||||||
|
'L' : Configuration_SecurityEditor(True);
|
||||||
'R' : Configuration_GroupEditor(False);
|
'R' : Configuration_GroupEditor(False);
|
||||||
'P' : Configuration_ProtocolEditor;
|
'P' : Configuration_ProtocolEditor;
|
||||||
End;
|
End;
|
||||||
|
@ -124,7 +125,6 @@ Var
|
||||||
'U' : User_Editor(False, False);
|
'U' : User_Editor(False, False);
|
||||||
'M' : Menu_Editor;
|
'M' : Menu_Editor;
|
||||||
'T' : Lang_Editor;
|
'T' : Lang_Editor;
|
||||||
'S' : Levels_Editor;
|
|
||||||
'E' : Event_Editor;
|
'E' : Event_Editor;
|
||||||
'V' : Vote_Editor;
|
'V' : Vote_Editor;
|
||||||
End;
|
End;
|
||||||
|
@ -291,10 +291,10 @@ Begin
|
||||||
'G' : Configuration_GroupEditor(True);
|
'G' : Configuration_GroupEditor(True);
|
||||||
'P' : Configuration_ProtocolEditor;
|
'P' : Configuration_ProtocolEditor;
|
||||||
'R' : Configuration_GroupEditor(False);
|
'R' : Configuration_GroupEditor(False);
|
||||||
|
'S' : Configuration_SecurityEditor(True);
|
||||||
'U',
|
'U',
|
||||||
'M',
|
'M',
|
||||||
'T',
|
'T',
|
||||||
'S',
|
|
||||||
'E',
|
'E',
|
||||||
'V' : ExecuteOldConfiguration(Res);
|
'V' : ExecuteOldConfiguration(Res);
|
||||||
'X' : Break;
|
'X' : Break;
|
||||||
|
|
|
@ -4,104 +4,156 @@ Unit bbs_cfg_SecLevel;
|
||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
Procedure Levels_Editor;
|
Function Configuration_SecurityEditor (Edit: Boolean) : LongInt;
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
m_Strings,
|
m_Strings,
|
||||||
|
m_FileIO,
|
||||||
bbs_Common,
|
bbs_Common,
|
||||||
bbs_Core,
|
bbs_Ansi_MenuBox,
|
||||||
bbs_User;
|
bbs_Ansi_MenuForm,
|
||||||
|
bbs_Cfg_Common;
|
||||||
|
|
||||||
Procedure Levels_Editor;
|
|
||||||
Var
|
Var
|
||||||
A : Integer;
|
SecFile : File;
|
||||||
Old : RecSecurity;
|
Sec : RecSecurity;
|
||||||
|
|
||||||
|
Procedure Edit_Level (Level: Integer);
|
||||||
|
Var
|
||||||
|
Box : TAnsiMenuBox;
|
||||||
|
Form : TAnsiMenuForm;
|
||||||
|
Topic : String;
|
||||||
Begin
|
Begin
|
||||||
Session.SystemLog('*LEVEL EDITOR*');
|
Topic := '|03(|09Security|03) |01-|09> |15';
|
||||||
|
|
||||||
Old := Session.User.Security;
|
ioSeek (SecFile, Level - 1);
|
||||||
|
ioRead (SecFile, Sec);
|
||||||
|
|
||||||
Reset (Session.User.SecurityFile);
|
Box := TAnsiMenuBox.Create;
|
||||||
Read (Session.User.SecurityFile, Session.User.Security);
|
Form := TAnsiMenuForm.Create;
|
||||||
Repeat
|
|
||||||
Session.io.OutFullLn ('|CL|14Security Level ' + strI2S(FilePos(Session.User.SecurityFile)) + ' of 255|CR|03');
|
|
||||||
Session.io.OutRawLn ('A. Description : ' + Session.User.Security.Desc);
|
|
||||||
Session.io.OutRawLn ('B. Time allowed/day : ' + strI2S(Session.User.Security.Time));
|
|
||||||
Session.io.OutRawLn ('C. Max calls/day : ' + strI2S(Session.User.Security.MaxCalls));
|
|
||||||
Session.io.OutRawLn ('D. Max downloads/day : ' + strI2S(Session.User.Security.MaxDLs));
|
|
||||||
Session.io.OutRawLn ('E. Max download K/day : ' + strI2S(Session.User.Security.MaxDLk));
|
|
||||||
Session.io.OutRawLn ('F. Max mins in time bank: ' + strI2S(Session.User.Security.MaxTB));
|
|
||||||
|
|
||||||
Session.io.OutRaw ('G. UL/DL ratio : ');
|
Box.Header := ' Security Level ' + strI2S(Level) + ' ';
|
||||||
If Session.User.Security.DLRatio = 0 Then
|
|
||||||
Session.io.OutRawLn ('Disabled')
|
|
||||||
Else
|
|
||||||
Session.io.OutRawLn ('1 UL for every ' + strI2S(Session.User.Security.DLRatio) + ' DLs');
|
|
||||||
|
|
||||||
Session.io.OutRaw ('H. UL/DL Kb ratio : ');
|
Box.Open (12, 5, 68, 21);
|
||||||
If Session.User.Security.DLKRatio = 0 Then
|
|
||||||
Session.io.OutRawLn ('Disabled')
|
|
||||||
Else
|
|
||||||
Session.io.OutRawLn ('1 UL kb for every ' + strI2S(Session.User.Security.DLKRatio) + ' DL kb');
|
|
||||||
|
|
||||||
Session.io.OutRaw ('I. Post / Call Ratio : ');
|
VerticalLine (35, 6, 20);
|
||||||
If Session.User.Security.PCRatio = 0 Then
|
|
||||||
Session.io.OutRawLn ('Disabled')
|
|
||||||
Else
|
|
||||||
Session.io.OutRawLn (strI2S(Session.User.Security.PCRatio) + ' posts for every 100 calls');
|
|
||||||
|
|
||||||
Session.io.OutFullLn ('|CRK. Upgraded Flags Set 1 : ' + DrawAccessFlags(Session.User.Security.AF1));
|
Form.AddStr ('D', ' Description ' , 22, 6, 37, 6, 13, 30, 30, @Sec.Desc, Topic + 'Description of security level');
|
||||||
Session.io.OutFullLn ('L. Upgraded Flags Set 2 : ' + DrawAccessFlags(Session.User.Security.AF2));
|
Form.AddWord ('T', ' Time Per Day ' , 21, 7, 37, 7, 14, 4, 0, 1440, @Sec.Time, Topic + 'Minutes per day');
|
||||||
|
Form.AddWord ('C', ' Calls Per Day ' , 20, 8, 37, 8, 15, 5, 0, 65000, @Sec.MaxCalls, Topic + 'Maximum calls allowed per day');
|
||||||
|
Form.AddWord ('P', ' Post/Call Ratio ' , 18, 9, 37, 9, 17, 5, 0, 65000, @Sec.PCRatio, Topic + 'Must post X messages per 100 calls');
|
||||||
|
Form.AddWord ('E', ' Download Per Day ' , 17, 10, 37, 10, 18, 5, 0, 65000, @Sec.MaxDLs, Topic + 'Maximum downloads allowed per day');
|
||||||
|
Form.AddLong ('K', ' Download KB Per Day ', 14, 11, 37, 11, 21, 7, 0, 9999999, @Sec.MaxDLk, Topic + 'Maximum downloaded kilobytes per day');
|
||||||
|
Form.AddByte ('U', ' UL/DL Ratio ' , 22, 12, 37, 12, 13, 3, 0, 255, @Sec.DLRatio, Topic + 'Must upload 1 file for every X downloaded');
|
||||||
|
Form.AddWord ('B', ' UL/DL KB Ratio ' , 19, 13, 37, 13, 16, 5, 0, 65000, @Sec.DLKRatio, Topic + 'Must upload 1KB for every X downloaded');
|
||||||
|
Form.AddWord ('M', ' Max Time in Bank ' , 17, 14, 37, 14, 18, 5, 0, 65000, @Sec.MaxTB, Topic + 'Maximum minutes allowed in time bank');
|
||||||
|
Form.AddStr ('S', ' Start Menu ' , 23, 15, 37, 15, 12, 20, 20, @Sec.StartMenu, Topic + 'Menu name to load first when user logs in');
|
||||||
|
Form.AddWord ('X', ' Expires ' , 26, 16, 37, 16, 9, 4, 0, 9999, @Sec.Expires, Topic + 'Number of days before level expires');
|
||||||
|
Form.AddByte ('O', ' Expires To ' , 23, 17, 37, 17, 12, 3, 0, 255, @Sec.ExpiresTo, Topic + 'Security level to expire to');
|
||||||
|
Form.AddFlag ('1', ' Access Flags 1 ' , 19, 18, 37, 18, 16, @Sec.AF1, Topic + 'Access flags: Set 1');
|
||||||
|
Form.AddFlag ('2', ' Access Flags 2 ' , 19, 19, 37, 19, 16, @Sec.AF2, Topic + 'Access flags: Set 2');
|
||||||
|
Form.AddBol ('H', ' Hard Flag Upgrade ' , 16, 20, 37, 20, 19, 3, @Sec.Hard, Topic + 'Hard access flag upgrade?');
|
||||||
|
|
||||||
Session.io.OutFullLn ('|CRM. Hard AF Upgrade : ' + Session.io.OutYN(Session.User.Security.Hard));
|
Form.Execute;
|
||||||
|
|
||||||
Session.io.OutRawLn ('N. Start Menu : ' + Session.User.Security.StartMeNU);
|
Box.Close;
|
||||||
|
|
||||||
Session.io.OutFull ('|CR|09([) Previous, (]), Next, (J)ump, (Q)uit: ');
|
Box.Free;
|
||||||
Case Session.io.OneKey('[]ABCDEFGHIJKLMNQ', True) of
|
Form.Free;
|
||||||
'[' : If FilePos(Session.User.SecurityFile) > 1 Then Begin
|
|
||||||
Seek (Session.User.SecurityFile, FilePos(Session.User.SecurityFile)-1);
|
ioSeek (SecFile, Level - 1);
|
||||||
Write (Session.User.SecurityFile, Session.User.Security);
|
ioWrite (SecFile, Sec);
|
||||||
Seek (Session.User.SecurityFile, FilePos(Session.User.SecurityFile)-2);
|
End;
|
||||||
Read (Session.User.SecurityFile, Session.User.Security);
|
|
||||||
End;
|
Function Configuration_SecurityEditor (Edit: Boolean) : LongInt;
|
||||||
']' : If FilePos(Session.User.SecurityFile) < 255 Then Begin
|
Var
|
||||||
Seek (Session.User.SecurityFile, FilePos(Session.User.SecurityFile)-1);
|
List : TAnsiMenuList;
|
||||||
Write (Session.User.SecurityFile, Session.User.Security);
|
Box : TAnsiMenuBox;
|
||||||
Read (Session.User.SecurityFile, Session.User.Security);
|
HideMode : Boolean;
|
||||||
End;
|
|
||||||
'A' : Session.User.Security.Desc := Session.io.InXY(27, 3, 30, 30, 11, Session.User.Security.Desc);
|
Procedure MakeList;
|
||||||
'B' : Session.User.Security.Time := strS2I(Session.io.InXY(27, 4, 3, 3, 12, strI2S(Session.User.Security.Time)));
|
Var
|
||||||
'C' : Session.User.Security.MaxCalls := strS2I(Session.io.InXY(27, 5, 4, 4, 11, strI2S(Session.User.Security.MaxCalls)));
|
Count : LongInt;
|
||||||
'D' : Session.User.Security.MaxDLs := strS2I(Session.io.InXY(27, 6, 4, 4, 11, strI2S(Session.User.Security.MaxDLs)));
|
Begin
|
||||||
'E' : Session.User.Security.MaxDLK := strS2I(Session.io.InXY(27, 7, 4, 4, 11, strI2S(Session.User.Security.MaxDLK)));
|
List.Clear;
|
||||||
'F' : Session.User.Security.MaxTB := strS2I(Session.io.InXY(27, 8, 4, 4, 11, strI2S(Session.User.Security.MaxTB)));
|
|
||||||
'G' : Session.User.Security.DLRatio := strS2I(Session.io.InXY(27, 9, 2, 2, 12, strI2S(Session.User.Security.DLRatio)));
|
ioReset(SecFile, SizeOf(RecSecurity), fmReadWrite + fmDenyNone);
|
||||||
'H' : Session.User.Security.DLKRatio := strS2I(Session.io.InXY(27, 10, 4, 4, 12, strI2S(Session.User.Security.DLKRatio)));
|
|
||||||
'I' : Session.User.Security.PCRatio := strS2I(Session.io.InXY(27, 11, 4, 4, 12, strI2S(Session.User.Security.PCRatio)));
|
For Count := 1 to 255 Do Begin
|
||||||
'J' : Begin
|
ioRead (SecFile, Sec);
|
||||||
Session.io.OutRaw ('Jump to (1-255): ');
|
|
||||||
A := strS2I(Session.io.GetInput(3, 3, 12, ''));
|
If Not HideMode Then
|
||||||
If (A > 0) and (A < 256) Then Begin
|
List.Add(strPadR(strI2S(Count), 5, ' ') + Sec.Desc, 0)
|
||||||
Seek (Session.User.SecurityFile, FilePos(Session.User.SecurityFile)-1);
|
Else
|
||||||
Write (Session.User.SecurityFile, Session.User.Security);
|
If Sec.Desc <> '' Then
|
||||||
Seek (Session.User.SecurityFile, A-1);
|
List.Add(strPadR(strI2S(Count), 5, ' ') + Sec.Desc, 0);
|
||||||
Read (Session.User.SecurityFile, Session.User.Security);
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
|
||||||
'K' : EditAccessFlags(Session.User.Security.AF1);
|
Var
|
||||||
'L' : EditAccessFlags(Session.User.Security.AF2);
|
Count : Byte;
|
||||||
'M' : Session.User.Security.Hard := Not Session.User.Security.Hard;
|
Begin
|
||||||
'N' : Session.User.Security.StartMenu := Session.io.InXY(27, 17, 8, 8, 11, Session.User.Security.startmenu);
|
HideMode := True;
|
||||||
'Q' : Break;
|
|
||||||
End;
|
Assign (SecFile, Config.DataPath + 'security.dat');
|
||||||
Until False;
|
|
||||||
Seek (Session.User.SecurityFile, FilePos(Session.User.SecurityFile)-1);
|
If Not ioReset(SecFile, SizeOf(RecSecurity), fmReadWrite + fmDenyNone) Then Begin
|
||||||
Write (Session.User.SecurityFile, Session.User.Security);
|
ReWrite (SecFile, SizeOf(RecSecurity));
|
||||||
Close (Session.User.SecurityFile);
|
For Count := 1 to 255 Do ioWrite (SecFile, Sec);
|
||||||
Session.User.Security := Old;
|
End;
|
||||||
|
|
||||||
|
Box := TAnsiMenuBox.Create;
|
||||||
|
List := TAnsiMenuList.Create;
|
||||||
|
|
||||||
|
Box.Header := ' Security Levels ';
|
||||||
|
List.LoChars := #13#27#47;
|
||||||
|
List.NoWindow := True;
|
||||||
|
|
||||||
|
Box.Open (21, 5, 59, 20);
|
||||||
|
|
||||||
|
WriteXY (23, 6, 112, 'Lvl Description');
|
||||||
|
WriteXY (22, 7, 112, strRep('Ä', 37));
|
||||||
|
WriteXY (22, 18, 112, strRep('Ä', 37));
|
||||||
|
WriteXY (29, 19, 112, cfgCommandList);
|
||||||
|
|
||||||
|
Repeat
|
||||||
|
MakeList;
|
||||||
|
|
||||||
|
If HideMode and (List.ListMax = 0) Then Begin
|
||||||
|
HideMode := False;
|
||||||
|
MakeList;
|
||||||
|
End;
|
||||||
|
|
||||||
|
List.Open (21, 7, 59, 18);
|
||||||
|
List.Close;
|
||||||
|
|
||||||
|
Case List.ExitCode of
|
||||||
|
'/' : Case GetCommandOption(11, 'T-Toggle Hide|') of
|
||||||
|
'T' : HideMode := Not HideMode;
|
||||||
|
End;
|
||||||
|
#13 : Begin
|
||||||
|
Count := strS2I(Copy(List.List[List.Picked]^.Name, 1, 3));
|
||||||
|
If Edit Then
|
||||||
|
Edit_Level(Count)
|
||||||
|
Else Begin
|
||||||
|
Result := Count;
|
||||||
|
Break;
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
#27 : Begin
|
||||||
|
Result := -1;
|
||||||
|
Break;
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
Until False;
|
||||||
|
|
||||||
|
Close (SecFile);
|
||||||
|
|
||||||
|
Box.Close;
|
||||||
|
Box.Free;
|
||||||
|
List.Free;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
|
|
@ -231,7 +231,7 @@ Begin
|
||||||
'?' : Begin
|
'?' : Begin
|
||||||
// online ANSI help system (BBSHTML) prototype
|
// online ANSI help system (BBSHTML) prototype
|
||||||
Help := TAnsiMenuHelp.Create;
|
Help := TAnsiMenuHelp.Create;
|
||||||
Help.OpenHelp (1, 1, 79, 23, Session.Lang.TextPath + Data, 'INDEX');
|
Help.OpenHelp (Session.Lang.TextPath + Data + ';ansihelp;INDEX');
|
||||||
Help.Free;
|
Help.Free;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -319,7 +319,7 @@ Begin
|
||||||
'E' : Event_Editor;
|
'E' : Event_Editor;
|
||||||
'F' : Configuration_ExecuteEditor('F');
|
'F' : Configuration_ExecuteEditor('F');
|
||||||
'G' : Configuration_ExecuteEditor('G');
|
'G' : Configuration_ExecuteEditor('G');
|
||||||
'L' : Levels_Editor;
|
'L' : Configuration_ExecuteEditor('L');
|
||||||
'M' : Configuration_ExecuteEditor('B');
|
'M' : Configuration_ExecuteEditor('B');
|
||||||
'P' : Configuration_ExecuteEditor('P');
|
'P' : Configuration_ExecuteEditor('P');
|
||||||
'S' : Configuration_MainMenu;
|
'S' : Configuration_MainMenu;
|
||||||
|
|
|
@ -162,10 +162,12 @@ Begin
|
||||||
|
|
||||||
Assign (MScanFile, MBase.Path + MBase.FileName + '.scn');
|
Assign (MScanFile, MBase.Path + MBase.FileName + '.scn');
|
||||||
{$I-} Reset (MScanFile); {$I+}
|
{$I-} Reset (MScanFile); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then ReWrite (MScanFile);
|
If IoResult <> 0 Then ReWrite (MScanFile);
|
||||||
|
|
||||||
If FileSize(MScanFile) < Session.User.UserNum - 1 Then Begin
|
If FileSize(MScanFile) < Session.User.UserNum - 1 Then Begin
|
||||||
Seek (MScanFile, FileSize(MScanFile));
|
Seek (MScanFile, FileSize(MScanFile));
|
||||||
|
|
||||||
For Count := FileSize(MScanFile) to Session.User.UserNum - 1 Do
|
For Count := FileSize(MScanFile) to Session.User.UserNum - 1 Do
|
||||||
Write (MScanFile, Temp);
|
Write (MScanFile, Temp);
|
||||||
End;
|
End;
|
||||||
|
@ -182,6 +184,7 @@ Begin
|
||||||
|
|
||||||
Assign (MScanFile, MBase.Path + MBase.FileName + '.scn');
|
Assign (MScanFile, MBase.Path + MBase.FileName + '.scn');
|
||||||
{$I-} Reset (MScanFile); {$I+}
|
{$I-} Reset (MScanFile); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then Exit;
|
If IoResult <> 0 Then Exit;
|
||||||
|
|
||||||
If FileSize(MScanFile) >= Session.User.UserNum Then Begin {filesize and usernum are }
|
If FileSize(MScanFile) >= Session.User.UserNum Then Begin {filesize and usernum are }
|
||||||
|
@ -381,6 +384,7 @@ Begin
|
||||||
If Not Compress Then Begin
|
If Not Compress Then Begin
|
||||||
Seek (MBaseFile, A - 1);
|
Seek (MBaseFile, A - 1);
|
||||||
Read (MBaseFile, MBase);
|
Read (MBaseFile, MBase);
|
||||||
|
|
||||||
If Not Session.User.Access(MBase.ListACS) Then Begin
|
If Not Session.User.Access(MBase.ListACS) Then Begin
|
||||||
MBase := Old;
|
MBase := Old;
|
||||||
Close (MBaseFile);
|
Close (MBaseFile);
|
||||||
|
|
|
@ -100,6 +100,7 @@ Begin
|
||||||
|
|
||||||
If Session.EventExit or Session.EventRunAfter Then Begin
|
If Session.EventExit or Session.EventRunAfter Then Begin
|
||||||
Reset (Session.EventFile);
|
Reset (Session.EventFile);
|
||||||
|
|
||||||
While Not Eof(Session.EventFile) Do Begin
|
While Not Eof(Session.EventFile) Do Begin
|
||||||
Read (Session.EventFile, Session.Event);
|
Read (Session.EventFile, Session.Event);
|
||||||
|
|
||||||
|
@ -229,6 +230,21 @@ Begin
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Assign (Session.User.UserFile, Config.DataPath + 'users.dat');
|
||||||
|
{$I-} Reset (Session.User.UserFile); {$I+}
|
||||||
|
|
||||||
|
If IoResult <> 0 Then Begin
|
||||||
|
If FileExist(Config.DataPath + 'users.dat') Then Begin
|
||||||
|
Screen.WriteLine ('ERROR: Unable to access USERS.DAT');
|
||||||
|
DisposeClasses;
|
||||||
|
Halt(1);
|
||||||
|
End;
|
||||||
|
|
||||||
|
ReWrite(Session.User.UserFile);
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (Session.User.UserFile);
|
||||||
|
|
||||||
If Session.ConfigMode Then Exit;
|
If Session.ConfigMode Then Exit;
|
||||||
|
|
||||||
CheckDIR (Config.SystemPath);
|
CheckDIR (Config.SystemPath);
|
||||||
|
@ -250,19 +266,6 @@ Begin
|
||||||
End;
|
End;
|
||||||
Close (RoomFile);
|
Close (RoomFile);
|
||||||
|
|
||||||
Assign (Session.User.UserFile, Config.DataPath + 'users.dat');
|
|
||||||
{$I-} Reset (Session.User.UserFile); {$I+}
|
|
||||||
If IoResult <> 0 Then Begin
|
|
||||||
If FileExist(Config.DataPath + 'users.dat') Then Begin
|
|
||||||
Screen.WriteLine ('ERROR: Unable to access USERS.DAT');
|
|
||||||
DisposeClasses;
|
|
||||||
Halt(1);
|
|
||||||
End;
|
|
||||||
ReWrite(Session.User.UserFile);
|
|
||||||
End;
|
|
||||||
|
|
||||||
Close (Session.User.UserFile);
|
|
||||||
|
|
||||||
Assign (Session.FileBase.FBaseFile, Config.DataPath + 'fbases.dat');
|
Assign (Session.FileBase.FBaseFile, Config.DataPath + 'fbases.dat');
|
||||||
{$I-} Reset(Session.FileBase.FBaseFile); {$I+}
|
{$I-} Reset(Session.FileBase.FBaseFile); {$I+}
|
||||||
If IoResult <> 0 Then ReWrite(Session.FileBase.FBaseFile);
|
If IoResult <> 0 Then ReWrite(Session.FileBase.FBaseFile);
|
||||||
|
|
|
@ -348,13 +348,13 @@ Type
|
||||||
(* SECURITY.DAT in the data directory holds 255 records, one for each *)
|
(* SECURITY.DAT in the data directory holds 255 records, one for each *)
|
||||||
(* possible security level. *)
|
(* possible security level. *)
|
||||||
|
|
||||||
RecSecurity = Record { SECURITY.DAT }
|
RecSecurity = Record { SECURITY.DAT }
|
||||||
Desc : String[30]; { Description of security level }
|
Desc : String[30]; { Description of security level }
|
||||||
Time : SmallInt; { Time online (mins) per day }
|
Time : Word; { Time online (mins) per day }
|
||||||
MaxCalls : SmallInt; { Max calls per day }
|
MaxCalls : Word; { Max calls per day }
|
||||||
MaxDLs : SmallInt; { Max downloads per day }
|
MaxDLs : Word; { Max downloads per day }
|
||||||
MaxDLk : SmallInt; { Max download kilobytes per day }
|
MaxDLk : Word; { Max download kilobytes per day }
|
||||||
MaxTB : SmallInt; { Max mins allowed in time bank }
|
MaxTB : Word; { Max mins allowed in time bank }
|
||||||
DLRatio : Byte; { Download ratio (# of DLs per UL) }
|
DLRatio : Byte; { Download ratio (# of DLs per UL) }
|
||||||
DLKRatio : SmallInt; { DL K ratio (# of DLed K per UL K }
|
DLKRatio : SmallInt; { DL K ratio (# of DLed K per UL K }
|
||||||
AF1 : AccessFlagType; { Access flags for this level A-Z }
|
AF1 : AccessFlagType; { Access flags for this level A-Z }
|
||||||
|
|
Loading…
Reference in New Issue