Category : BBS Programs+Doors
Archive   : FREETIME.ZIP
Filename : FREETIME.MOD

 
Output of file : FREETIME.MOD contained in archive : FREETIME.ZIP

Extract from : '\LIMELITE\LIBRARY\TELECOM\FREETIME.LZH'
<<< FREETIME.PAS >>>
Program FreeTime;
Uses DOS, MyProcs;

Type
FlagType = Array[1..4] of Byte;

SysInfoRecord = Record { Used in the SYSINFO.BBS file }
CallCount: LongInt;
LastCaller: String[35];
ExtraSpace: Array[1..128] of Byte;
End;

TimeLogRecord = Record { Used in the TIMELOG.BBS file }
StartDate: String[8];
BusyPerHour: Array[0..23] of Integer;
BusyPerDay: Array[0..6] of Integer;
End;

EventRecord = Record { Part of Configuration Record }
Status: Byte; { 0=Deleted 1=Enabled 2=Disabled }
RunTime: String[5];
ErrorLevel: Byte;
Days: Byte;
Forced: Boolean;
LastTimeRun: String[8];
End;

UserRecord = Record { Used in the USERS.BBS File and passed to Exitinfo.BBS }
Name: String[35];
City: String[25];
Pwd: String[15];
DataPhone,
HomePhone: String[12];
LastTime: String[5];
LastDate: String[8];
Attrib: Byte;
Flags: FlagType;
Credit,
Pending,
TimesPosted,
HighMsgRead,
SecLvl,
Times,
Ups,
Downs,
UpK,
DownK,
TodayK,
Elapsed,
Len: Integer;
ExtraSpace: Array[1..8] of Byte;
End;

ExitRecord = Record { Used for the EXITINFO.BBS file }
BaudRate: Integer;
SysInfo: SysInfoRecord;
TimeLogInfo: TimeLogRecord;
UserInfo: UserRecord;
EventInfo: EventRecord;
NetMailEntered: Boolean;
EchoMailEntered: Boolean;
LoginTime: String[5];
LoginDate: String[8];
TmLimit: Integer;
LoginSec: LongInt;
Credit: LongInt;
UserRecNum: Integer;
ReadThru: Integer;
PageTimes: Integer;
DownLimit: Integer;
End;

TimeRecord = Record
StartHour,StartMin,StartSec : word;
End;

Var
TimeFile : file of TimeRecord;
ExitFile : file of ExitRecord;
TimeRec : TimeRecord;
ExitRec : ExitRecord;
Option : string[3];
Hour, Min, Sec, Sec100, ExtraMin, ExtraSec : word;
code : integer;

Begin
if (ParamCount < 1) AND ( ( UpString(ParamStr(1)) <> 'ON' ) OR
( UpString(ParamStr(1)) <> 'OFF') ) then
begin
writeln('Syntax: FreeTime [ON/OFF]');
Halt;
end;
assign(ExitFile,'ExitInfo.BBS');
assign(TimeFile,'FreeTime.Dat');
GetTime(Hour,Min,Sec,Sec100);
Option := UpString(ParamStr(1));
if Option = 'ON' then
begin
TimeRec.StartHour:= Hour;
TimeRec.StartMin := Min;
TimeRec.StartSec := Sec;
rewrite(TimeFile);
write(TimeFile,TimeRec);
close(TimeFile);
writeln('FreeTime - ON');
writeln('Current Start Time - ',Hour,':',Min,':',Sec);
end
else
if Option = 'OFF' then
begin
{$I-}
reset(TimeFile);
{$I+}
if IOResult <> 0 then
begin
writeln('FreeTime.Dat File NOT found!');
Halt;
end;
read(TimeFile,TimeRec);
close(TimeFile);
erase(TimeFile);
GetTime(Hour,Min,Sec,Sec100);
if Min < TimeRec.StartMin then

begin
dec(Hour);
Min := Min+60;
end;
if Sec < TimeRec.StartSec then
begin
dec(Min);
Sec := Sec+60;
end;
ExtraMin := Min-TimeRec.StartMin;
ExtraSec := Sec-TimeRec.StartSec;
if (ExtraMin > 0) OR (ExtraSec > 0) then
begin
{$I-}
reset(ExitFile);
{$I+}
if IOResult <> 0 then
begin
writeln('ExitInfo.BBS File NOT found!');
Halt;
end;
read(ExitFile,ExitRec);
ExitRec.LoginSec := ExitRec.LoginSec+longInt(ExtraMin*60);
ExitRec.LoginSec := ExitRec.LoginSec+longInt(ExtraSec);
if ExitRec.LoginSec > 86400 then
ExitRec.LoginSec := ExitRec.LoginSec-86400;
rewrite(ExitFile);
write(ExitFile,ExitRec);
close(ExitFile);
writeln('Thanks for using FreeTime! Chris Hall (1:301/2)');
writeln('Minutes Saved : ',ExtraMin,':',ExtraSec);
end;
end;
end.



  3 Responses to “Category : BBS Programs+Doors
Archive   : FREETIME.ZIP
Filename : FREETIME.MOD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/