Updated BBSList, See UPGRADE/BBSLIST.SCR for new options
Not Sure which new ascii is available, I'll check modified: BBSLIST.PAS modified: RECORDS.PAS new file: UPGRADE/BBSLIST.SCR new file: UPGRADE/FIXBBSL.PAS modified: BBSLIST.PAS modified: RECORDS.PAS new file: UPGRADE/BBSLIST.SCR new file: UPGRADE/FIXBBSL.PAS
This commit is contained in:
parent
5e81182bf7
commit
2147e6cacd
|
@ -1,7 +1,3 @@
|
|||
{$IFDEF WIN32}
|
||||
{$I DEFINES.INC}
|
||||
{$ENDIF}
|
||||
|
||||
{$A+,B-,D-,E-,F+,I-,L-,N-,O+,R-,S+,V-}
|
||||
|
||||
UNIT BBSList;
|
||||
|
@ -24,20 +20,37 @@ FUNCTION BBSListMCI(CONST S: ASTR; Data1,Data2: Pointer): STRING;
|
|||
VAR
|
||||
BBSListPtr: ^BBSListRecordType;
|
||||
User: UserRecordType;
|
||||
TmpStr : String;
|
||||
BEGIN
|
||||
BBSListPtr := Data1;
|
||||
BBSListMCI := S;
|
||||
CASE S[1] OF
|
||||
'X' : CASE S[2] OF
|
||||
'A' : BBSListMCI := BBSListPtr^.xA;
|
||||
'B' : BBSListMCI := BBSListPtr^.xB;
|
||||
'C' : BBSListMCI := BBSListPtr^.xC;
|
||||
'D' : BBSListMCI := BBSListPtr^.xD;
|
||||
'E' : BBSListMCI := BBSListPtr^.xE;
|
||||
'F' : BBSListMCI := BBSListPtr^.xF;
|
||||
'A' : BBSListMCI := BBSListPtr^.SDA;
|
||||
'B' : BBSListMCI := BBSListPtr^.SDB;
|
||||
'C' : BBSListMCI := BBSListPtr^.SDC;
|
||||
'D' : BBSListMCI := BBSListPtr^.SDD;
|
||||
'E' : BBSListMCI := BBSListPtr^.SDE;
|
||||
'F' : BBSListMCI := BBSListPtr^.SDF;
|
||||
END;
|
||||
'A' : CASE S[2] OF
|
||||
'C' :
|
||||
Begin
|
||||
If (Length(BBSListPtr^.PhoneNumber) > 0) Then
|
||||
Begin
|
||||
TmpStr := BBSListPtr^.PhoneNumber;
|
||||
Delete(TmpStr,4,Length(TmpStr));
|
||||
BBSListMCI := TmpStr;
|
||||
End
|
||||
Else
|
||||
Begin
|
||||
BBSListMCI := 'N/A';
|
||||
End;
|
||||
End;
|
||||
END;
|
||||
'B' : CASE S[2] OF
|
||||
'N' : BBSListMCI := BBSListPtr^.BBSName;
|
||||
'P' : BBSListMCI := IntToStr(BBSListPtr^.Port);
|
||||
END;
|
||||
'D' : CASE S[2] OF
|
||||
'A' : BBSListMCI := Pd2Date(BBSListPtr^.DateAdded);
|
||||
|
@ -45,16 +58,63 @@ BEGIN
|
|||
'S' : BBSListMCI := BBSListPtr^.Description;
|
||||
'2' : BBSListMCI := BBSListPtr^.Description2
|
||||
END;
|
||||
'L' : CASE S[2] OF
|
||||
'O' : BBSListMCI := BBSListPtr^.Location;
|
||||
END;
|
||||
'H' : CASE S[2] OF
|
||||
'R' : BBSListMCI := BBSListPtr^.Hours;
|
||||
END;
|
||||
'M' : CASE S[2] OF
|
||||
'N' : BBSListMCI := IntToStr(BBSListPtr^.MaxNodes);
|
||||
END;
|
||||
'O' : CASE S[2] OF
|
||||
'S' : Begin
|
||||
If (Length(BBSListPtr^.OS) > 0) Then
|
||||
BBSListMCI := BBSListPtr^.OS
|
||||
Else
|
||||
BBSListMCI := 'Unknown';
|
||||
End;
|
||||
END;
|
||||
'P' : CASE S[2] OF
|
||||
'N' : BBSListMCI := BBSListPtr^.PhoneNumber;
|
||||
'N' : Begin
|
||||
If (Length(BBSListPtr^.PhoneNumber) > 0) Then
|
||||
BBSListMCI := BBSListPtr^.PhoneNumber
|
||||
Else
|
||||
BBSListMCI := 'None';
|
||||
End;
|
||||
END;
|
||||
'R' : CASE S[2] OF
|
||||
'N' : BBSListMCI := IntToStr(BBSListPtr^.RecordNum);
|
||||
END;
|
||||
'S' : CASE S[2] OF
|
||||
'A' : BBSListMCI := BBSListPtr^.SDA;
|
||||
'B' : BBSListMCI := BBSListPtr^.SDB;
|
||||
'C' : BBSListMCI := BBSListPtr^.SDC;
|
||||
'D' : BBSListMCI := BBSListPtr^.SDD;
|
||||
'E' : BBSListMCI := BBSListPtr^.SDE;
|
||||
'F' : BBSListMCI := BBSListPtr^.SDF;
|
||||
'G' : BBSListMCI := IntToStr(BBSListPtr^.SDG);
|
||||
'H' : BBSListMCI := ShowYesNo(BBSListPtr^.SDH);
|
||||
'I' : BBSListMCI := ShowYesNo(BBSListPtr^.SDI);
|
||||
'N' : BBSListMCI := BBSListPtr^.SysOpName;
|
||||
'P' : BBSListMCI := BBSListPtr^.Speed;
|
||||
'W' : BBSListMCI := AllCaps(BBSListPtr^.Software);
|
||||
'T' : Begin
|
||||
IF (Length(BBSListPtr^.Birth) > 0) THEN
|
||||
BBSListMCI := BBSListPtr^.Birth
|
||||
ELSE
|
||||
BBSListMCI := 'Unknown';
|
||||
End;
|
||||
'V' : Begin
|
||||
If (Length(BBSListPtr^.SoftwareVersion) > 0) Then
|
||||
Begin
|
||||
BBSListMCI := BBSListPtr^.SoftwareVersion;
|
||||
End
|
||||
Else
|
||||
Begin
|
||||
BBSListMCI := 'Unknown';
|
||||
End;
|
||||
End;
|
||||
'W' : BBSListMCI := BBSListPtr^.Software;
|
||||
END;
|
||||
'T' : CASE S[2] OF
|
||||
'N' : BBSListMCI := BBSListPtr^.TelnetUrl;
|
||||
|
@ -75,7 +135,8 @@ PROCEDURE BBSListScriptFile(VAR BBSList: BBSListRecordType);
|
|||
VAR
|
||||
BBSScriptText: TEXT;
|
||||
Question: STRING;
|
||||
WhichOne: CHAR;
|
||||
WhichOne: String;
|
||||
TmpBirth: String[10];
|
||||
BEGIN
|
||||
Assign(BBSScriptText,General.MiscPath+'BBSLIST.SCR');
|
||||
Reset(BBSScriptText);
|
||||
|
@ -84,101 +145,181 @@ BEGIN
|
|||
ReadLn(BBSScriptText,Question);
|
||||
IF (Question[1] = '[') THEN
|
||||
BEGIN
|
||||
WhichOne := UpCase(Question[2]);
|
||||
WhichOne := AllCaps(Copy(Question, Pos('[',Question)+1, Pos(']',Question)-2));
|
||||
Question := Copy(Question,(Pos(':',Question) + 1),Length(Question));
|
||||
CASE WhichOne OF
|
||||
'1' : BEGIN
|
||||
|
||||
IF (WhichOne = 'BBSNAME') THEN
|
||||
BEGIN
|
||||
NL;
|
||||
PRT(Question+' ');
|
||||
MPL(SizeOf(BBSList.BBSName) - 1);
|
||||
InputMain(BBSList.BBSName,(SizeOf(BBSList.BBSName) - 1),[InterActiveEdit,ColorsAllowed]);
|
||||
Abort := (BBSList.BBSName = '');
|
||||
END;
|
||||
'2' : BEGIN
|
||||
END
|
||||
ELSE IF WhichOne = 'SYSOPNAME' THEN
|
||||
BEGIN
|
||||
PRT(Question+' ');
|
||||
MPL(SizeOf(BBSList.SysOpName) - 1);
|
||||
InputMain(BBSList.SysOpName,(SizeOf(BBSList.SysOpName) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.SysOpName = '');
|
||||
END;
|
||||
'3' : BEGIN
|
||||
PrintACR(Question);
|
||||
END
|
||||
ELSE IF WhichOne = 'TELNETURL' THEN
|
||||
BEGIN
|
||||
Prt(Question+' ');
|
||||
MPL(SizeOf(BBSList.TelnetUrl) - 1);
|
||||
InputMain(BBSList.TelnetUrl,(SizeOf(BBSList.TelnetUrl) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.TelnetUrl = '');
|
||||
END;
|
||||
'4' : BEGIN
|
||||
PrintACR(Question);
|
||||
END
|
||||
ELSE IF WhichOne = 'WEBSITEURL' THEN
|
||||
BEGIN
|
||||
Prt(Question+' ');
|
||||
MPL(SizeOf(BBSList.WebSiteUrl) - 1);
|
||||
InputMain(BBSList.WebSiteUrl,(SizeOf(BBSList.WebSiteUrl) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.WebSiteUrl = '');
|
||||
END;
|
||||
'5' : BEGIN
|
||||
{Abort := (BBSList.WebSiteUrl = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'PHONENUMBER' THEN
|
||||
BEGIN
|
||||
PRT(Question+' ');
|
||||
MPL(SizeOf(BBSList.PhoneNumber) - 1);
|
||||
InputMain(BBSList.PhoneNumber,(SizeOf(BBSList.PhoneNumber) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.PhoneNumber = '');
|
||||
END;
|
||||
'6' : BEGIN
|
||||
{Abort := (BBSList.PhoneNumber = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'SOFTWARE' THEN
|
||||
BEGIN
|
||||
PRT(Question+' ');
|
||||
MPL(SizeOf(BBSList.Software) - 1);
|
||||
InputMain(BBSList.Software,(SizeOf(BBSList.Software) - 1),[ColorsAllowed,InterActiveEdit,UpperOnly]);
|
||||
Abort := (BBSList.Software = '');
|
||||
END;
|
||||
'7' : BEGIN
|
||||
InputMain(BBSList.Software,(SizeOf(BBSList.Software) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
{Abort := (BBSList.Software = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'SOFTWAREVERSION' THEN
|
||||
BEGIN
|
||||
Prt(Question+' ');
|
||||
MPL(SizeOf(BBSList.SoftwareVersion) - 1);
|
||||
InputMain(BBSList.SoftwareVersion,(SizeOf(BBSList.SoftwareVersion) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
END
|
||||
ELSE IF WhichOne = 'OS' THEN
|
||||
BEGIN
|
||||
Prt(Question+' ');
|
||||
MPL(SizeOf(BBSList.OS) - 1);
|
||||
InputMain(BBSList.OS,(SizeOf(BBSList.OS) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
END
|
||||
ELSE IF WhichOne = 'SPEED' THEN
|
||||
BEGIN
|
||||
PRT(Question+' ');
|
||||
MPL(SizeOf(BBSList.Speed) - 1);
|
||||
InputMain(BBSList.Speed,(SizeOf(BBSList.Speed) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.Speed = '');
|
||||
END;
|
||||
'8' : BEGIN
|
||||
Print(Question);
|
||||
{Abort := (BBSList.Speed = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'HOURS' THEN
|
||||
BEGIN
|
||||
PRT(Question+' ');
|
||||
MPL(SizeOf(BBSList.Hours) - 1);
|
||||
InputMain(BBSList.Hours,(SizeOf(BBSList.Hours) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
{Abort := (BBSList.Speed = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'DESCRIPTION' THEN
|
||||
BEGIN
|
||||
Prt(Question);
|
||||
MPL(SizeOf(BBSList.Description) - 1);
|
||||
InputMain(BBSList.Description,(SizeOf(BBSList.Description) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.Description = '');
|
||||
END;
|
||||
'9' : BEGIN
|
||||
IF (Question <> 'þ') THEN
|
||||
Print(Question);
|
||||
{Abort := (BBSList.Description = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'DESCRIPTION2' THEN
|
||||
BEGIN
|
||||
Prt(Question);
|
||||
MPL(SizeOf(BBSList.Description2) - 1);
|
||||
InputMain(BBSList.Description2,(SizeOf(BBSList.Description2) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.Description2 = '');
|
||||
END;
|
||||
'A' : BEGIN
|
||||
{Abort := (BBSList.Description2 = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'MAXNODES' THEN
|
||||
BEGIN
|
||||
|
||||
MPL(SizeOf(BBSList.MaxNodes) - 1);
|
||||
IF (BBSList.MaxNodes = 0) THEN
|
||||
BBSList.MaxNodes := 5;
|
||||
InputLongIntWoc(Question,BBSList.MaxNodes,[NumbersOnly,InteractiveEdit],1,1000);
|
||||
|
||||
END
|
||||
ELSE IF WhichOne = 'PORT' THEN
|
||||
BEGIN
|
||||
IF (BBSList.Port = 0) THEN
|
||||
BBSList.Port := 23;
|
||||
MPL(SizeOf(BBSList.Port) - 1);
|
||||
|
||||
InputWordWoc(Question,BBSList.Port,[NumbersOnly,InterActiveEdit],1,65535);
|
||||
END
|
||||
ELSE IF WhichOne = 'LOCATION' THEN
|
||||
BEGIN
|
||||
Prt(Question+' ');
|
||||
MPL(SizeOf(BBSList.Location) - 1);
|
||||
InputMain(BBSList.Location,(SizeOf(BBSList.Location) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
END
|
||||
ELSE IF WhichOne = 'BIRTH' THEN
|
||||
BEGIN
|
||||
TmpBirth := BBSList.Birth;
|
||||
IF (Length(TmpBirth) < 10) THEN
|
||||
TmpBirth := '12/31/1969';
|
||||
MPL(10);
|
||||
InputFormatted(Question+' |08(|07'+TmpBirth+'|08) |15: ',BBSList.Birth,'##/##/####',TRUE);
|
||||
IF (Length(BBSList.Birth) <= 0) THEN
|
||||
BBSList.Birth := TmpBirth;
|
||||
|
||||
END
|
||||
ELSE IF WhichOne = 'SDA' THEN
|
||||
BEGIN
|
||||
Prt(Question+' ');
|
||||
MPL(SizeOf(BBSList.SDA) - 1);
|
||||
InputMain(BBSList.SDA,(SizeOf(BBSList.SDA) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
{Abort := (BBSList.xA = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'SDB' THEN
|
||||
BEGIN
|
||||
Prt(Question+' ');
|
||||
MPL(SizeOf(BBSList.SDB) - 1);
|
||||
InputMain(BBSList.SDB,(SizeOf(BBSList.SDB) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
{Abort := (BBSList.xB = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'SDC' THEN
|
||||
BEGIN
|
||||
Prt(Question+' ');
|
||||
MPL(SizeOf(BBSList.SDC) - 1);
|
||||
InputMain(BBSList.SDC,(SizeOf(BBSList.SDC) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
{ Abort := (BBSList.xC = ''); }
|
||||
END
|
||||
ELSE IF WhichOne = 'SDD' THEN BEGIN
|
||||
Prt(Question+' ');
|
||||
MPL(SizeOf(BBSList.SDD) - 1);
|
||||
InputMain(BBSList.SDD,(SizeOf(BBSList.SDD) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
{ Abort := (BBSList.xD = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'SDE' THEN
|
||||
BEGIN
|
||||
Print(Question);
|
||||
MPL(SizeOf(BBSList.xA) - 1);
|
||||
InputMain(BBSList.xA,(SizeOf(BBSList.xA) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.xA = '');
|
||||
END;
|
||||
'B' : BEGIN
|
||||
MPL(SizeOf(BBSList.SDE) - 1);
|
||||
InputMain(BBSList.SDE,(SizeOf(BBSList.SDE) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
{Abort := (BBSList.xE = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'SDF' THEN
|
||||
BEGIN
|
||||
Print(Question);
|
||||
MPL(SizeOf(BBSList.xB) - 1);
|
||||
InputMain(BBSList.xB,(SizeOf(BBSList.xB) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.xB = '');
|
||||
END;
|
||||
'C' : BEGIN
|
||||
Print(Question);
|
||||
MPL(SizeOf(BBSList.xC) - 1);
|
||||
InputMain(BBSList.xC,(SizeOf(BBSList.xC) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.xC = '');
|
||||
END;
|
||||
'D' : BEGIN
|
||||
Print(Question);
|
||||
MPL(SizeOf(BBSList.xD) - 1);
|
||||
InputMain(BBSList.xD,(SizeOf(BBSList.xD) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.xD = '');
|
||||
END;
|
||||
'E' : BEGIN
|
||||
Print(Question);
|
||||
MPL(SizeOf(BBSList.xE) - 1);
|
||||
InputMain(BBSList.xE,(SizeOf(BBSList.xE) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.xE = '');
|
||||
END;
|
||||
'F' : BEGIN
|
||||
Print(Question);
|
||||
MPL(SizeOf(BBSList.xF) - 1);
|
||||
InputMain(BBSList.xF,(SizeOf(BBSList.xF) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
Abort := (BBSList.xF = '');
|
||||
END;
|
||||
MPL(SizeOf(BBSList.SDF) - 1);
|
||||
InputMain(BBSList.SDF,(SizeOf(BBSList.SDF) - 1),[ColorsAllowed,InterActiveEdit]);
|
||||
{Abort := (BBSList.xF = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'SDG' THEN
|
||||
BEGIN
|
||||
|
||||
MPL(SizeOf(BBSList.SDG) - 1);
|
||||
InputWordWoc(Question,BBSList.SDG,[NumbersOnly,InterActiveEdit],1,65535);
|
||||
{Abort := (BBSList.xE = '');}
|
||||
END
|
||||
ELSE IF WhichOne = 'SDH' THEN
|
||||
BEGIN
|
||||
BBSList.SDH := PYNQ(Question+' ',0,TRUE);
|
||||
END
|
||||
ELSE IF WhichOne = 'SDI' THEN
|
||||
BEGIN
|
||||
BBSList.SDI := PYNQ(Question+' ',6,FALSE);
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
|
@ -342,7 +483,7 @@ BEGIN
|
|||
IF (BBSListScript_Exists) AND (BBSListAddScreens_Exists) THEN
|
||||
BEGIN
|
||||
NL;
|
||||
IF PYNQ('Would you like to add an entry to the BBS List? ',0,FALSE) THEN
|
||||
IF PYNQ(' Add an entry to the BBS list? ',0,FALSE) THEN
|
||||
BEGIN
|
||||
FillChar(BBSList,SizeOf(BBSList),0);
|
||||
BBSListScriptFile(BBSList);
|
||||
|
@ -353,7 +494,7 @@ BEGIN
|
|||
DisplayBuffer(BBSListMCI,@BBSList,Data2);
|
||||
PrintF('BBSNT');
|
||||
NL;
|
||||
IF (PYNQ('Would you like to save this BBS Listing? ',0,TRUE)) THEN
|
||||
IF (PYNQ(' Save '+BBSList.BBSName+'? ',0,TRUE)) THEN
|
||||
BEGIN
|
||||
Assign(BBSListFile,General.DataPath+'BBSLIST.DAT');
|
||||
IF (Exist(General.DataPath+'BBSLIST.DAT')) THEN
|
||||
|
@ -399,11 +540,11 @@ BEGIN
|
|||
Read(BBSListFile,BBSList);
|
||||
IF (BBSList.UserID = UserNum) OR (CoSysOp) THEN
|
||||
BEGIN
|
||||
PrintF('BBSLET');
|
||||
PrintF('BBSLDT');
|
||||
ReadBuffer('BBSLEM');
|
||||
DisplayBuffer(BBSListMCI,@BBSList,Data2);
|
||||
NL;
|
||||
IF (PYNQ('Would you like to delete this BBS Listing? ',0,FALSE)) THEN
|
||||
IF (PYNQ(' Delete '+BBSLIST.BBSName+'? ',0,FALSE)) THEN
|
||||
BEGIN
|
||||
SysOpLog('Deleted BBS Listing: '+BBSList.BBSName+'.');
|
||||
IF ((OnRec - 1) <= (FileSize(BBSListFile) - 2)) THEN
|
||||
|
@ -428,7 +569,7 @@ BEGIN
|
|||
IF (NOT Found) THEN
|
||||
BEGIN
|
||||
NL;
|
||||
Print('You may only delete BBS Listing''s that you have entered.');
|
||||
Print(' You may only delete BBS Listing''s that you have entered.');
|
||||
SysOpLog('Tried to delete a BBS Listing.');
|
||||
END;
|
||||
END;
|
||||
|
@ -440,6 +581,7 @@ VAR
|
|||
BBSList: BBSListRecordType;
|
||||
OnRec: Longint;
|
||||
Found: Boolean;
|
||||
Edit : LongInt;
|
||||
BEGIN
|
||||
IF (BBSList_Exists) AND (BBSListEditScreens_Exists) AND (BBSListAddScreens_Exists) THEN
|
||||
BEGIN
|
||||
|
@ -449,17 +591,43 @@ BEGIN
|
|||
Found := FALSE;
|
||||
Abort := FALSE;
|
||||
OnRec := 1;
|
||||
WHILE (OnRec <= FileSize(BBSListFile)) AND (NOT Abort) AND (NOT HangUp) DO
|
||||
WHILE (NOT Abort) AND (NOT HangUp) DO
|
||||
BEGIN
|
||||
Seek(BBSListFile,(OnRec - 1));
|
||||
|
||||
PrintF('BBSLEDT');
|
||||
ReadBuffer('BBSLEM');
|
||||
While OnRec <= FileSize(BBSListFile) Do
|
||||
Begin
|
||||
Seek(BBSListFile, OnRec -1);
|
||||
Read(BBSListFile,BBSList);
|
||||
IF (BBSList.UserID = UserNum) OR (CoSysOp) THEN
|
||||
DisplayBuffer(BBSListMCI,@BBSList,Data2);
|
||||
Inc(OnRec);
|
||||
End;
|
||||
|
||||
NL;
|
||||
MPL(FileSize(BBSListFile));
|
||||
InputLongIntWOC(' Edit which BBS? :',Edit,[],1,FileSize(BBSListFile));
|
||||
|
||||
Abort := (Edit <> 0 );
|
||||
|
||||
IF (Edit <= FileSize(BBSListFile)) AND (Edit > 0) THEN
|
||||
BEGIN
|
||||
PrintF('BBSLET');
|
||||
Seek(BBSListFile,(Edit -1))
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
Close(BBSListFile);
|
||||
Exit;
|
||||
END;
|
||||
Read(BBSListFile,BBSList);
|
||||
IF (BBSList.UserID = UserNum) OR (CoSysOp) OR (BBSList.SysopName = ThisUser.Name) THEN
|
||||
BEGIN
|
||||
PrintF('BBSLEH');
|
||||
ReadBuffer('BBSLEM');
|
||||
DisplayBuffer(BBSListMCI,@BBSList,Data2);
|
||||
NL;
|
||||
IF (PYNQ('Would you like to edit this BBS Listing? ',0,FALSE)) THEN
|
||||
IF (PYNQ(' |03Would you like to edit this BBS Listing? |11',0,TRUE)) THEN
|
||||
|
||||
BEGIN
|
||||
BBSListScriptFile(BBSList);
|
||||
IF (NOT Abort) THEN
|
||||
|
@ -469,9 +637,9 @@ BEGIN
|
|||
DisplayBuffer(BBSListMCI,@BBSList,Data2);
|
||||
PrintF('BBSNT');
|
||||
NL;
|
||||
IF (PYNQ('Would you like to save this BBS Listing? ',0,TRUE)) THEN
|
||||
IF (PYNQ(' |03Would you like to save this BBS Listing? |11',0,TRUE)) THEN
|
||||
BEGIN
|
||||
Seek(BBSListFile,(OnRec - 1));
|
||||
Seek(BBSListFile,(Edit -1));
|
||||
BBSList.DateEdited := GetPackDateTime;
|
||||
Write(BBSListFile,BBSList);
|
||||
SysOpLog('Edited BBS Listing: '+BBSList.BBSName+'.');
|
||||
|
@ -480,14 +648,15 @@ BEGIN
|
|||
END;
|
||||
Found := TRUE;
|
||||
END;
|
||||
Inc(OnRec);
|
||||
{Inc(OnRec);}
|
||||
Exit;
|
||||
END;
|
||||
Close(BBSListFile);
|
||||
LastError := IOResult;
|
||||
IF (NOT Found) THEN
|
||||
BEGIN
|
||||
NL;
|
||||
Print('You may only edit BBS Listing''s that you have entered.');
|
||||
Print(' You may only edit BBS Listing''s that you have entered.');
|
||||
SysOpLog('Tried to edit a BBS Listing.');
|
||||
END;
|
||||
END;
|
||||
|
@ -498,7 +667,9 @@ VAR
|
|||
Data2: Pointer;
|
||||
BBSList: BBSListRecordType;
|
||||
OnRec: Longint;
|
||||
Cnt : Byte;
|
||||
BEGIN
|
||||
|
||||
IF (BBSList_Exists) AND (BBSListAddScreens_Exists) THEN
|
||||
BEGIN
|
||||
Assign(BBSListFile,General.DataPath+'BBSLIST.DAT');
|
||||
|
@ -508,12 +679,23 @@ BEGIN
|
|||
Abort := FALSE;
|
||||
PrintF('BBSNH');
|
||||
OnRec := 1;
|
||||
Cnt := 1;
|
||||
WHILE (OnRec <= FileSize(BBSListFile)) AND (NOT Abort) AND (NOT HangUp) DO
|
||||
BEGIN
|
||||
Seek(BBSListFile,(OnRec - 1));
|
||||
Read(BBSListFile,BBSList);
|
||||
DisplayBuffer(BBSListMCI,@BBSList,Data2);
|
||||
Inc(OnRec);
|
||||
Inc(Cnt);
|
||||
If Cnt = (23 - 4) Then
|
||||
Begin
|
||||
PauseScr(True);
|
||||
Cnt := 1;
|
||||
End
|
||||
Else
|
||||
Begin
|
||||
Cnt := Cnt;
|
||||
End;
|
||||
END;
|
||||
Close(BBSListFile);
|
||||
LastError := IOResult;
|
||||
|
@ -524,36 +706,65 @@ BEGIN
|
|||
END;
|
||||
END;
|
||||
|
||||
PROCEDURE BBSList_xView; (* Do we need xview *)
|
||||
PROCEDURE BBSList_xView; (* Do we need xview *) {Yes -sk}
|
||||
VAR
|
||||
Data2: Pointer;
|
||||
BBSList: BBSListRecordType;
|
||||
OnRec: Longint;
|
||||
Edit : Longint;
|
||||
BEGIN
|
||||
IF (BBSList_Exists) THEN (* Add BBSME & BBSEH exist checking here *)
|
||||
BEGIN
|
||||
Assign(BBSListFile,General.DataPath+'BBSLIST.DAT');
|
||||
Reset(BBSListFile);
|
||||
|
||||
PrintF('BBSLEH');
|
||||
ReadBuffer('BBSLEM');
|
||||
OnRec := 1;
|
||||
While OnRec <= FileSize(BBSListFile) Do
|
||||
Begin
|
||||
Seek(BBSListFile, OnRec -1);
|
||||
Read(BBSListFile,BBSList);
|
||||
DisplayBuffer(BBSListMCI,@BBSList,Data2);
|
||||
Inc(OnRec);
|
||||
End;
|
||||
PrintF('BBSLET');
|
||||
NL;
|
||||
MPL(FileSize(BBSListFile));
|
||||
InputLongIntWOC(' View which BBS? :',Edit,[],1,FileSize(BBSListFile));
|
||||
|
||||
Abort := (Edit <> 0 );
|
||||
|
||||
IF (Edit <= FileSize(BBSListFile)) AND (Edit > 0) THEN
|
||||
BEGIN
|
||||
Seek(BBSListFile,(Edit -1));
|
||||
Read(BBSListFile,BBSList);
|
||||
Close(BBSListFile);
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
Close(BBSListFile);
|
||||
Exit;
|
||||
END;
|
||||
|
||||
IF (ReadBuffer('BBSME')) THEN
|
||||
BEGIN
|
||||
AllowContinue := TRUE;
|
||||
Abort := FALSE;
|
||||
PrintF('BBSEH');
|
||||
OnRec := 1;
|
||||
WHILE (OnRec <= FileSize(BBSListFile)) AND (NOT Abort) AND (NOT HangUp) DO
|
||||
WHILE (NOT Abort) AND (NOT HangUp) DO
|
||||
BEGIN
|
||||
Seek(BBSListFile,(OnRec - 1));
|
||||
Read(BBSListFile,BBSList);
|
||||
DisplayBuffer(BBSListMCI,@BBSList,Data2);
|
||||
Inc(OnRec);
|
||||
END;
|
||||
IF (NOT Abort) THEN
|
||||
PrintF('BBSET');
|
||||
AllowContinue := FALSE;
|
||||
PauseScr(FALSE);
|
||||
SysOpLog('Viewed the BBS Listing.');
|
||||
{PauseScr(FALSE);}
|
||||
SysOpLog('Viewed Extended BBS Listing of '+BBSList.BBSName+'.');
|
||||
Exit;
|
||||
END;
|
||||
Close(BBSListFile);
|
||||
|
||||
|
||||
END;
|
||||
{Close(BBSListFile);}
|
||||
LastError := IOResult;
|
||||
END;
|
||||
END;
|
||||
|
|
|
@ -932,25 +932,36 @@ TYPE
|
|||
|
||||
BBSListRecordType = { *.BBS file records }
|
||||
{$IFDEF WIN32} PACKED {$ENDIF} RECORD
|
||||
RecordNum: LongInt; { Number OF the Record For Edit }
|
||||
UserID: LongInt; { User ID OF person adding this }
|
||||
BBSName: STRING[30]; { Name OF BBS }
|
||||
SysOpName: STRING[30]; { SysOp OF BBS }
|
||||
TelnetUrl: STRING[60]; { Telnet Urls }
|
||||
WebSiteUrl: STRING[60]; { Web Site Url }
|
||||
PhoneNumber: STRING[20]; { Phone number OF BBS }
|
||||
Software: STRING[8]; { Software used by BBS }
|
||||
Speed: STRING[8]; { Highest connect speed OF BBS }
|
||||
Description: STRING[60]; { Description OF BBS }
|
||||
Description2: STRING[60]; { Second line OF descrition }
|
||||
DateAdded: UnixTime; { Date entry was added }
|
||||
DateEdited: UnixTime; { Date entry was last edited }
|
||||
XA: STRING[8]; { sysop definable A }
|
||||
XB: STRING[30]; { sysop definable B }
|
||||
XC: STRING[30]; { sysop definable C }
|
||||
XD: STRING[40]; { sysop definable D }
|
||||
XE: STRING[60]; { sysop definable E }
|
||||
XF: STRING[60]; { sysop definable F }
|
||||
RecordNum, { Number OF the Record For Edit }
|
||||
UserID, { User ID OF person adding this }
|
||||
MaxNodes : LongInt; { Maximum Number Of Nodes }
|
||||
Port : Word; { Telnet Port }
|
||||
BBSName : STRING[30]; { Name OF BBS }
|
||||
SysOpName : STRING[30]; { SysOp OF BBS }
|
||||
TelnetUrl : STRING[60]; { Telnet Urls }
|
||||
WebSiteUrl : STRING[60]; { Web Site Url }
|
||||
PhoneNumber : STRING[20]; { Phone number OF BBS }
|
||||
Location : STRING[30]; { Location of BBS }
|
||||
Software, { Software used by BBS }
|
||||
SoftwareVersion : String[12]; { Software Version of BBS }
|
||||
OS : STRING[20]; { Operating System of BBS }
|
||||
Speed : STRING[8]; { Highest connect speed OF BBS }
|
||||
Hours : STRING[20]; { Hours of Operation }
|
||||
Birth : STRING[10]; { When the BBS Began }
|
||||
Description : STRING[60]; { Description OF BBS }
|
||||
Description2 : STRING[60]; { Second line OF descrition }
|
||||
DateAdded : UnixTime; { Date entry was added }
|
||||
DateEdited : UnixTime; { Date entry was last edited }
|
||||
SDA : STRING[8]; { sysop definable A }
|
||||
SDB : STRING[30]; { sysop definable B }
|
||||
SDC : STRING[30]; { sysop definable C }
|
||||
SDD : STRING[40]; { sysop definable D }
|
||||
SDE : STRING[60]; { sysop definable E }
|
||||
SDF : STRING[60]; { sysop definable F }
|
||||
SDG : Word; { sysop definable G }
|
||||
SDH, { sysop definable H }
|
||||
SDI : Boolean; { sysop definable I }
|
||||
|
||||
END;
|
||||
|
||||
MenuFlagType =
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
#
|
||||
# This is an example of a bbslist template.
|
||||
#
|
||||
# Anything after a '#' is considered a comment and is ignored.
|
||||
# Anything That doesn't begin with a [ is ignored.
|
||||
#
|
||||
# [BBSName]: BBS Name
|
||||
# [SysOpName]: Sysop Name
|
||||
# [MaxNodes]: Max Nodes
|
||||
# [Port]: Telnet Port
|
||||
# [TelnetUrl]: Telnet Url
|
||||
# [WebSiteUrl]: Website
|
||||
# [PhoneNumber]: BBS Phone Number
|
||||
# [Location]: Location of BBS
|
||||
# [Software]: BBS Software Used
|
||||
# [SoftwareVersion]: BBS Software Version
|
||||
# [OS]: Operating System of BBS
|
||||
# [Speed]: Speed of the BBS
|
||||
# [Hours]: Hours of Operation
|
||||
# [Birth]: When the bbs started
|
||||
# [Description]: Description
|
||||
# [Description2]: Description 2
|
||||
# [SDA]: SysOp Definable String 8
|
||||
# [SDB]: SysOp Definable String 30
|
||||
# [SDC]: SysOp Definable String 30
|
||||
# [SDD]: SysOp Definable String 40
|
||||
# [SDE]: SysOp Definable String 60
|
||||
# [SDF]: SysOp Definable String 60
|
||||
# [SDG]: SysOp Definable Number
|
||||
# [SDH]: SysOp Definable Yes/No (Default Yes)
|
||||
# [SDI]: SysOp Definable Yes/No (Default No)
|
||||
|
||||
|
||||
|
||||
# if you want to ask the questions in a certain order change the order.
|
||||
# if you don't want to ask a question then leave it out.
|
||||
#
|
||||
# MCI and Pipe Color Codes are allowed in the question.
|
||||
#
|
||||
# Start BBS List Questions
|
||||
#
|
||||
[BBSName]:%DFAEBBS%%LF |03Enter the Name of BBS |15:|11
|
||||
[SysOpName]:%LF |03What is the Sysop of this BBS name? |15:|11
|
||||
[TelnetUrl]:%LF |03What is the Telnet Address of the BBS?%LF |15:|11
|
||||
[Port]:%LF |03What port can this BBS be reached at? |15:|08
|
||||
[WebSiteUrl]:%LF |03What is the web address of the BBS?%LF |15:|11
|
||||
[PhoneNumber]:%DFAEBBS%%LF |03BBS Phone Number |08(|07if any|08) |15:|11
|
||||
[Location]:%LF |03What is the location of this BBS? |15:|11
|
||||
[Software]:%LF |03What Software does this BBS use? |15:|11
|
||||
[SoftwareVersion]:%LF |03Software Version? |15:|11
|
||||
[OS]:%LF |03Operating System? |15:|11
|
||||
[MaxNodes]:%LF |03How Many Nodes? |15:|08
|
||||
[Speed]:%DFAEBBS%%LF |03What is the Speed of the BBS? |08(|072400, 56700, Telnet|08) |15:|11
|
||||
[Hours]:%LF |03What hours does this bbs run? |08(|0724/7 |08.. |076am-3pm|08) |15:|11
|
||||
[Birth]:%LF |03When did this bbs start?
|
||||
[Description]:%LF |03Enter a small description of the BBS 60 Chars Max. 2 Lines%LF |15 : |11
|
||||
[Description2]: |15: |11
|
||||
#[SDG]:%LF |03Number Test? |15:|08
|
||||
#[SDH]:%LF |03BBS Is 24/7? |15:|11
|
||||
#[SDI]:%LF |03Private Nodes? |15:|11
|
||||
|
|
@ -0,0 +1,217 @@
|
|||
Program FixBBSL;
|
||||
|
||||
Uses
|
||||
Dos,
|
||||
Crt,
|
||||
Common,
|
||||
BBSList;
|
||||
|
||||
Type
|
||||
|
||||
UnixTime = Longint;
|
||||
|
||||
OldBBSListRecordType = { *.BBS file records }
|
||||
{$IFDEF WIN32} PACKED {$ENDIF} RECORD
|
||||
RecordNum : LongInt; { Number OF the Record For Edit }
|
||||
UserID : LongInt; { User ID OF person adding this }
|
||||
BBSName : STRING[30]; { Name OF BBS }
|
||||
SysOpName : STRING[30]; { SysOp OF BBS }
|
||||
TelnetUrl : STRING[60]; { Telnet Urls }
|
||||
WebSiteUrl : STRING[60]; { Web Site Url }
|
||||
PhoneNumber : STRING[20]; { Phone number OF BBS }
|
||||
Software : STRING[8]; { Software used by BBS }
|
||||
Speed : STRING[8]; { Highest connect speed OF BBS }
|
||||
Description : STRING[60]; { Description OF BBS }
|
||||
Description2 : STRING[60]; { Second line OF descrition }
|
||||
DateAdded : UnixTime; { Date entry was added }
|
||||
DateEdited : UnixTime; { Date entry was last edited }
|
||||
XA : STRING[8]; { sysop definable A }
|
||||
XB : STRING[30]; { sysop definable B }
|
||||
XC : STRING[30]; { sysop definable C }
|
||||
XD : STRING[40]; { sysop definable D }
|
||||
XE : STRING[60]; { sysop definable E }
|
||||
XF : STRING[60]; { sysop definable F }
|
||||
END;
|
||||
|
||||
NewBBSListRecordType = { New *.BBS file records }
|
||||
{$IFDEF WIN32} PACKED {$ENDIF} RECORD
|
||||
RecordNum, { Number OF the Record For Edit }
|
||||
UserID, { User ID OF person adding this }
|
||||
MaxNodes : LongInt; { Maximum Number Of Nodes }
|
||||
Port : Word; { Telnet Port }
|
||||
BBSName : STRING[30]; { Name OF BBS }
|
||||
SysOpName : STRING[30]; { SysOp OF BBS }
|
||||
TelnetUrl : STRING[60]; { Telnet Urls }
|
||||
WebSiteUrl : STRING[60]; { Web Site Url }
|
||||
PhoneNumber : STRING[20]; { Phone number OF BBS }
|
||||
Location : STRING[30]; { Location of BBS }
|
||||
Software, { Software used by BBS }
|
||||
SoftwareVersion : String[12]; { Software Version of BBS }
|
||||
OS : STRING[20]; { Operating System of BBS }
|
||||
Speed : STRING[8]; { Highest connect speed OF BBS }
|
||||
Hours : STRING[20]; { Hours of Operation }
|
||||
Birth : STRING[10]; { When The BBS Began }
|
||||
Description : STRING[60]; { Description OF BBS }
|
||||
Description2 : STRING[60]; { Second line OF descrition }
|
||||
DateAdded : UnixTime; { Date entry was added }
|
||||
DateEdited : UnixTime; { Date entry was last edited }
|
||||
SDA : STRING[8]; { sysop definable A }
|
||||
SDB : STRING[30]; { sysop definable B }
|
||||
SDC : STRING[30]; { sysop definable C }
|
||||
SDD : STRING[40]; { sysop definable D }
|
||||
SDE : STRING[60]; { sysop definable E }
|
||||
SDF : STRING[60]; { sysop definable F }
|
||||
SDG : Word; { sysop definable G }
|
||||
SDH, { sysop definable H }
|
||||
SDI : Boolean; { sysop definable I }
|
||||
END;
|
||||
|
||||
|
||||
Var
|
||||
|
||||
OldBBSFile : File Of OldBBSListRecordType;
|
||||
OldBBSDat : OldBBSListRecordType;
|
||||
|
||||
BBSFile : File Of NewBBSListRecordType;
|
||||
BBSDat : NewBBSListRecordType;
|
||||
|
||||
i : Integer;
|
||||
|
||||
TempFile,
|
||||
Dir,
|
||||
BBSListDat : String;
|
||||
|
||||
|
||||
Function GetDataFile : String;
|
||||
Var
|
||||
Old : String;
|
||||
Begin
|
||||
GetDir(0,BBSListDat);
|
||||
BBSListDat := BBSListDat+'\DATA\BBSLIST.DAT';
|
||||
GetDir(0,Old);
|
||||
Old := Old+'\DATA\BBSLIST.OLD';
|
||||
If Exist(Old) Then
|
||||
Begin
|
||||
WriteLn;
|
||||
TextColor(12);
|
||||
Write(' ', Old);
|
||||
TextColor(4);
|
||||
WriteLn(' exists. ');
|
||||
TextColor(7);
|
||||
WriteLn(' It seems you have already run this program. ');
|
||||
TextColor(7);
|
||||
WriteLn(' There is no need to run it again.');
|
||||
WriteLn;
|
||||
Halt;
|
||||
End
|
||||
Else If Exist(BBSListDat) Then
|
||||
Begin
|
||||
GetDataFile := BBSListDat;
|
||||
Exit;
|
||||
End
|
||||
Else
|
||||
Begin
|
||||
WriteLn;
|
||||
TextColor(12);
|
||||
Write(' ',BBSListDat);
|
||||
TextColor(4);
|
||||
WriteLn(' doesn''t exist');
|
||||
TextColor(7);
|
||||
WriteLn(' Run this from inside your RENEGADE Home Dir.');
|
||||
WriteLn;
|
||||
Halt;
|
||||
End;
|
||||
End;
|
||||
|
||||
Begin { Main Program }
|
||||
|
||||
BBSListDat := GetDataFile; { Get BBSLIST.DAT or Quit }
|
||||
|
||||
TempFile := 'DATA\BBSTEMP.DAT';
|
||||
|
||||
Assign(OldBBSFile, BBSListDat);
|
||||
Assign(BBSFile, TempFile);
|
||||
Reset(OldBBSFile);
|
||||
Rewrite(BBSFile);
|
||||
Seek(OldBBSFile, 0);
|
||||
Seek(BBSFile, 0);
|
||||
WriteLn;
|
||||
TextColor(3);
|
||||
Write(' Converting Old BBS Records ');
|
||||
|
||||
For i := 1 to FileSize(OldBBSFile) Do
|
||||
Begin
|
||||
Delay(200);
|
||||
TextColor(11);
|
||||
Write('.');
|
||||
Read(OldBBSFile, OldBBSDat);
|
||||
|
||||
BBSDat.RecordNum := OldBBSDat.RecordNum;
|
||||
BBSDat.UserID := OldBBSDat.UserID;
|
||||
BBSDat.BBSName := OldBBSDat.BBSName;
|
||||
BBSDat.SysOpName := OldBBSDat.SysOpName;
|
||||
BBSDat.TelnetUrl := OldBBSDat.TelnetUrl;
|
||||
BBSDat.WebSiteUrl := OldBBSDat.WebSiteUrl;
|
||||
BBSDat.PhoneNumber := OldBBSDat.PhoneNumber;
|
||||
BBSDat.Software := OldBBSDat.Software;
|
||||
BBSDat.Speed := OldBBSDat.Speed;
|
||||
BBSDat.Description := OldBBSDat.Description;
|
||||
BBSDat.Description2 := OldBBSDat.Description2;
|
||||
BBSDat.DateAdded := OldBBSDat.DateAdded;
|
||||
BBSDat.DateEdited := OldBBSDat.DateEdited;
|
||||
BBSDat.SDA := OldBBSDat.XA;
|
||||
BBSDat.SDB := OldBBSDat.XB;
|
||||
BBSDat.SDC := OldBBSDat.XC;
|
||||
BBSDat.SDD := OldBBSDat.XD;
|
||||
BBSDat.SDE := OldBBSDat.XE;
|
||||
BBSDat.SDF := OldBBSDat.XF;
|
||||
|
||||
Write(BBSFile, BBSDat);
|
||||
|
||||
Seek(OldBBSFile, i);
|
||||
Seek(BBSFile, i);
|
||||
|
||||
End;
|
||||
TextColor(3);
|
||||
WriteLn(' Done!');
|
||||
|
||||
GetDir(0,Dir);
|
||||
|
||||
WriteLn;
|
||||
TextColor(3);
|
||||
Write(' Copying ');
|
||||
TextColor(11);
|
||||
Write(Dir,'\DATA\BBSLIST.DAT ');
|
||||
TextColor(3);
|
||||
Write('to ');
|
||||
TextColor(11);
|
||||
Write(Dir,'\DATA\BBSLIST.OLD ');
|
||||
TextColor(3);
|
||||
Write('...');
|
||||
|
||||
Rename(OldBBSFile,Dir+'\DATA\BBSLIST.OLD');
|
||||
|
||||
TextColor(3);
|
||||
WriteLn(' Done!');
|
||||
|
||||
TextColor(3);
|
||||
Write(' Moving ');
|
||||
TextColor(11);
|
||||
Write(Dir,'\DATA\BBSTEMP.DAT ');
|
||||
TextColor(3);
|
||||
Write('to ');
|
||||
TextColor(11);
|
||||
Write(Dir,'\DATA\BBSLIST.DAT ');
|
||||
TextColor(3);
|
||||
Write('...');
|
||||
|
||||
Rename(BBSFile,Dir+'\DATA\BBSLIST.DAT');
|
||||
|
||||
TextColor(3);
|
||||
WriteLn(' Done!');
|
||||
WriteLn;
|
||||
|
||||
Close(OldBBSFile);
|
||||
Close(BBSFile);
|
||||
|
||||
End.
|
Loading…
Reference in New Issue