BBS History and Last Callers revamp. Prep for A11 release
This commit is contained in:
parent
5d38954fe6
commit
55301cd6ea
|
@ -13,6 +13,33 @@ Uses
|
||||||
{$I RECORDS.PAS}
|
{$I RECORDS.PAS}
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
OldLastOnRec = Record { CALLERS.DAT }
|
||||||
|
Handle : String[30]; { User's Name }
|
||||||
|
City : String[25]; { City/State }
|
||||||
|
Address : String[30]; { user's address }
|
||||||
|
Baud : String[6]; { Baud Rate }
|
||||||
|
DateTime : LongInt; { Date & Time (UNIX) }
|
||||||
|
Node : Byte; { Node number of login }
|
||||||
|
CallNum : LongInt; { Caller Number }
|
||||||
|
EmailAddr : String[35]; { email address }
|
||||||
|
UserInfo : String[30]; { user info field }
|
||||||
|
Option1 : String[35]; { optional data 1 }
|
||||||
|
Option2 : String[35]; { " " 2 }
|
||||||
|
Option3 : String[35]; { " " 3 }
|
||||||
|
End;
|
||||||
|
|
||||||
|
OldHistoryRec = Record
|
||||||
|
Date : LongInt;
|
||||||
|
Emails : Word;
|
||||||
|
Posts : Word;
|
||||||
|
Downloads : Word;
|
||||||
|
Uploads : Word;
|
||||||
|
DownloadKB : LongInt;
|
||||||
|
UploadKB : LongInt;
|
||||||
|
Calls : LongInt;
|
||||||
|
NewUsers : Word;
|
||||||
|
End;
|
||||||
|
|
||||||
OldPercentRec = Record // percentage bar record
|
OldPercentRec = Record // percentage bar record
|
||||||
BarLen : Byte;
|
BarLen : Byte;
|
||||||
LoChar : Char;
|
LoChar : Char;
|
||||||
|
@ -708,11 +735,11 @@ Begin
|
||||||
User.Gender := Gender;
|
User.Gender := Gender;
|
||||||
User.Email := EmailAddr;
|
User.Email := EmailAddr;
|
||||||
|
|
||||||
FillChar (User.Optional, SizeOf(User.Optional), #0);
|
FillChar (User.OptionData, SizeOf(User.OptionData), #0);
|
||||||
|
|
||||||
User.Optional[1] := Option1;
|
User.OptionData[1] := Option1;
|
||||||
User.Optional[2] := Option2;
|
User.OptionData[2] := Option2;
|
||||||
User.Optional[3] := Option3;
|
User.OptionData[3] := Option3;
|
||||||
|
|
||||||
User.UserInfo := UserInfo;
|
User.UserInfo := UserInfo;
|
||||||
User.Theme := Language;
|
User.Theme := Language;
|
||||||
|
@ -729,7 +756,7 @@ Begin
|
||||||
User.ScreenSize := ScrnPause;
|
User.ScreenSize := ScrnPause;
|
||||||
User.ScreenCols := 80;
|
User.ScreenCols := 80;
|
||||||
User.PeerIP := '';
|
User.PeerIP := '';
|
||||||
User.PeerName := '';
|
User.PeerHost := '';
|
||||||
User.FirstOn := FirstOn;
|
User.FirstOn := FirstOn;
|
||||||
User.LastOn := LastOn;
|
User.LastOn := LastOn;
|
||||||
User.Calls := Calls;
|
User.Calls := Calls;
|
||||||
|
@ -1120,6 +1147,100 @@ Begin
|
||||||
DeleteFile (Config.DataPath + 'fbases.old');
|
DeleteFile (Config.DataPath + 'fbases.old');
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Procedure ConvertHistory;
|
||||||
|
Var
|
||||||
|
Hist : RecHistory;
|
||||||
|
HistFile : File of RecHistory;
|
||||||
|
OldHist : OldHistoryRec;
|
||||||
|
OldHistFile : File of OldHistoryRec;
|
||||||
|
Begin
|
||||||
|
WriteLn ('[-] Updating BBS history...');
|
||||||
|
|
||||||
|
If Not ReNameFile(Config.DataPath + 'history.dat', Config.DataPath + 'history.old') Then Begin
|
||||||
|
WriteLn('[!] UNABLE TO FIND: ' + Config.DataPath + 'history.dat');
|
||||||
|
Exit;
|
||||||
|
End;
|
||||||
|
|
||||||
|
Assign (OldHistFile, Config.DataPath + 'history.old');
|
||||||
|
Reset (OldHistFile);
|
||||||
|
|
||||||
|
Assign (HistFile, Config.DataPath + 'history.dat');
|
||||||
|
ReWrite (HistFile);
|
||||||
|
|
||||||
|
While Not Eof(OldHistFile) Do Begin
|
||||||
|
Read (OldHistFile, OldHist);
|
||||||
|
|
||||||
|
FillChar(Hist, SizeOf(Hist), 0);
|
||||||
|
|
||||||
|
Hist.Date := OldHist.Date;
|
||||||
|
Hist.Emails := OldHist.Emails;
|
||||||
|
Hist.Posts := OldHist.Posts;
|
||||||
|
Hist.Downloads := OldHist.Downloads;
|
||||||
|
Hist.Uploads := OldHist.Uploads;
|
||||||
|
Hist.DownloadKB := OldHIst.DownloadKB;
|
||||||
|
Hist.UploadKB := OldHIst.UploadKB;
|
||||||
|
Hist.Calls := OldHist.Calls;
|
||||||
|
Hist.NewUsers := OldHist.NewUsers;
|
||||||
|
|
||||||
|
Write (HistFile, Hist);
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (HIstFile);
|
||||||
|
Close (OldHistFile);
|
||||||
|
|
||||||
|
DeleteFile (Config.DataPath + 'history.old');
|
||||||
|
End;
|
||||||
|
|
||||||
|
Procedure ConvertLastOn;
|
||||||
|
Var
|
||||||
|
Last : RecLastOn;
|
||||||
|
LastFile : File of RecLastOn;
|
||||||
|
OldLast : OldLastOnRec;
|
||||||
|
OldLastFile : File of OldLastOnRec;
|
||||||
|
Begin
|
||||||
|
WriteLn ('[-] Updating last callers...');
|
||||||
|
|
||||||
|
If Not ReNameFile(Config.DataPath + 'callers.dat', Config.DataPath + 'callers.old') Then Begin
|
||||||
|
WriteLn('[!] UNABLE TO FIND: ' + Config.DataPath + 'callers.dat');
|
||||||
|
Exit;
|
||||||
|
End;
|
||||||
|
|
||||||
|
Assign (OldLastFile, Config.DataPath + 'callers.old');
|
||||||
|
Reset (OldLastFile);
|
||||||
|
|
||||||
|
Assign (LastFile, Config.DataPath + 'callers.dat');
|
||||||
|
ReWrite (LastFile);
|
||||||
|
|
||||||
|
While Not Eof(OldLastFile) Do Begin
|
||||||
|
Read (OldLastFile, OldLast);
|
||||||
|
|
||||||
|
FillChar(Last, SizeOf(Last), 0);
|
||||||
|
|
||||||
|
With OldLast Do Begin
|
||||||
|
Last.DateTime := DateTime;
|
||||||
|
Last.Node := Node;
|
||||||
|
Last.CallNum := CallNum;
|
||||||
|
Last.Handle := Handle;
|
||||||
|
Last.City := City;
|
||||||
|
Last.Address := Address;
|
||||||
|
Last.Gender := '?';
|
||||||
|
Last.EmailAddr := EmailAddr;
|
||||||
|
Last.UserInfo := UserInfo;
|
||||||
|
Last.OptionData[1] := Option1;
|
||||||
|
Last.OptionData[2] := Option2;
|
||||||
|
Last.OptionData[3] := Option3;
|
||||||
|
End;
|
||||||
|
|
||||||
|
Write (LastFile, Last);
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (LastFile);
|
||||||
|
Close (OldLastFile);
|
||||||
|
|
||||||
|
DeleteFile (Config.DataPath + 'callers.old');
|
||||||
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure ConvertMessageBases;
|
Procedure ConvertMessageBases;
|
||||||
Var
|
Var
|
||||||
MBase : RecMessageBase;
|
MBase : RecMessageBase;
|
||||||
|
@ -1191,23 +1312,26 @@ Begin
|
||||||
WarningDisplay;
|
WarningDisplay;
|
||||||
|
|
||||||
//COMMENT this out if mystic.dat is being converted:
|
//COMMENT this out if mystic.dat is being converted:
|
||||||
Assign (ConfigFile, 'mystic.dat');
|
// Assign (ConfigFile, 'mystic.dat');
|
||||||
Reset (ConfigFile);
|
// Reset (ConfigFile);
|
||||||
Read (ConfigFile, Config);
|
// Read (ConfigFile, Config);
|
||||||
Close (ConfigFile);
|
// Close (ConfigFile);
|
||||||
|
|
||||||
// ConvertConfig; //1.10a11
|
ConvertConfig; //1.10a11
|
||||||
// ConvertUsers; //1.10a11
|
ConvertUsers; //1.10a11
|
||||||
//ConvertSecurity; //1.10a11
|
ConvertSecurity; //1.10a11
|
||||||
//ConvertFileLists; //1.10a11
|
ConvertFileLists; //1.10a11
|
||||||
//ConvertFileBases; //1.10a11
|
ConvertFileBases; //1.10a11
|
||||||
//ConvertMessageBases; //1.10a11
|
ConvertMessageBases; //1.10a11
|
||||||
//ConvertThemes; //1.10a11
|
ConvertThemes; //1.10a11
|
||||||
|
ConvertHistory; //1.10a11
|
||||||
|
ConvertLastOn; //1.10a11
|
||||||
|
|
||||||
// ConvertArchives; //1.10a1
|
// ConvertArchives; //1.10a1
|
||||||
// ConvertGroups; //1.10a1
|
// ConvertGroups; //1.10a1
|
||||||
|
|
||||||
PurgeDataWildcard('*.lng');
|
PurgeDataWildcard('*.lng');
|
||||||
|
PurgeDataWildcard('node*.dat');
|
||||||
|
|
||||||
TextAttr := 12;
|
TextAttr := 12;
|
||||||
WriteLn;
|
WriteLn;
|
||||||
|
|
|
@ -3974,3 +3974,10 @@
|
||||||
3) Prompts within a prompt file no longer has to be in numerical order.
|
3) Prompts within a prompt file no longer has to be in numerical order.
|
||||||
More to come on why this change is being made, but generally this
|
More to come on why this change is being made, but generally this
|
||||||
allows you to categorize prompts.
|
allows you to categorize prompts.
|
||||||
|
|
||||||
|
+ Mystic now saves the last known IP and hostname from each user.
|
||||||
|
|
||||||
|
+ Revamped last caller information. It now saves the IP, Hostname,
|
||||||
|
Gender, and if the user was a new user or not. In addition, it will now
|
||||||
|
save all 10 custom user questions (not implemented yet).
|
||||||
|
|
||||||
|
|
|
@ -169,13 +169,13 @@ Begin
|
||||||
Session.io.OutRawLn ('J. E-mail ' + strPadR(Session.User.TempUser.Email, 32, ' ') +
|
Session.io.OutRawLn ('J. E-mail ' + strPadR(Session.User.TempUser.Email, 32, ' ') +
|
||||||
'5. Mail Index ' + Session.io.OutYN(Session.User.TempUser.UseLBMIdx));
|
'5. Mail Index ' + Session.io.OutYN(Session.User.TempUser.UseLBMIdx));
|
||||||
|
|
||||||
Session.io.OutRawLn ('K. ' + strPadL(Config.OptionalField[1].Desc, 10, ' ') + ' ' + strPadR(Session.User.TempUser.Optional[1], 32, ' ') +
|
Session.io.OutRawLn ('K. ' + strPadL(Config.OptionalField[1].Desc, 10, ' ') + ' ' + strPadR(Session.User.TempUser.OptionData[1], 32, ' ') +
|
||||||
'6. Time Left ' + strI2S(Session.User.TempUser.TimeLeft));
|
'6. Time Left ' + strI2S(Session.User.TempUser.TimeLeft));
|
||||||
|
|
||||||
Session.io.OutRawLn ('L. ' + strPadL(Config.OptionalField[2].Desc, 10, ' ') + ' ' + strPadR(Session.User.TempUser.Optional[2], 32, ' ') +
|
Session.io.OutRawLn ('L. ' + strPadL(Config.OptionalField[2].Desc, 10, ' ') + ' ' + strPadR(Session.User.TempUser.OptionData[2], 32, ' ') +
|
||||||
'7. Time Bank ' + strI2S(Session.User.TempUser.TimeBank));
|
'7. Time Bank ' + strI2S(Session.User.TempUser.TimeBank));
|
||||||
|
|
||||||
Session.io.OutRawLn ('N. ' + strPadL(Config.OptionalField[3].Desc, 10, ' ') + ' ' + strPadR(Session.User.TempUser.Optional[3], 32, ' ') +
|
Session.io.OutRawLn ('N. ' + strPadL(Config.OptionalField[3].Desc, 10, ' ') + ' ' + strPadR(Session.User.TempUser.OptionData[3], 32, ' ') +
|
||||||
'8. Screen Size ' + strI2S(Session.User.TempUser.ScreenSize));
|
'8. Screen Size ' + strI2S(Session.User.TempUser.ScreenSize));
|
||||||
|
|
||||||
Session.io.OutRawLn ('O. User Note ' + strPadR(Session.User.TempUser.UserInfo, 32, ' ') +
|
Session.io.OutRawLn ('O. User Note ' + strPadR(Session.User.TempUser.UserInfo, 32, ' ') +
|
||||||
|
@ -212,9 +212,9 @@ Begin
|
||||||
'H' : Session.User.TempUser.HomePhone := Session.io.InXY (16, 10, 15, 15, 12, Session.User.TempUser.HomePhone);
|
'H' : Session.User.TempUser.HomePhone := Session.io.InXY (16, 10, 15, 15, 12, Session.User.TempUser.HomePhone);
|
||||||
'I' : Session.User.TempUser.DataPhone := Session.io.InXY (16, 11, 15, 15, 12, Session.User.TempUser.DataPhone);
|
'I' : Session.User.TempUser.DataPhone := Session.io.InXY (16, 11, 15, 15, 12, Session.User.TempUser.DataPhone);
|
||||||
'J' : Session.User.TempUser.Email := Session.io.InXY (16, 12, 30, 35, 11, Session.User.TempUser.Email);
|
'J' : Session.User.TempUser.Email := Session.io.InXY (16, 12, 30, 35, 11, Session.User.TempUser.Email);
|
||||||
'K' : Session.User.TempUser.Optional[1] := Session.io.InXY (16, 13, 30, 35, 11, Session.User.TempUser.Optional[1]);
|
'K' : Session.User.TempUser.OptionData[1] := Session.io.InXY (16, 13, 30, 35, 11, Session.User.TempUser.OptionData[1]);
|
||||||
'L' : Session.User.TempUser.Optional[2] := Session.io.InXY (16, 14, 30, 35, 11, Session.User.TempUser.Optional[2]);
|
'L' : Session.User.TempUser.OptionData[2] := Session.io.InXY (16, 14, 30, 35, 11, Session.User.TempUser.OptionData[2]);
|
||||||
'N' : Session.User.TempUser.Optional[3] := Session.io.InXY (16, 15, 30, 35, 11, Session.User.TempUser.Optional[3]);
|
'N' : Session.User.TempUser.OptionData[3] := Session.io.InXY (16, 15, 30, 35, 11, Session.User.TempUser.OptionData[3]);
|
||||||
'O' : Session.User.TempUser.UserInfo := Session.io.InXY (16, 16, 30, 30, 11, Session.User.TempUser.UserInfo);
|
'O' : Session.User.TempUser.UserInfo := Session.io.InXY (16, 16, 30, 30, 11, Session.User.TempUser.UserInfo);
|
||||||
'P' : Begin
|
'P' : Begin
|
||||||
Session.User.TempUser.Security := strS2I(Session.io.InXY(16, 17, 3, 3, 12, strI2S(Session.User.TempUser.Security)));
|
Session.User.TempUser.Security := strS2I(Session.io.InXY(16, 17, 3, 3, 12, strI2S(Session.User.TempUser.Security)));
|
||||||
|
|
|
@ -41,8 +41,8 @@ Var
|
||||||
Vote : VoteRec;
|
Vote : VoteRec;
|
||||||
Chat : ChatRec;
|
Chat : ChatRec;
|
||||||
Room : RoomRec;
|
Room : RoomRec;
|
||||||
LastOnFile : File of LastOnRec;
|
LastOnFile : File of RecLastOn;
|
||||||
LastOn : LastOnRec;
|
LastOn : RecLastOn;
|
||||||
Config : RecConfig;
|
Config : RecConfig;
|
||||||
StatusPtr : Byte = 1;
|
StatusPtr : Byte = 1;
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ Type
|
||||||
TimeChecked : Boolean;
|
TimeChecked : Boolean;
|
||||||
ConfigMode : Boolean;
|
ConfigMode : Boolean;
|
||||||
InUserEdit : Boolean;
|
InUserEdit : Boolean;
|
||||||
HistoryFile : File of HistoryRec;
|
HistoryFile : File of RecHistory;
|
||||||
HistoryEmails : Word;
|
HistoryEmails : Word;
|
||||||
HistoryPosts : Word;
|
HistoryPosts : Word;
|
||||||
HistoryDLs : Word;
|
HistoryDLs : Word;
|
||||||
|
@ -142,12 +142,12 @@ End;
|
||||||
|
|
||||||
Procedure TBBSCore.UpdateHistory;
|
Procedure TBBSCore.UpdateHistory;
|
||||||
Var
|
Var
|
||||||
History : HistoryRec;
|
History : RecHistory;
|
||||||
Begin
|
Begin
|
||||||
Assign (HistoryFile, Config.DataPath + 'history.dat');
|
Assign (HistoryFile, Config.DataPath + 'history.dat');
|
||||||
ioReset (HistoryFile, SizeOf(HistoryRec), fmRWDW);
|
ioReset (HistoryFile, SizeOf(RecHistory), fmRWDW);
|
||||||
|
|
||||||
If IoResult <> 0 Then ioReWrite(HistoryFile, SizeOf(HistoryRec), fmRWDW);
|
If IoResult <> 0 Then ioReWrite(HistoryFile, SizeOf(RecHistory), fmRWDW);
|
||||||
|
|
||||||
History.Date := CurDateDos;
|
History.Date := CurDateDos;
|
||||||
|
|
||||||
|
|
|
@ -434,9 +434,9 @@ Begin
|
||||||
Session.io.PromptInfo[7] := strI2S(DaysAgo(TempUser.Birthday) DIV 365);
|
Session.io.PromptInfo[7] := strI2S(DaysAgo(TempUser.Birthday) DIV 365);
|
||||||
Session.io.PromptInfo[8] := TempUser.Email;
|
Session.io.PromptInfo[8] := TempUser.Email;
|
||||||
Session.io.PromptInfo[9] := TempUser.UserInfo;
|
Session.io.PromptInfo[9] := TempUser.UserInfo;
|
||||||
Session.io.PromptInfo[10] := TempUser.Optional[1];
|
Session.io.PromptInfo[10] := TempUser.OptionData[1];
|
||||||
Session.io.PromptInfo[11] := TempUser.Optional[2];
|
Session.io.PromptInfo[11] := TempUser.OptionData[2];
|
||||||
Session.io.PromptInfo[12] := TempUser.Optional[3];
|
Session.io.PromptInfo[12] := TempUser.OptionData[3];
|
||||||
|
|
||||||
If (Data = '') or (Pos(Data, strUpper(TempUser.Handle)) > 0) Then Begin
|
If (Data = '') or (Pos(Data, strUpper(TempUser.Handle)) > 0) Then Begin
|
||||||
Session.io.OutFullLn (Session.GetPrompt(30));
|
Session.io.OutFullLn (Session.GetPrompt(30));
|
||||||
|
@ -471,14 +471,13 @@ Begin
|
||||||
Session.io.PromptInfo[3] := LastOn.City;
|
Session.io.PromptInfo[3] := LastOn.City;
|
||||||
Session.io.PromptInfo[4] := DateDos2Str(LastOn.DateTime, Session.User.ThisUser.DateType);
|
Session.io.PromptInfo[4] := DateDos2Str(LastOn.DateTime, Session.User.ThisUser.DateType);
|
||||||
Session.io.PromptInfo[5] := TimeDos2Str(LastOn.DateTime, True);
|
Session.io.PromptInfo[5] := TimeDos2Str(LastOn.DateTime, True);
|
||||||
Session.io.PromptInfo[6] := LastOn.Baud;
|
|
||||||
Session.io.PromptInfo[7] := strI2S(LastOn.CallNum);
|
Session.io.PromptInfo[7] := strI2S(LastOn.CallNum);
|
||||||
Session.io.PromptInfo[8] := LastOn.Address;
|
Session.io.PromptInfo[8] := LastOn.Address;
|
||||||
Session.io.PromptInfo[9] := LastOn.UserInfo;
|
Session.io.PromptInfo[9] := LastOn.UserInfo;
|
||||||
Session.io.PromptInfo[10] := LastOn.EmailAddr;
|
Session.io.PromptInfo[10] := LastOn.EmailAddr;
|
||||||
Session.io.PromptInfo[11] := LastOn.Option1;
|
Session.io.PromptInfo[11] := LastOn.OptionData[1];
|
||||||
Session.io.PromptInfo[12] := LastOn.Option2;
|
Session.io.PromptInfo[12] := LastOn.OptionData[2];
|
||||||
Session.io.PromptInfo[13] := LastOn.Option3;
|
Session.io.PromptInfo[13] := LastOn.OptionData[3];
|
||||||
|
|
||||||
Session.io.OutFullLn (Session.GetPrompt(142));
|
Session.io.OutFullLn (Session.GetPrompt(142));
|
||||||
End;
|
End;
|
||||||
|
@ -837,7 +836,7 @@ End;
|
||||||
|
|
||||||
Procedure ShowBBSHistory (LastDays: Word);
|
Procedure ShowBBSHistory (LastDays: Word);
|
||||||
Var
|
Var
|
||||||
Temp : HistoryRec;
|
Temp : RecHistory;
|
||||||
Days : Word;
|
Days : Word;
|
||||||
Begin
|
Begin
|
||||||
Assign (Session.HistoryFile, Config.DataPath + 'history.dat');
|
Assign (Session.HistoryFile, Config.DataPath + 'history.dat');
|
||||||
|
|
|
@ -583,9 +583,9 @@ Begin
|
||||||
End;
|
End;
|
||||||
'U' : Case Code[2] of
|
'U' : Case Code[2] of
|
||||||
'#' : LastMCIValue := strI2S(TBBSCore(Core).User.ThisUser.PermIdx);
|
'#' : LastMCIValue := strI2S(TBBSCore(Core).User.ThisUser.PermIdx);
|
||||||
'1' : LastMCIValue := TBBSCore(Core).User.ThisUser.Optional[1];
|
'1' : LastMCIValue := TBBSCore(Core).User.ThisUser.OptionData[1];
|
||||||
'2' : LastMCIValue := TBBSCore(Core).User.ThisUser.Optional[2];
|
'2' : LastMCIValue := TBBSCore(Core).User.ThisUser.OptionData[2];
|
||||||
'3' : LastMCIValue := TBBSCore(Core).User.ThisUser.Optional[3];
|
'3' : LastMCIValue := TBBSCore(Core).User.ThisUser.OptionData[3];
|
||||||
'A' : LastMCIValue := TBBSCore(Core).User.ThisUser.Address;
|
'A' : LastMCIValue := TBBSCore(Core).User.ThisUser.Address;
|
||||||
'B' : Case TBBSCore(Core).User.ThisUser.FileList of
|
'B' : Case TBBSCore(Core).User.ThisUser.FileList of
|
||||||
0 : LastMCIValue := 'Normal';
|
0 : LastMCIValue := 'Normal';
|
||||||
|
|
|
@ -460,7 +460,7 @@ Begin
|
||||||
Else
|
Else
|
||||||
Session.io.OutFull (Session.GetPrompt(443));
|
Session.io.OutFull (Session.GetPrompt(443));
|
||||||
|
|
||||||
ThisUser.Optional[1] := Session.io.GetInput(35, 35, 11, ThisUser.Optional[1]);
|
ThisUser.OptionData[1] := Session.io.GetInput(35, 35, 11, ThisUser.OptionData[1]);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TBBSUser.GetOption2 (Edit : Boolean);
|
Procedure TBBSUser.GetOption2 (Edit : Boolean);
|
||||||
|
@ -470,7 +470,7 @@ Begin
|
||||||
Else
|
Else
|
||||||
Session.io.OutFull (Session.GetPrompt(445));
|
Session.io.OutFull (Session.GetPrompt(445));
|
||||||
|
|
||||||
ThisUser.Optional[2] := Session.io.GetInput(35, 35, 11, ThisUser.Optional[2]);
|
ThisUser.OptionData[2] := Session.io.GetInput(35, 35, 11, ThisUser.OptionData[2]);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TBBSUser.GetOption3 (Edit : Boolean);
|
Procedure TBBSUser.GetOption3 (Edit : Boolean);
|
||||||
|
@ -480,7 +480,7 @@ Begin
|
||||||
Else
|
Else
|
||||||
Session.io.OutFull (Session.GetPrompt(447));
|
Session.io.OutFull (Session.GetPrompt(447));
|
||||||
|
|
||||||
ThisUser.Optional[3] := Session.io.GetInput(35, 35, 11, ThisUser.Optional[3]);
|
ThisUser.OptionData[3] := Session.io.GetInput(35, 35, 11, ThisUser.OptionData[3]);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TBBSUser.GetEditor (Edit : Boolean);
|
Procedure TBBSUser.GetEditor (Edit : Boolean);
|
||||||
|
@ -971,7 +971,7 @@ End;
|
||||||
|
|
||||||
Procedure TBBSUser.User_Logon3;
|
Procedure TBBSUser.User_Logon3;
|
||||||
Var
|
Var
|
||||||
A : Byte;
|
Count : Byte;
|
||||||
Ch : Char;
|
Ch : Char;
|
||||||
Begin
|
Begin
|
||||||
{$IFDEF LOGGING} Session.SystemLog('Logon3'); {$ENDIF}
|
{$IFDEF LOGGING} Session.SystemLog('Logon3'); {$ENDIF}
|
||||||
|
@ -987,7 +987,7 @@ Begin
|
||||||
Reset (LastOnFile);
|
Reset (LastOnFile);
|
||||||
|
|
||||||
If FileSize(LastOnFile) >= 10 Then
|
If FileSize(LastOnFile) >= 10 Then
|
||||||
KillRecord (LastOnFile, 1, SizeOf(LastOnRec));
|
KillRecord (LastOnFile, 1, SizeOf(RecLastOn));
|
||||||
|
|
||||||
LastOn.Handle := ThisUser.Handle;
|
LastOn.Handle := ThisUser.Handle;
|
||||||
LastOn.City := ThisUser.City;
|
LastOn.City := ThisUser.City;
|
||||||
|
@ -997,14 +997,13 @@ Begin
|
||||||
LastOn.Address := ThisUser.Address;
|
LastOn.Address := ThisUser.Address;
|
||||||
LastOn.EmailAddr := ThisUser.Email;
|
LastOn.EmailAddr := ThisUser.Email;
|
||||||
LastOn.UserInfo := ThisUser.UserInfo;
|
LastOn.UserInfo := ThisUser.UserInfo;
|
||||||
LastOn.Option1 := ThisUser.Optional[1];
|
LastOn.Gender := ThisUser.Gender;
|
||||||
LastOn.Option2 := ThisUser.Optional[2];
|
LastOn.PeerIP := Session.UserIPInfo;
|
||||||
LastOn.Option3 := ThisUser.Optional[3];
|
LastOn.PeerHost := Session.UserHostInfo;
|
||||||
|
LastOn.NewUser := ThisUser.Calls = 0;
|
||||||
|
|
||||||
If Session.LocalMode Then
|
For Count := 1 to 10 Do
|
||||||
LastOn.Baud := 'LOCAL'
|
LastOn.OptionData[Count] := ThisUser.OptionData[Count];
|
||||||
Else
|
|
||||||
LastOn.Baud := 'TELNET';
|
|
||||||
|
|
||||||
Seek (LastOnFile, FileSize(LastOnFile));
|
Seek (LastOnFile, FileSize(LastOnFile));
|
||||||
Write (LastOnFile, LastOn);
|
Write (LastOnFile, LastOn);
|
||||||
|
@ -1017,8 +1016,8 @@ Begin
|
||||||
|
|
||||||
{ this (below) causes runtime 201 when range checking is ON }
|
{ this (below) causes runtime 201 when range checking is ON }
|
||||||
|
|
||||||
For A := 1 to 9 Do
|
For Count := 1 to 9 Do
|
||||||
Session.io.OutFile ('logon' + strI2S(A), True, 0);
|
Session.io.OutFile ('logon' + strI2S(Count), True, 0);
|
||||||
|
|
||||||
Session.io.OutFile ('sl' + strI2S(ThisUser.Security), True, 0);
|
Session.io.OutFile ('sl' + strI2S(ThisUser.Security), True, 0);
|
||||||
|
|
||||||
|
@ -1036,11 +1035,11 @@ Begin
|
||||||
While Not Eof(VoteFile) Do Begin
|
While Not Eof(VoteFile) Do Begin
|
||||||
Read (VoteFile, Vote);
|
Read (VoteFile, Vote);
|
||||||
If Access(Vote.ACS) and Access(Vote.ForceACS) and (ThisUser.Vote[FilePos(VoteFile)] = 0) Then Begin
|
If Access(Vote.ACS) and Access(Vote.ForceACS) and (ThisUser.Vote[FilePos(VoteFile)] = 0) Then Begin
|
||||||
A := FilePos(VoteFile);
|
Count := FilePos(VoteFile);
|
||||||
Close (VoteFile);
|
Close (VoteFile);
|
||||||
Voting_Booth (True, A);
|
Voting_Booth (True, Count);
|
||||||
Reset (VoteFile);
|
Reset (VoteFile);
|
||||||
Seek (VoteFile, A);
|
Seek (VoteFile, Count);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
Close (VoteFile);
|
Close (VoteFile);
|
||||||
|
|
|
@ -58,7 +58,7 @@ Begin
|
||||||
Reset (TF);
|
Reset (TF);
|
||||||
|
|
||||||
If IoResult <> 0 Then Begin
|
If IoResult <> 0 Then Begin
|
||||||
WriteLn ('ERROR: Theme file (' + FName + FExt + ') not found.');
|
WriteLn ('ERROR: Theme file (' + FName + FExt + ') not found');
|
||||||
Halt (1);
|
Halt (1);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ Begin
|
||||||
If IoResult <> 0 Then Begin
|
If IoResult <> 0 Then Begin
|
||||||
WriteLn;
|
WriteLn;
|
||||||
WriteLn;
|
WriteLn;
|
||||||
WriteLn ('ERROR: Cannot run while Mystic is loaded.');
|
WriteLn ('ERROR: Cannot run while Mystic is loaded');
|
||||||
Halt(1);
|
Halt(1);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ Begin
|
||||||
If Count > mysMaxThemeText Then Begin
|
If Count > mysMaxThemeText Then Begin
|
||||||
WriteLn;
|
WriteLn;
|
||||||
WriteLn;
|
WriteLn;
|
||||||
WriteLn ('ERROR: Prompt #', Count, ' was not expected. Theme file not created.');
|
WriteLn ('ERROR: Prompt #', Count, ' was not expected. Theme file not created');
|
||||||
Close (ThemeFile);
|
Close (ThemeFile);
|
||||||
Erase (ThemeFile);
|
Erase (ThemeFile);
|
||||||
Halt(1);
|
Halt(1);
|
||||||
|
@ -107,7 +107,7 @@ Begin
|
||||||
If Found[Count] Then Begin
|
If Found[Count] Then Begin
|
||||||
WriteLn;
|
WriteLn;
|
||||||
WriteLn;
|
WriteLn;
|
||||||
WriteLn ('ERROR: Prompt #', Count, ' was found twice. Theme file not created.');
|
WriteLn ('ERROR: Prompt #', Count, ' was found twice. Theme file not created');
|
||||||
Close (ThemeFile);
|
Close (ThemeFile);
|
||||||
Erase (ThemeFile);
|
Erase (ThemeFile);
|
||||||
Halt (1);
|
Halt (1);
|
||||||
|
@ -128,7 +128,7 @@ Begin
|
||||||
For Count := 0 to mysMaxThemeText Do Begin
|
For Count := 0 to mysMaxThemeText Do Begin
|
||||||
If Not Found[Count] Then Begin
|
If Not Found[Count] Then Begin
|
||||||
WriteLn;
|
WriteLn;
|
||||||
WriteLn (^G'ERROR: Prompt #', Count, ' was not found. Theme file not created.');
|
WriteLn (^G'ERROR: Prompt #', Count, ' was not found. Theme file not created');
|
||||||
Erase (ThemeFile);
|
Erase (ThemeFile);
|
||||||
Halt (1);
|
Halt (1);
|
||||||
End;
|
End;
|
||||||
|
@ -153,7 +153,7 @@ Begin
|
||||||
ReWrite(TF);
|
ReWrite(TF);
|
||||||
|
|
||||||
If IoResult <> 0 Then Begin
|
If IoResult <> 0 Then Begin
|
||||||
WriteLn ('ERROR: Unable to create output file.');
|
WriteLn ('ERROR: Unable to create output file');
|
||||||
Halt(1);
|
Halt(1);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -131,8 +131,8 @@ End;
|
||||||
|
|
||||||
Procedure TFTPServer.UpdateUserStats (TFBase: RecFileBase; FDir: RecFileList; DirPos: LongInt);
|
Procedure TFTPServer.UpdateUserStats (TFBase: RecFileBase; FDir: RecFileList; DirPos: LongInt);
|
||||||
Var
|
Var
|
||||||
HistFile: File of HistoryRec;
|
HistFile: File of RecHistory;
|
||||||
History : HistoryRec;
|
History : RecHistory;
|
||||||
FDirFile: File of RecFileList;
|
FDirFile: File of RecFileList;
|
||||||
UserFile: File of RecUser;
|
UserFile: File of RecUser;
|
||||||
Begin
|
Begin
|
||||||
|
@ -168,7 +168,7 @@ Begin
|
||||||
Close (FDirFile);
|
Close (FDirFile);
|
||||||
|
|
||||||
Assign (HistFile, bbsConfig.DataPath + 'history.dat');
|
Assign (HistFile, bbsConfig.DataPath + 'history.dat');
|
||||||
ioReset (HistFile, SizeOf(HistoryRec), fmReadWrite + fmDenyWrite);
|
ioReset (HistFile, SizeOf(RecHistory), fmReadWrite + fmDenyWrite);
|
||||||
|
|
||||||
If IoResult <> 0 Then ReWrite(HistFile);
|
If IoResult <> 0 Then ReWrite(HistFile);
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,8 @@ Begin
|
||||||
|
|
||||||
If Session.User.UserNum <> -1 Then Begin
|
If Session.User.UserNum <> -1 Then Begin
|
||||||
Session.User.ThisUser.LastOn := CurDateDos;
|
Session.User.ThisUser.LastOn := CurDateDos;
|
||||||
|
Session.User.ThisUser.PeerIP := Session.UserIPInfo;
|
||||||
|
Session.User.ThisUser.PeerHost := Session.UserHostInfo;
|
||||||
|
|
||||||
If Session.TimerOn Then
|
If Session.TimerOn Then
|
||||||
If (Session.TimeOffset > 0) and (Session.TimeSaved > Session.TimeOffset) Then
|
If (Session.TimeOffset > 0) and (Session.TimeSaved > Session.TimeOffset) Then
|
||||||
|
|
|
@ -278,7 +278,7 @@ Type
|
||||||
Birthday : LongInt;
|
Birthday : LongInt;
|
||||||
Gender : Char; { M> Male F> Female }
|
Gender : Char; { M> Male F> Female }
|
||||||
Email : String[60]; { email address }
|
Email : String[60]; { email address }
|
||||||
Optional : Array[1..10] of String[60];
|
OptionData : Array[1..10] of String[60];
|
||||||
UserInfo : String[30]; { user comment field }
|
UserInfo : String[30]; { user comment field }
|
||||||
Theme : String[20]; // user's theme file
|
Theme : String[20]; // user's theme file
|
||||||
AF1 : AccessFlagType;
|
AF1 : AccessFlagType;
|
||||||
|
@ -294,7 +294,7 @@ Type
|
||||||
ScreenSize : Byte; { user's screen length }
|
ScreenSize : Byte; { user's screen length }
|
||||||
ScreenCols : Byte;
|
ScreenCols : Byte;
|
||||||
PeerIP : String[20];
|
PeerIP : String[20];
|
||||||
PeerName : String[50];
|
PeerHost : String[50];
|
||||||
FirstOn : LongInt; { Date/Time of First Call }
|
FirstOn : LongInt; { Date/Time of First Call }
|
||||||
LastOn : LongInt; { Date/Time of Last Call }
|
LastOn : LongInt; { Date/Time of Last Call }
|
||||||
Calls : LongInt; { Number of calls to BBS }
|
Calls : LongInt; { Number of calls to BBS }
|
||||||
|
@ -671,22 +671,24 @@ Type
|
||||||
(* file is always 10 records long with the most recent caller being the *)
|
(* file is always 10 records long with the most recent caller being the *)
|
||||||
(* 10th record. *)
|
(* 10th record. *)
|
||||||
|
|
||||||
LastOnRec = Record { CALLERS.DAT }
|
RecLastOn = Record // CALLERS.DAT
|
||||||
Handle : String[30]; { User's Name }
|
DateTime : LongInt;
|
||||||
City : String[25]; { City/State }
|
NewUser : Boolean;
|
||||||
Address : String[30]; { user's address }
|
PeerIP : String[15];
|
||||||
Baud : String[6]; { Baud Rate }
|
PeerHost : String[50];
|
||||||
DateTime : LongInt; { Date & Time (UNIX) }
|
Node : Byte;
|
||||||
Node : Byte; { Node number of login }
|
CallNum : LongInt;
|
||||||
CallNum : LongInt; { Caller Number }
|
Handle : String[30];
|
||||||
EmailAddr : String[35]; { email address }
|
City : String[25];
|
||||||
UserInfo : String[30]; { user info field }
|
Address : String[30];
|
||||||
Option1 : String[35]; { optional data 1 }
|
Gender : Char;
|
||||||
Option2 : String[35]; { " " 2 }
|
EmailAddr : String[35];
|
||||||
Option3 : String[35]; { " " 3 }
|
UserInfo : String[30];
|
||||||
|
OptionData : Array[1..10] of String[60];
|
||||||
|
Reserved : Array[1..53] of Byte;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
HistoryRec = Record
|
RecHistory = Record
|
||||||
Date : LongInt;
|
Date : LongInt;
|
||||||
Emails : Word;
|
Emails : Word;
|
||||||
Posts : Word;
|
Posts : Word;
|
||||||
|
@ -696,6 +698,13 @@ Type
|
||||||
UploadKB : LongInt;
|
UploadKB : LongInt;
|
||||||
Calls : LongInt;
|
Calls : LongInt;
|
||||||
NewUsers : Word;
|
NewUsers : Word;
|
||||||
|
Telnet : Word;
|
||||||
|
FTP : Word;
|
||||||
|
POP3 : Word;
|
||||||
|
SMTP : Word;
|
||||||
|
NNTP : Word;
|
||||||
|
HTTP : Word;
|
||||||
|
Reserved : Array[1..26] of Byte;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
RecProtocol = Record
|
RecProtocol = Record
|
||||||
|
|
|
@ -98,6 +98,7 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES
|
||||||
rename them automatically.
|
rename them automatically.
|
||||||
- ANSI listbox is terribly inefficient with its output.
|
- ANSI listbox is terribly inefficient with its output.
|
||||||
- So much cool stuff to do with the new themes
|
- So much cool stuff to do with the new themes
|
||||||
|
- LastOn revamp make sure its not global and new stuff is populated
|
||||||
|
|
||||||
RANDOM DRUNKEN BRAINDUMP AKA DESIGN DETAILS
|
RANDOM DRUNKEN BRAINDUMP AKA DESIGN DETAILS
|
||||||
===========================================
|
===========================================
|
||||||
|
|
Loading…
Reference in New Issue