History now tracks hour of call

This commit is contained in:
mysticbbs 2012-08-21 17:56:40 -04:00
parent fe3aa80e76
commit 6eabef81b8
2 changed files with 9 additions and 3 deletions

View File

@ -75,6 +75,7 @@ Type
HistoryDLKB : LongInt;
HistoryULs : Word;
HistoryULKB : LongInt;
HistoryHour : SmallInt;
PromptFile : File of RecPrompt;
Prompt : RecPrompt;
@ -107,6 +108,7 @@ Begin
HistoryDLKB := 0;
HistoryULs := 0;
HistoryULKB := 0;
HistoryHour := 0;
ShutDown := False;
CommHandle := -1;
LocalMode := False;
@ -167,9 +169,9 @@ Begin
If User.ThisUser.Flags AND UserNoHistory <> 0 Then Exit;
Assign (HistoryFile, Config.DataPath + 'history.dat');
ioReset (HistoryFile, SizeOf(RecHistory), fmRWDN);
If IoResult <> 0 Then ioReWrite(HistoryFile, SizeOf(RecHistory), fmRWDW);
If Not ioReset (HistoryFile, SizeOf(RecHistory), fmRWDN) Then
ioReWrite(HistoryFile, SizeOf(RecHistory), fmRWDW);
History.Date := CurDateDos;
@ -199,6 +201,8 @@ Begin
If User.ThisUser.Calls = 1 Then Inc (History.NewUsers, 1);
Inc (History.Hourly[HistoryHour]);
ioWrite (HistoryFile, History);
Close (HistoryFile);
End;

View File

@ -1184,6 +1184,8 @@ Begin
Session.systemLog ('-');
Session.SystemLog ('Connect from ' + Session.UserIPInfo + ' (' + Session.UserHostInfo + ')');
Session.HistoryHour := strS2I(Copy(TimeDos2Str(CurDateDos, False), 1, 2));
If Config.SystemPW <> '' Then
If Not Session.io.GetPW(Session.GetPrompt(4), Session.GetPrompt(417), Config.SystemPW) Then Begin
Session.io.OutFile ('closed', True, 0);