home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
153.img
/
TELES.ZIP
/
UNIT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-05-29
|
7KB
|
194 lines
program init;
Uses
Crt,Common;
Var
x:file of astr;
vdata:file of vdatar;
vd:vdatar;
fx:ulrec;
fi:text;
ns:pnr; fil:file of pnr;
boards1:boardrec;
slf1:file of slr;
strng:astr;
function exist(fn:astr):boolean;
var f:file;
begin
assign(f,fn);
{$I-} reset(f); {$I+}
exist:=(ioresult=0);
close(f);
end;
procedure move(s:astr);
var s1,i:astr; f,f1:text; a:integer;
begin
write(s); for a:=1 to length(s) do write(#8);
assign(f,s); s1:='gfiles\'+s; assign(f1,s1);
reset(f); rewrite(f1);
while not eof(f) do begin
readln(f,i); writeln(f1,i);
end;
close(f1); close(f);
end;
procedure make(s:astr);
var f:text; a:integer;
begin
textcolor(2);write(s);clreol;for a:=1 to length(s) do write(#8);
assign(f,'gfiles\'+s);
rewrite(f);
writeln(f,'This is "'+s+'"');
close(f);
end;
procedure make1(s:astr);
var f:text; a:integer;
begin
textcolor(2);write(s);textcolor(4);clreol;for a:=1 to length(s) do write(#8);
assign(f,'gfiles\'+s);
rewrite(f);
writeln(f);
close(f);
end;
var ii:integer;
begin
clrscr;
begin
textcolor(10);
writeln('-═════════════════════════════════════-');
textcolor(12);
writeln(' Telegard 1.4e Initialization Program');
textcolor(10);
writeln('-═════════════════════════════════════-');
textcolor(11);
writeln;
writeln('Beginning Initialization Process...');
textcolor(4);write('Creating Directory: '); textcolor(3);
mkdir('gfiles'); write('GFILES'+#8#8#8#8#8#8);
mkdir('msgs'); write('MSGS '+#8#8#8#8#8#8);
mkdir('dloads'); write('DLOADS'#8#8#8#8#8#8);
textcolor(13);writeln('Creating User Files');
assign(uf,'gfiles\user.lst'); assign(sf,'gfiles\names.lst');
assign(systatf,'status.dat');
rewrite(uf); write(uf,user);close(uf); rewrite(sf);
sr.number:=0; sr.name:='';
write(sf,sr);write(sf,sr);close(sf); rewrite(systatf);
systat.comport:=0;
systat.maxbaud:=0;
while (not (systat.comport in [1,2])) or
((systat.maxbaud<>300) and (systat.maxbaud<>1200) and (systat.maxbaud<>2400)) do begin
write('Which com port (1-2) ? ');
readln(systat.comport);
write('Modem speed (300,1200,2400) ? ');
readln(systat.maxbaud);
end;
getdir(0,strng);
with systat do begin boardpw:=''; sysoppw:='SYSOP';
hmsg.number:=-32767; hmsg.ltr:='A'; hmsg.ext:=1; users:=0;
lastdate:=''; callernum:=0; activetoday:=0; callstoday:=0; msgposttoday:=0;
emailtoday:=0; fbacktoday:=0; uptoday:=0; closedsystem:=false;
gfiledate:='01/01/85';
lowtime:=0; hitime:=0;
for t:=1 to 100 do res[t]:=0;
engage:='Hello, this is the Sysop...'; endchat:='Chat mode terminated.';
alias:=true; echoc:='X'; sysopin:='Sysop is in!'; sysopout:='The Sysop is out.';
note[1]:='Enter your full name or user #.'; note[2]:='New users type "NEW".';
lprompt:=':'; lansi:=false; if systat.maxbaud=300 then init:='ATS0=0Q0V0E0M0S2=1'
ELSE INIT:='ATS0=0Q0V0E0M0S2=1X1'; forcevoting:=false;
app:=true; fone:=true; wait:='[SYSOP WORKING]'; for ii:=1 to 9 do sysopmacro[II]:='>>=- Telegard Sysop Macro -=<<';
forcevoting:=false; gfilepath:=strng[1]+':GFILES\';
msgpath:=strng[1]+':MSGS\'; multitask:=false;
pause:='[ Pause ]'; hangup:='ATH'; answer:='ATA';
result300:=1; result1200:=5; result2400:=10;
nocarrier:=3; filesl:=10; tries:=3; newsl:=10;
newdsl:=0; newar:=[]; newac:=[rvalidate]; newdk:=0;
newuk:=0; bwindow:=true; bsdelay:=20; mcimsg:=false;
b300lowtime:=0; b300hitime:=0; dllowtime:=0; dlhitime:=0;
lock300:=false; b300dlhitime:=0; b300dllowtime:=0;
result4800:=0; result9600:=0; SysopFirst:='The';
SysopLast:='SysOp'; BBSName:='Telegard'; BBSPhone:='313-773-6041';
ansiq:='Ansi Logon? '; wantquote:=false; menupath:='MENUS\';
autosl:=50; autodsl:=50; autoac:=[]; autoar:=[];
end;
write(systatf,systat); close(systatf);
textcolor(9);write('Creating > ');
textcolor(14);make('WELCOME.MSG');
make('LOGON.MSG');
make('LOGOFF.MSG');
make('SYSTEM.MSG');
make('NEWUSER.MSG');
make1('USER.LOG');
make1('SYSOP.LOG');
make1('YSYSOP.LOG');
make1('BBSLIST.MSG');
make1('NONEWUSR.MSG');
textcolor(4);
writeln(' Creating board files..');
assign(bf,'gfiles\boards.dat');
with boards1 do begin
name:='General';
filename:='board1';
sl:=10;
postsl:=10;
maxmsgs:=50;
pw:='';
anonymous:=no;
ar:='@';
key:=' ';
end;
rewrite(bf); write(bf,boards1); close(bf);
assign(ulf,'gfiles\uploads.dat'); rewrite(ulf);
fx.name:='Sysop'; fx.dsl:=100; fx.filename:='ubsysop'; fx.maxfiles:=50; fx.password:='';
fx.agereq:=1; fx.dlpath:=strng[1]+':DLOADS\'; fx.ar:='@';
write(ulf,fx);
fx.name:='Miscellaneous'; fx.dsl:=0; fx.filename:='ub1'; fx.maxfiles:=50; fx.password:='';
fx.agereq:=1; fx.dlpath:=strng[1]+':DLOADS\'; fx.ar:='@';
write(ulf,fx);
close(ulf);
assign(x,'gfiles\laston.dat'); rewrite(x);
i:='';
for t:=1 to 8 do write(x,i);
close(x);
assign(vdata,'gfiles\voting.dat');
rewrite(vdata);
vd.question:='<< NO QUESTION >>'; vd.numa:=0;
for t:=1 to 9 do write(vdata,vd);
close(vdata);
assign(mailfile,'gfiles\email.dat');
rewrite(mailfile);
close(mailfile);
assign(fi,'gfiles\trashcan.txt');
rewrite(fi); i:='FUCK'; writeln(fi,i); i:='SHIT'; writeln(fi,i);
i:='DAMN'; writeln(fi,i); i:='DICKHEAD'; writeln(fi,i);
close(fi);
writeln;
writeln(' Copying seclev.dat');
assign(slf,'seclev.dat'); assign(slf1,'gfiles\seclev.dat');
reset(slf); rewrite(slf1);
for fw:=0 to 255 do begin read(slf,seclev[fw]); write(slf1,seclev[fw]); end;
close(slf1);
close(slf);
assign(fil,'gfiles\numbers.dat');
{$I-} reset(fil); {$I+}
if ioresult<>0 then begin
rewrite(fil);
ns.name:='========================================';
ns.number:='- --- --- ----';
ns.hs:=1;
for fw:=1 to 9 do write(fil,ns);
end; close(fil);
textcolor(11);writeln('Telegard 1.4e initialization complete');
writeln('Thank you for using Telegard Software.');
writeln;
textcolor(15);
writeln(' Call home of Telegard (313)-773-6041');
writeln(' and Flight From the Dark (313)-779-5385');
end;
end.