Category : Pascal Source Code
Archive   : TBBS.ZIP
Filename : BBS.PAS
{$C-}
{$U-}
program TurboBBS;
(*******************************************************************)
(* *)
(* Turbo Bulletin Board System Source Code Master (Main) File *)
(* *)
(* (c) 1985 by Robert H. Maxwell *)
(* 201 - 2275 West 7th Avenue, *)
(* Vancouver, British Columbia, CANADA *)
(* V6K 1Y3 *)
(* *)
(* Original System running 300/1200 baud, 24hrs: (604) 738-7811 *)
(* Written for a Kaypro 2-84 using Rixon 212A Intelligent modem *)
(* *)
(* If you like this program, it would most appreciated if you *)
(* sent $30 to the above address. If you choose to operate a BBS *)
(* with it, please forward the details so you can be kept up to *)
(* date with changes to the program. *)
(* *)
(* The author has released this code to the public domain, but *)
(* reserves all rights to the program. No other party is to make *)
(* any charge for this program other than for media and special *)
(* preparation charges, such as customization, *)
(* *)
(* While every reasonable effort has been made to ensure the *)
(* reliability of this program, the author assumes no liability *)
(* for any damages that may arise from its use. *)
(* *)
(* Files required for compile: BBS.PAS (this file) *)
(* BBS2.INC (support routines) *)
(* MACHDEP.INC (machine dependent) *)
(* IO.INC (Input/Output drivers) *)
(* MAILSYS.INC (Sections named here) *)
(* FILESYS.INC (XMODEM code here) *)
(* *)
(* Information files required: BBSINFO.LBR (members listed below) *)
(* *)
(* The following files are created by the program: *)
(* MESSAGES.BBS (Message table) *)
(* FILES.BBS (Files table) *)
(* Clear these periodically: / COMMENTS.BBS (Comments for Sysop) *)
(* They can grow quickly... \ LOG.BBS (call log file) *)
(* IDS.BBS (user list) *)
(* *)
(* .TXT files are WordStar editable; .BBS files are program data *)
(* maintained by the program. *)
(* User SYSOP is automatically given sysop access on system. *)
(* version 1.05 *)
(*******************************************************************)
(*******************************************************************)
(* *)
(* Modifications made to this BBS source code by: *)
(* Donald W. Mack *)
(* P.O Box 211 *)
(* Palos Heights, IL USA 60463 *)
(* *)
(* for a detail list of the modifications refer to BBS8501.DOC *)
(* *)
(*******************************************************************)
const
version = '8502';
noecho = false;
echo = true;
null = #0;
abort = #3;
bell = #7;
bksp = #8;
tab = #9;
lnfd = #10;
cr = #13;
pause = #19;
esc = #27;
space = ' ';
f1 = #59;
f2 = #60;
f3 = #61;
f4 = #62;
f5 = #63;
f6 = #64;
f7 = #65;
f8 = #66;
f9 = #67;
f10 = #68;
type
name = string[14];
longname = string[25];
filbuffer = array[0..127] of byte;
rate = (slow,fast);
line = string[80];
person = string[27];
long = string[150];
sysid = record
user: person;
exfl: byte;
lsto: name;
lstm: integer;
pass: name;
acC: byte;
clr: name;
bsp: char;
lnf: char;
upc: boolean;
wid: byte;
tottimeon: integer;
end;
log = record
who: integer;
when: name;
done: name;
end;
yesno = array[boolean] of string[3];
const yn: yesno = ('NO','YES');
var
libfile: file;
libbuff: filbuffer;
libeof: boolean;
logfile: file of log;
logrec: log;
idfile: file of sysid;
idrec: sysid;
caller: person;
password,
timeon,
timeoff,
cs,
temp,
message: name;
baud: rate;
buffer: long;
access: byte;
libsects,
usernum,
lastmess,
nextmess,
charcount,
lastspace,
linecnt,
bufpointer,
width: integer;
firstread,
controls,
local,
filesopen,
messopen,
caps,
expert: boolean;
exitchar, bl, lf, bs : char;
sec, onsec, offsec : byte;
min, onmin, offmin : byte;
hour, onhour, offhour : byte;
date, ondate, offdate : byte;
month, onmonth, offmonth : byte;
usesec, usemin, usehour, maxtime, tottime, tottimeonx : integer;
(* master file created thru config.pas *)
messdrive: string[2];
filedrive: string[2];
applying : string[14];
welcome : string[14];
otherBBS : string[14];
helpfile : string[14];
sysinfo : string[14];
meetings : string[14];
bulletin : string[14];
filehelp : string[14];
mainmenu : string[14];
readmenu : string[14];
filemenu : string[14];
editmenu : string[14];
sysmenu : string[14];
sysop : byte;
paying : byte;
contrib : byte;
reg : byte;
newuser : byte;
twit : byte;
sysopt : integer;
payingt : integer;
contribt : integer;
regt : integer;
newusert : integer;
clockin : boolean;
sectsin : boolean;
openBBS : boolean;
usercnt : real;
maxidle : integer;
screenon : boolean;
printon : boolean;
sysopin : boolean;
type
master = record
messdrivex: string[2];
filedrivex: string[2];
applyingx : string[14];
welcomex : string[14];
otherBBSx : string[14];
helpfilex : string[14];
sysinfox : string[14];
meetingsx : string[14];
bulletinx : string[14];
filehelpx : string[14];
mainmenux : string[14];
readmenux : string[14];
filemenux : string[14];
editmenux : string[14];
sysmenux : string[14];
sysopx : byte;
payingx : byte;
contribx : byte;
regx : byte;
newuserx : byte;
twitx : byte;
sysoptx : integer;
payingtx : integer;
contribtx : integer;
regtx : integer;
newusertx : integer;
clockinx : boolean;
sectsinx : boolean;
openBBSx : boolean;
usercntx : real;
maxidlex : integer;
screenonx : boolean;
printonx : boolean;
sysopinx : boolean;
end;
var
masterfile: FILE of master;
mastrec : master;
PROCEDURE readmaster;
begin
assign(masterfile, 'master.bbs');
reset(masterfile);
with mastrec do begin
read(masterfile, mastrec);
messdrive:= messdrivex;
filedrive:= filedrivex;
applying := applyingx;
welcome := welcomex;
otherBBS := otherbbsx;
helpfile := helpfilex;
sysinfo := sysinfox;
meetings := meetingsx;
bulletin := bulletinx;
filehelp := filehelpx;
mainmenu := mainmenux;
readmenu := readmenux;
filemenu := filemenux;
editmenu := editmenux;
sysmenu := sysmenux;
sysop := sysopx;
paying := payingx;
contrib := contribx;
reg := regx;
newuser := newuserx;
twit := twitx;
sysopt := sysoptx;
payingt := payingtx;
contribt := contribtx;
regt := regtx;
newusert := newusertx;
clockin := clockinx;
sectsin := sectsinx;
openBBS := openbbsx;
usercnt := usercntx;
maxidle := maxidlex;
if firstread then begin
screenon := screenonx;
printon := printonx;
sysopin := sysopinx;
firstread := false;
end;
end;
close(masterfile);
end;
PROCEDURE rewritemaster;
begin
if caller <> 'SYSOP' then mastrec.usercntx := mastrec.usercntx + 1;
rewrite(masterfile);
write(masterfile, mastrec);
close(masterfile);
end;
(* end of master file *)
{$I MACHDEP.INC}
{$I IO.INC}
{$I MAILSYS.INC}
{$I FILESYS.INC}
{$I BBS2.INC}
begin
firstread := true;
readmaster;
exitchar := space;
local := false;
resetbuff;
setup;
defaults;
awaitcall;
repeat
readmaster;
if local then screenon := true;
if clockin then begin
clock(onmonth, ondate, onhour, onmin, onsec);
timeon := time(onmonth, ondate, onhour, onmin, onsec);
end;
flush;
resetbuff;
if sysopin and cts then softalarm;
lineout('TurboBBS Version ' + version);
if cts and not local then outfile(welcome);
if cts and not local then outfile(bulletin);
if cts then signon(caller);
if cts then initmess;
readmine; {checks for cts internally}
if cts then begin
command;
rewritemaster;
end;
writeln('hung up...');
endcall;
if messopen then closemess;
close(idfile);
defaults;
awaitcall;
until exitchar = abort;
end.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/