home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
153.img
/
TELES.ZIP
/
BOARDEDT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-07-23
|
45KB
|
1,394 lines
{$R-} {Range checking off}
{$B+} {Boolean complete evaluation on}
{$S+} {Stack checking on}
{$I+} {I/O checking on}
{$N-} {No numeric coprocessor}
{$V-}
Unit Boardedt;
Interface
Uses
Crt,
Dos,
Common;
{function mln(i:astr; l:integer):astr;
function mn(i,l:integer):astr;
procedure inu(var i:integer);
procedure ini(var i:byte);}
procedure dlboardedit;
{procedure eventedit;}
procedure boardedit;
procedure initvotes;
procedure changestuff;
Implementation
function mln(i:astr; l:integer):astr;
begin
while length(i)<l do i:=i+' ';
mln:=i;
end;
function mn(i,l:integer):astr;
begin
mn:=mln(cstr(i),l);
end;
procedure inu(var i:integer);
var s:astr;
begin
input(s,5); i:=value(s);
end;
procedure ini(var i:byte);
var s:astr;
begin
input(s,3); i:=value(s);
end;
procedure autoswac(var u:systatrec;r:restrictions);
begin
if r in u.autoac then u.autoac:=u.autoac-[r] else u.autoac:=u.autoac+[r];
end;
procedure autoacch(c:char; var u:systatrec);
begin
case c of
'L':autoswac(u,rlogon);
'C':autoSWAC(u,RCHAT);
'V':autoSWAC(u,RVALIDATE);
'B':autoSWAC(u,RBACKSPACE);
'A':autoSWAC(u,RAMSG);
'*':autoSWAC(u,RPOSTAN);
'P':autoSWAC(u,RPOST);
'E':autoSWAC(u,REMAIL);
'K':autoSWAC(u,RVOTING);
'M':autoswac(u,rmsg);
END;
end;
procedure zswac(var u:systatrec;r:restrictions);
begin
if r in u.newac then u.newac:=u.newac-[r] else u.newac:=u.newac+[r];
end;
procedure zacch(c:char; var u:systatrec);
begin
case c of
'L':zswac(u,rlogon);
'C':zSWAC(u,RCHAT);
'V':zSWAC(u,RVALIDATE);
'B':zSWAC(u,RBACKSPACE);
'A':zSWAC(u,RAMSG);
'*':zSWAC(u,RPOSTAN);
'P':zSWAC(u,RPOST);
'E':zSWAC(u,REMAIL);
'K':zSWAC(u,RVOTING);
'M':zswac(u,rmsg);
END;
end;
{
procedure eed;
var i1,i2,ii:integer; c:char; ij:astr;
begin
prt('Protocal number to delete? '); inu(ii);
if (ii>0) and (ii<=numprotocals) then begin
prompt(protocals[ii].descr+' Delete it? ');
if yn then begin
numprotocals:=numprotocals-1; for i1:=ii to numprotocals do
protocals[i1]:=protocals[i1+1];
rewrite(xp); for i1:=1 to numprotocals do write(xp,protocals[i1]);
close(xp);
end;
end;
end;
procedure eem;
var i1,i2,ii:integer; c:char; ij:astr;
begin
prt('Protocal number to edit? '); inu(ii);
if (ii>0) and (ii<=numprotocals) then begin with protocals[ii] do
repeat
cls;
print(' Protocal : '+cstr(ii));
print('1. Description: '+descr);
print('2. Send out : '+scmd);
print('3. Recieve in : '+rcmd);
print('4. Xfer Ok : '+cstr(xferok));
print('Q. Quit');
nl; prt('Which? '); onek(c,'Q1234');
case c of
'1':begin prt('New description? '); mpl(30); inputl(descr,30); end;
'2':begin
nl;
print('@1=Baud @2=Port @3=Filename');
prt('New send out command line? '); mpl(40);
input(scmd,40);
end;
'3':begin
nl;
print('@1=Baud @2=Port @3=Filename');
prt('New recieve command line? '); mpl(40);
input(rcmd,40);
end;
'4':begin prt('Xfer Ok Value? '); inu(xferok); end;
end;
until (c='Q') or hangup;
reset(xp); seek(xp,ii-1); write(xp,protocals[ii]); close(xp); c:=' ';
end;
end;
procedure eei;
var i1,i2,ii:integer; c:char; ij:astr;
begin
prt('Protocal number to insert before? '); inu(ii);
if (ii>5) and (ii<=numprotocals+1) and (numprotocals<19) then begin
numprotocals:=numprotocals+1; for i1:=numprotocals downto ii do
protocals[i1]:=protocals[i1-1];
with protocals[ii] do begin
descr:='NEW Protocal';
xferok:=-1;
end;
rewrite(xp); for i1:=1 to numprotocals do write(xp,protocals[i1]);
close(xp);
end;
end;
procedure Exproedit;
var i1,i2,ii:integer; c:char; ij:astr; abort,next:boolean; st:astr;
begin
if checkpw then
repeat
cls; abort:=false;
cl(0);printacr('NN Description of Protocal Xfer Ok Code',abort,next);
cl(9);printacr('-- ------------------------------ ============',abort,next);
ii:=1;
while (ii<=numprotocals) and (not abort) do
with protocals[ii] do begin
st:=mn(ii+5,2)+' '+mln(descr,30)+' '+mn(xferok,6);
printacr(st,abort,next);
ii:=ii+1;
end;
nl; prt('D)elete, I)nsert, M)odify, Q)uit :'); onek(c,'QDIM');
case c of
'D':eed;
'M':eem;
'I':eei;
end;
until (c='Q') or hangup;
end;
}
procedure initvotes;
var vdata:file of vdatar; cv,tv,ii:integer; i,i1,i2:astr; vd:vdatar; t1,tf:boolean;
u1:userrec;
begin
begin
assign(vdata,systat.gfilepath+'voting.dat'); {$I-} reset(vdata); {$I+}
if ioresult<>0 then begin
rewrite(vdata); vd.question:='<< No Question >>'; vd.numa:=0;
for cv:=0 to 19 do write(vdata,vd);
end;
repeat
cls;
for cv:=1 to 20 do begin
seek(vdata,cv-1); read(vdata,vd);
cl(4); if cv<10 then prompt(' ');
prompt(cstr(cv));cl(7);prompt(': ');cl(3);print(vd.question);
end;
prt('Which? '); input(i,2);
ii:=value(i); t1:=false;
if (ii>0) and (ii<21) then begin
cv:=1; t1:=true;
print('Enter new question:'); prt(':');
inputl(vd.question,79);
if vd.question='' then begin vd.numa:=0;vd.question:='<< NO QUESTION >>';
end else begin
vd.answ[0].ans:='No Comment';
vd.answ[0].numres:=0;
nl; print('Enter blank line for last answer,');
print('max 9 answers, 25 chars/answer');
tf:=false;
repeat
cl(4);prompt(cstr(cv));cl(7);prompt(':');cl(3);inputl(vd.answ[cv].ans,25); vd.answ[cv].numres:=0;
if vd.answ[cv].ans='' then begin
tf:=true;
if cv=1 then vd.question:='<< NO QUESTION >>'
end else cv:=cv+1;
until hangup or (cv=21) or tf;
vd.numa:=cv-1;
end;
seek(vdata,ii-1); write(vdata,vd);
vqu[ii]:= vd.numa<>0;
reset(uf); for cv:=1 to filesize(uf)-1 do begin
seek(uf,cv); read(uf,u1); u1.vote[ii]:=0; seek(uf,cv); write(uf,u1);
end;
close(uf);
thisuser.vote[ii]:=0;
end;
until (not t1) or hangup;
close(vdata);
end;
end;
procedure dlbed;
var i1,ii,i2:integer;
c:char;
d:dlnscan;
begin
prt('Directory number to delete? '); inu(ii);
if (ii>0) and (ii<=maxulb) then begin
prt(uboards[ii].name+' Delete it? ');
if yn then begin
maxulb:=maxulb-1; for i1:=ii to maxulb do
uboards[i1]:=uboards[i1+1];
rewrite(ulf); for i1:=0 to maxulb do write(ulf,uboards[i1]);
close(ulf); reset(uf);
for i1:=1 to filesize(uf)-1 do begin
seek(uf,i1);read(uf,user); d:=[];
for i2:=0 to ii-1 do
if i2 in user.dlnscn then
d:=d+[i2];
for i2:=ii+1 to 39 do
if i2 in user.dlnscn then
d:=d+[i2-1];
user.dlnscn:=(d+[39]); seek(uf,i1); write(uf,user);
end; close(uf);
d:=[];
for i2:=0 to ii-1 do
if i2 in thisuser.dlnscn then
d:=d+[i2];
for i2:=ii+1 to 39 do
if i2 in thisuser.dlnscn then
d:=d+[i2-1];
thisuser.dlnscn:=(d+[39]);
end;
end;
end;
{
procedure modevent;
var ii:integer; s:astr;
begin
cls;
prt('Event number to edit? '); inu(ii); cls;
print(' Event : '+cstr(ii));
print('<1>Description : '+uevent[ii].descr);
print('<2>Filename.ext: '+uevent[ii].batch);
print('<3>Time start : '+ctim(uevent[ii].time));
print('<Q>uit');
nl;
prt('Which? ');
onek(c,'123Q');
case c of
'1':begin
print('Enter new description'); mpl(25);
input(s,25); if s<>'' then uevent[ii].descr:=s;
end;
'2':begin
print('Enter new file name to run');
mpl(12); input(s,12); if s<>'' then uevent[ii].batch:=s;
end;
'3':begin
print('All entries 24 hour time. Hour: (0-23), Minute: (0-59)');
prompt(' Hour : ');
inu(t1h);
if (t1h<0) or (t1h>23) then t1h:=0;
prompt(' Minute : ');
inu(t1m);
if (t1m<0) or (t1m>59) then t1m:=0;
nl;
print('300 baud allowed off time:'); prompt(' Hour : ');
inu(t2h);
if (t2h<0) or (t2h>23) then t2h:=0;
prompt(' Minute : ');
inu(t2m);
if (t2m<0) or (t2m>59) then t2m:=0;
t1:=t1h*60+t1m;
t2:=t2h*60+t2m;
nl;nl;
print('Hours: '+tch(cstr(t1h))+':'+tch(cstr(t1m))+' to '+
tch(cstr(t2h))+':'+tch(cstr(t2m)));
nl;
procedure eventedit;
var nn:integer; abort,next:boolean;
begin
repeat
cls;
printacr(#3+#0+'NN Description Filename.Ext Time');
printacr(#3+#9+'-- ======================== ============ ====');
nn:=0;
repeat
nn:=nn+1;
printacr(mln(cstr(nn),3)+mln(uevent[nn].descr,26)
+mln(uevent[nn].batch,13)+ctim(uevent[nn].time),abort,next);
until (nn=9) or (hangup);
prt('D)elete, M)odify or Q)uit: ');
onek(c,'DMQ');
case c of
'D':delevent;
'M':modevent;
end;
until (c='Q') or (hangup);
end;
}
procedure dlbem;
var i1,ii,i2:integer;
c:char;
s:astr;
d:dlnscan;
begin
prt('Directory number to edit? '); inu(ii); cls;
if (ii>=0) and (ii<=maxulb) then with uboards[ii] do begin
repeat
cls; print(' Directory #: '+cstr(ii));
print('<1>Name : '+name);
print('<2>Filename : '+filename);
print('<3>DSL req : '+cstr(dsl));
print('<4>Password : "'+password+'"');
print('<5>Max files : '+cstr(maxfiles));
print('<6>D/L path : '+dlpath);
print('<7>Age Req''rd : '+cstr(agereq));
print('<8>AR flag : '+ar);
print('<9>Sig Key : '+key);
print('<Q>uit');
nl; prt('Which? '); onek(c,'Q123456789');
case c of
'1':begin prt('New name? '); inputl(name,25); end;
'2':begin
prt('New filename? ');
input(filename,8);
if pos('.',filename)>0 then
filename:=copy(filename,1,pos('.',filename)-1);
end;
'3':begin prt('New DSL? '); ini(dsl); end;
'4':begin prt('New PW? '); input(password,10); end;
'5':begin prt('Max files? '); inu(maxfiles); end;
'6':begin
print('This allows you to change what drive and path you are able');
print('to download from. If you attempt to use a path that does not');
print('exist on the specified drive, the BBS will crash when the');
print('directory is accessed.');
nl;
print('If you are changing the path to a new one, you will have to');
print('copy all the files in the previous path to the new path.');
nl;
prt('Enter new download drive:\path? ');mpl(40);input(s,40);
if s<>'' then
dlpath:=s;
end;
'7':begin
print('Enter the age required to enter this section.');
prt(':');mpl(2);input(s,2);if (value(s)>0) and (value(s)<100) and (s<>'') then
agereq:=value(s);
end;
'8':begin
prt('New AR? '); getkey(c); ar:=upcase(c);
if (ar<'A') or (ar>'G') then ar:='@'; nl;
end;
'9':begin
prt('New Board Key? '); getkey(c); key:=upcase(c);
end;
end;
until (c='Q') or hangup;
reset(ulf); seek(ulf,ii); write(ulf,uboards[ii]); close(ulf); c:=' ';
end;
end;
procedure dlbei;
var i1,ii,i2:integer;
c:char;
d:dlnscan;
begin
prt('Directory number to insert before? '); inu(ii);
if (ii>0) and (ii<=maxulb+1) and (maxulb<39) then begin
maxulb:=maxulb+1; for i1:=maxulb downto ii do
uboards[i1]:=uboards[i1-1];
with uboards[ii] do begin
name:='<< Not Used >>';
filename:='NEWDIR';
dsl:=0;
maxfiles:=50;
password:=''; getdir(0,i); dlpath:=i[1]+':DLOADS\'; agereq:=1; key:=' ';
end;
rewrite(ulf); for i1:=0 to maxulb do write(ulf,uboards[i1]);
close(ulf);reset(uf);
for i1:=1 to filesize(uf)-1 do begin
seek(uf,i1);read(uf,user); d:=[];
for i2:=0 to ii-1 do
if i2 in user.dlnscn then
d:=d+[i2];
for i2:=ii to 38 do
if i2 in user.dlnscn then
d:=d+[i2+1];
d:=d+[ii]; user.dlnscn:=d;
seek(uf,i1); write(uf,user);
end; close(uf);
d:=[];
for i2:=0 to ii-1 do
if i2 in thisuser.dlnscn then
d:=d+[i2];
for i2:=ii to 38 do
if i2 in thisuser.dlnscn then
d:=d+[i2+1];
d:=d+[ii]; thisuser.dlnscn:=d;
end;
end;
procedure bed;
var i1,i2,ii:integer; c:char; ij:astr;
begin
prt('Board number to delete? '); inu(ii);
if (ii>0) and (ii<=numboards) then begin
prompt(boards[ii].name+' Delete it? ');
if yn then begin
numboards:=numboards-1; for i1:=ii to numboards do
boards[i1]:=boards[i1+1];
rewrite(bf); for i1:=1 to numboards do write(bf,boards[i1]);
close(bf); reset(uf); for i1:=1 to filesize(uf)-1 do begin
seek(uf,i1);read(uf,user); for i2:=ii to numboards do begin
user.qscn[i2]:=user.qscn[i2+1]; user.qscan[i2]:=user.qscan[i2+1];
end;
seek(uf,i1); write(uf,user);
end; close(uf);
for i2:=ii to numboards do begin
thisuser.qscn[i2]:=thisuser.qscn[i2+1]; thisuser.qscan[i2]:=thisuser.qscan[i2+1];
end;
end;
end;
end;
procedure bem;
var i1,i2,ii:integer; c:char; ij:astr;
begin
prt('Board number to edit? '); inu(ii);
if (ii>0) and (ii<=numboards) then begin with boards[ii] do
repeat
cls;
print(' Board # : '+cstr(ii));
print('<1>Name : '+name);
print('<2>Filename : '+filename);
print('<3>Sig Key : '+key);
print('<4>SL req : '+cstr(sl));
print('<5>Post SL : '+cstr(postsl));
print('<6>AR flag : '+ar);
print('<7>Password : "'+pw+'"');
print('<8>Max Mess : '+cstr(maxmsgs));
prompt('<9>Anonymous : '); case anonymous of
yes:print('Yes');
no:print('No');
forced:print('Force');
dearabby:print('Dear abby');
end;
print('<Q>uit');
nl; prt('Which? '); onek(c,'Q123456789');
case c of
'1':begin prt('New name? '); inputl(name,30); end;
'2':begin
prt('New filename? ');
input(filename,8);
if pos('.',filename)>0 then
filename:=copy(filename,1,pos('.',filename)-1);
end;
'3':begin prt('New key? '); getkey(c); key:=c; nl; end;
'4':begin prt('New SL? '); ini(sl); end;
'5':begin prt('New Post SL? '); ini(postsl); end;
'6':begin prt('New AR? '); getkey(c); ar:=upcase(c);
if (ar<'A') or (ar>'G') then ar:='@'; nl; end;
'7':begin prt('New PW? '); input(pw,10); end;
'8':begin prt('Max messages? '); ini(maxmsgs);
if maxmsgs>200 then maxmsgs:=200; end;
'9':begin prt('New ANST (Y:es,N:o,F:orced,D:ear Abby) :'); onek(c,'YNFD');
case c of
'Y':anonymous:=yes;
'N':anonymous:=no;
'F':anonymous:=forced;
'D':anonymous:=dearabby;
end;
end;
end;
until (c='Q') or hangup;
reset(bf); seek(bf,ii-1); write(bf,boards[ii]); close(bf); c:=' ';
end;
end;
procedure bei;
var i1,i2,ii:integer; c:char; ij:astr;
begin
prt('Board number to insert before? '); inu(ii);
if (ii>0) and (ii<=numboards+1) and (numboards<39) then begin
numboards:=numboards+1; for i1:=numboards downto ii do
boards[i1]:=boards[i1-1];
with boards[ii] do begin
name:='<< Not used >>';
filename:='newboard';
sl:=30;
postsl:=30;
maxmsgs:=50;
pw:='';
anonymous:=no;
ar:='@';
key:=' ';
end;
rewrite(bf); for i1:=1 to numboards do write(bf,boards[i1]);
close(bf); reset(uf); for i1:=1 to filesize(uf)-1 do begin
seek(uf,i1);read(uf,user); for i2:=numboards downto ii do begin
user.qscn[i2]:=user.qscn[i2-1]; user.qscan[i2]:=user.qscan[i2-1];
end;
user.qscan[ii].number:=-32767; user.qscan[ii].ltr:='A'; user.qscn[ii]:=true;
user.qscan[ii].ext:=1; seek(uf,i1); write(uf,user);
end; close(uf);
for i2:=numboards downto ii do begin
thisuser.qscn[i2]:=thisuser.qscn[i2-1]; thisuser.qscan[i2]:=thisuser.qscan[i2-1];
end;
thisuser.qscan[ii].number:=-32767; thisuser.qscan[ii].ltr:='A'; thisuser.qscn[ii]:=true;
thisuser.qscan[ii].ext:=1;
end;
end;
procedure dlboardedit;
var i1,ii,culb,i2:integer;
c:char; abort,next,done:boolean;
ij:astr;
d:dlnscan;
begin
if checkpw then
repeat
cls; done:=false; abort:=false;
cl(0);printacr('NN Directory Name DSL Directory Path',abort,next);
cl(4);printacr('-- ========================= === ========================================',abort,next);
ii:=0;
while (ii<=maxulb) and (not abort) do
with uboards[ii] do begin
printacr(#3+#0+mn(ii,2)+' '+#3+#3+mln(name,25)+' '+#3+#9+mn(dsl,3)+' '+#3+#5+mln(dlpath,40),abort,next);
ii:=ii+1;
end;
nl; prt('D)elete, I)nsert, M)odify, Q)uit :'); onek(c,'QDIM');
case c of
'Q':done:=true;
'D':dlbed;
'M':dlbem;
'I':dlbei;
end;
until done or hangup;
end;
procedure boardedit;
var i1,i2,ii:integer; c:char; ij:astr; abort,next:boolean; st:astr;
begin
if checkpw then
repeat
cls; abort:=false;
cl(0);printacr('NN K Name Filename RSL PSL MaxM Password AR An',abort,next);
cl(4);printacr('-- = ------------------------------ ============ --- === ---- ========== -- ==',abort,next);
ii:=1;
while (ii<=numboards) and (not abort) do
with boards[ii] do begin
st:=#3+#0+mn(ii,2)+' '+#3+#9+key+' '+#3+#3+mln(name,30)+' '+#3+#9+mln(filename,12)+' '+mn(sl,3)+' '+mn(postsl,3)+' ';
st:=st+#3+#5+mn(maxmsgs,3)+' '+mln(pw,10)+' ';
if ar='@' then st:=st+' ' else st:=st+ar+' ';
case anonymous of
yes:st:=st+'Y';
no:st:=st+'N';
forced:st:=st+'F';
dearabby:st:=st+'DA';
end;
printacr(st,abort,next);
ii:=ii+1;
end;
nl; prt('D)elete, I)nsert, M)odify, Q)uit :'); onek(c,'QDIM');
case c of
'D':bed;
'M':bem;
'I':bei;
end;
until (c='Q') or hangup;
end;
procedure chstb;
var i:astr;
begin
nl;
prompt('New NewUser Password : ');
input(i,20);
nl;
print('NewUser Password: "'+i+'"');
nl;
prompt('Is this what you want? ');
if yn then systat.boardpw:=i;
end;
procedure chsta;
var i:astr;
begin
nl;
prompt('New Sysop Password : ');
input(i,20);
nl;
print('Sysop Password: "'+i+'"');
nl;
prompt('Is this what you want? ');
if yn then systat.sysoppw:=i;
end;
procedure chstc;
var i:astr; b2:boolean;
begin
nl;
prompt('Do you want the system closed? ');
b2:=yn;
nl;
prompt('System: '); if b2 then print('Closed') else print('Open');
nl;
prompt('Is this what you want? ');
if yn then systat.closedsystem:=b2;
end;
procedure chstd;
var i:astr; c1:integer;
begin
nl;
prompt('Com port (1-2) ? ');
inu(c1);
if (c1<1) or (c1>2) then c1:=systat.comport;
nl;
print('Com Port : '+cstr(c1));
nl;
print('If this is not correct, the BBS will hang and you will not be able');
print('to fix it easily.');
nl;
prompt('Are you sure this is what you want? ');
if yn then begin systat.comport:=c1; remove_port; iport; end;
end;
procedure chste;
var i:astr; c1:integer;
begin
NL;
prompt('Modem speed (300,1200,2400,4800,9600) ? ');
inu(c1);
if (c1<>300) and (c1<>1200) and (c1<>2400) and (c1<>4800) and (c1<>9600)
then c1:=systat.maxbaud;
nl;
print('Modem Speed : '+cstr(c1));
nl;
print('If your modem speed is LESS than what you specified, then the');
print('BBS will hang and you will not be able to fix it easily.');
nl;
prompt('Are you sure this is what you want? ');
if yn then systat.maxbaud:=c1;
end;
procedure chstg;
var i1,i2:astr; t1,t2,t1h,t1m,t2h,t2m:integer;
begin
if spd<>'KB' then begin cl(7); print('This can only be changed locally.'); end;
if spd='KB' then begin
nl;
prompt('Do you want to declare sysop hours? ');
if yn then begin
nl;
print('All entries 24 hour time. Hour: (0-23), Minute: (0-59)');
print('Chat on time:');
prompt(' Hour : ');
inu(t1h);
if (t1h<0) or (t1h>23) then t1h:=0;
prompt(' Minute : ');
inu(t1m);
if (t1m<0) or (t1m>59) then t1m:=0;
nl;
print('Chat off time:');
prompt(' Hour : ');
inu(t2h);
if (t2h<0) or (t2h>23) then t2h:=0;
prompt(' Minute : ');
inu(t2m);
if (t2m<0) or (t2m>59) then t2m:=0;
t1:=t1h*60+t1m;
t2:=t2h*60+t2m;
nl;nl;
print('Hours: '+tch(cstr(t1h))+':'+tch(cstr(t1m))+' to '+
tch(cstr(t2h))+':'+tch(cstr(t2m)));
nl;
prompt('Is this what you want? ');
if yn then begin
systat.lowtime:=t1;
systat.hitime:=t2;
end;
end else begin
systat.lowtime:=0;
systat.hitime:=0;
end;
end;
end;
procedure ch300dl;
var i1,i2:astr; t1,t2,t1h,t1m,t2h,t2m:integer;
begin
nl;
prompt('Do you want to declare 300 baud download hours? ');
if yn then begin
nl;
print('All entries 24 hour time. Hour: (0-23), Minute: (0-59)');
print('300 baud downloading available time on:');
prompt(' Hour : ');
inu(t1h);
if (t1h<0) or (t1h>23) then t1h:=0;
prompt(' Minute : ');
inu(t1m);
if (t1m<0) or (t1m>59) then t1m:=0;
nl;
print('300 baud downloading available time off:');
prompt(' Hour : ');
inu(t2h);
if (t2h<0) or (t2h>23) then t2h:=0;
prompt(' Minute : ');
inu(t2m);
if (t2m<0) or (t2m>59) then t2m:=0;
t1:=t1h*60+t1m;
t2:=t2h*60+t2m;
nl;nl;
print('Hours: '+tch(cstr(t1h))+':'+tch(cstr(t1m))+' to '+
tch(cstr(t2h))+':'+tch(cstr(t2m)));
nl;
prompt('Is this what you want? ');
if yn then begin
systat.b300dllowtime:=t1;
systat.b300dlhitime:=t2;
end;
end else begin
systat.b300dllowtime:=0;
systat.b300dlhitime:=0;
end;
end;
procedure chdl;
var i1,i2l:astr; t1,t2,t1h,t1m,t2h,t2m:integer;
begin
nl;
prompt('Do you want to declare download hours? ');
if yn then begin
nl;
print('All entries 24 hour time. Hour: (0-23), Minute: (0-59)');
print('Download available time:');
prompt(' Hour : ');
inu(t1h);
if (t1h<0) or (t1h>23) then t1h:=0;
prompt(' Minute : ');
inu(t1m);
if (t1m<0) or (t1m>59) then t1m:=0;
nl;
print('Download off time:');
prompt(' Hour : ');
inu(t2h);
if (t2h<0) or (t2h>23) then t2h:=0;
prompt(' Minute : ');
inu(t2m);
if (t2m<0) or (t2m>59) then t2m:=0;
t1:=t1h*60+t1m;
t2:=t2h*60+t2m;
nl;nl;
print('Hours: '+tch(cstr(t1h))+':'+tch(cstr(t1m))+' to '+
tch(cstr(t2h))+':'+tch(cstr(t2m)));
nl;
prompt('Is this what you want? ');
if yn then begin
systat.dllowtime:=t1;
systat.dlhitime:=t2;
end;
end else begin
systat.dllowtime:=0;
systat.dlhitime:=0;
end;
end;
procedure ch300;
var i1,i2:astr; t1,t2,t1h,t1m,t2h,t2m:integer;
begin
nl;
prompt('Do you want to declare 300 baud hours? ');
if yn then begin
nl;
print('All entries 24 hour time. Hour: (0-23), Minute: (0-59)');
print('300 baud allowed time:');
prompt(' Hour : ');
inu(t1h);
if (t1h<0) or (t1h>23) then t1h:=0;
prompt(' Minute : ');
inu(t1m);
if (t1m<0) or (t1m>59) then t1m:=0;
nl;
print('300 baud allowed off time:');
prompt(' Hour : ');
inu(t2h);
if (t2h<0) or (t2h>23) then t2h:=0;
prompt(' Minute : ');
inu(t2m);
if (t2m<0) or (t2m>59) then t2m:=0;
t1:=t1h*60+t1m;
t2:=t2h*60+t2m;
nl;nl;
print('Hours: '+tch(cstr(t1h))+':'+tch(cstr(t1m))+' to '+
tch(cstr(t2h))+':'+tch(cstr(t2m)));
nl;
prompt('Is this what you want? ');
if yn then begin
systat.b300lowtime:=t1;
systat.b300hitime:=t2;
end;
end else begin
systat.b300lowtime:=0;
systat.b300hitime:=0;
end;
end;
PROCEDURE CHSTH;
VAR I:astr;
BEGIN
PRINT('Enter new engage chat string');
mpl(79); inputl(i,79);
prompt('Is this what you want? ');
if yn then systat.engage:=i;
end;
procedure chsti;
var i:astr;
begin
print('Enter new end chat string');
mpl(79); inputl(i,79);
prompt('Is this what you want? ');
if yn then systat.endchat:=i;
end;
procedure chstj;
begin
prompt('Do you want to allow handles? ');
if yn then systat.alias:=true else systat.alias:=false;
end;
procedure chstk;
var i:astr;
begin
prompt('Please enter new echo character: ');
mpl(1);inputl(i,1);
nl;prompt('Is this what you want? ');
if yn then systat.echoc:=i[1];
end;
procedure chstl;
var i:astr;
begin
print('Please enter new sysop in string');
mpl(79); inputl(i,79);
prompt('Is this what you want? ');
if yn then systat.sysopin:=i;
end;
procedure chstm;
var i:astr;
begin
print('Please enter new sysop OUT string');
mpl(79); inputl(i,79);
prompt('Is this what you want? ');
if yn then systat.sysopout:=i;
end;
procedure chstn;
var i,ii:astr;
begin
print('Please enter new log on note. You may have 2 lines.');
mpl(79); inputl(i,79);
mpl(79); inputl(ii,79);
prompt('Is this what you want? ');
if yn then begin systat.note[1]:=i; systat.note[2]:=ii; end;
end;
procedure chsto;
var i:astr;
begin
print('Please enter new log on PROMPT.');
mpl(40); inputl(i,40);
prompt('Is this want you want? ');
if yn then systat.lprompt:=i;
end;
procedure chstp;
begin
prompt('Do you want to have ANSI logons? ');
if yn then systat.lansi:=true else systat.lansi:=false;
end;
procedure chstq;
var i:astr;
begin
cl(8);prompt('WARNING: '); cl(3); print('You should only change this if your modem is');
cl(3);print('incompatible with HAYES.'); print(' ');
prompt('Do you want to change this? ');
if yn then begin
print('Enter new modem init');
mpl(79); inputl(i,79);
prompt('Are you sure? ');
if yn then systat.init:=i
end;
end;
PROCEDURE CHSTR;
VAR I:astr;
BEGIN
cl(3);print('Enter new sysop working string.');
mpl(79);inputl(i,79);
prompt('Is this what you want? ');
if yn then systat.wait:=i;
end;
PROCEDURE CHSTS;
BEGIN
PRINT('Do you want to have new users email you? ');
if yn then systat.app:=true else systat.app:=false;
end;
procedure chstt;
begin
print('Do you want to use last 4 digits of ph# as 2nd pw? ');
if yn then systat.fone:=true else systat.fone:=false;
end;
procedure changestuff;
var i,i1:astr; c:char; b1,b2:boolean; c1,c2,c3:integer; abort,next:boolean; cc:integer;
procedure pomodem;
var done:boolean; s:astr;
begin
done:=false;
repeat
cls;
cl(5); print('Modem Configuration');
nl;
print('A) Modem Init String : '+systat.init);
print('B) Modem Baud Rate : '+cstr(systat.maxbaud));
print('C) COM Port number : '+cstr(systat.comport));
print('D) Send Carrier String : '+systat.answer);
print('E) Hangup Phone String : '+systat.hangup);
print('F) 300 Bps Result Code : '+cstr(systat.result300));
print('G) 1200 Bps Result Code : '+cstr(systat.result1200));
print('H) 2400 Bps Result Code : '+cstr(systat.result2400));
print('I) 4800 Bps Result Code : '+cstr(systat.result4800));
print('J) 9600 Bps Result Code : '+cstr(systat.result9600));
print('K) No Carrier Result Code: '+cstr(systat.nocarrier));
nl;
prt('Selection (A-K,Q=quit) : ');
onek(c,'ABCDEFGHIJKQ');
case c of
'A':chstq;
'B':chste;
'C':chstd;
'D':begin
print('Enter modem command string used to send a carrier');
prt(':');mpl(40);input(s,40); if s<>'' then systat.answer:=s;
end;
'E':begin
print('Enter string used to drop carrier');
prt(':');mpl(40);input(s,40); if s<>'' then systat.hangup:=s;
end;
'F':begin
print('Enter result code number returned when 300 baud connects');
prt(':');mpl(5);input(s,5); if s<>'' then systat.result300:=value(s);
end;
'G':begin
print('Enter result code number returned when 1200 baud connects');
prt(':');mpl(5);input(s,5); if s<>'' then systat.result1200:=value(s);
end;
'H':begin
print('Enter result code number returned when 2400 baud connects');
prt(':');mpl(5);input(s,5); if s<>'' then systat.result2400:=value(s);
end;
'I':begin
print('Enter result code number returned when 4800 baud connects');
prt(':');mpl(5);input(s,5); if s<>'' then systat.result4800:=value(s);
end;
'J':begin
print('Enter result code number returned when 9600 baud connects');
prt(':');mpl(5);input(s,5); if s<>'' then systat.result9600:=value(s);
end;
'K':begin
print('Enter result code number returned when there is no carrier');
prt(':');mpl(5);input(s,5); if s<>'' then systat.nocarrier:=value(s);
end;
'Q':done:=true;
end;
until (done) or (hangup);
end;
procedure poauto;
var done:boolean; s:astr; c:char; r:restrictions;
begin
done:=false;
repeat
cls;
cl(5); print('Auto Validation Command');
nl;
print('A) Security Level : '+cstr(systat.autosl));
print('B) D/L Security : '+cstr(systat.autodsl));
prompt('C) AR Flags : ');
for c:='A' to 'G' do
if (c in systat.autoar) then prompt(c) else prompt('-');
nl;
prompt('D) Access Restrictions : ');
for r:=rlogon to rmsg do
if r in systat.autoac then prompt(copy('LCVBA*PEKM',ORD(R)+1,1)) else prompt('-');
nl;
nl;
prt('Enter selection (A-D, Q=quit) :'); cl(9);
onek(c,'ABCDQ');
case c of
'A':begin
print('Enter SL given to a validated user.');
prt(':');mpl(3);input(s,3);if s<>'' then systat.autosl:=value(s);
end;
'B':begin
print('Enter DSL given to a validated user');
prt(':');mpl(3);input(s,3);if s<>'' then systat.autodsl:=value(s);
end;
'C':begin
prompt('Toggle AR Flag (A-G)? '); onek(c,#13'ABCDEFG'); c:=upcase(c);
if c in ['A'..'G'] then if c in systat.autoar then systat.autoar:=systat.autoar-[c]
else systat.autoar:=systat.autoar+[c];
end;
'D':begin
print('LCVBA*PEKM');
nl;prompt('Which? ');onek(c,'LCVBA*PEKM'+#13); c:=upcase(c); print(c); nl;
if c<>#13 then autoacch(c,systat);
end;
'Q':done:=true;
end;
until (done) or (hangup);
end;
procedure ponew;
var done:boolean; s:astr; c:char; r:restrictions;
begin
done:=false;
repeat
cls;
cl(5); print('New User Configuration');
nl;
print('A) Security Level : '+cstr(systat.newsl));
print('B) D/L Security : '+cstr(systat.newdsl));
prompt('C) AR Flags : ');
for c:='A' to 'G' do
if (c in systat.newar) then prompt(c) else prompt('-');
nl;
prompt('D) Access Restrictions : ');
for r:=rlogon to rmsg do
if r in systat.newac then prompt(copy('LCVBA*PEKM',ORD(R)+1,1)) else prompt('-');
nl;
print('E) New File Points : '+cstr(systat.newfp));
nl;
prt('Enter selection (A-E, Q=quit) :'); cl(9);
onek(c,'ABCDEQ');
case c of
'A':begin
print('Enter SL given to a new user');
prt(':');mpl(3);input(s,3);if s<>'' then systat.newsl:=value(s);
end;
'B':begin
print('Enter DSL given to a new user');
prt(':');mpl(3);input(s,3);if s<>'' then systat.newdsl:=value(s);
end;
'C':begin
prompt('Toggle AR Flag (A-G)? '); onek(c,#13'ABCDEFG'); c:=upcase(c);
if c in ['A'..'G'] then if c in systat.newar then systat.newar:=systat.newar-[c]
else systat.newar:=systat.newar+[c];
end;
'D':begin
print('LCVBA*PEKM');
nl;prompt('Which? ');onek(c,'LCVBA*PEKM'+#13); c:=upcase(c); print(c); nl;
if c<>#13 then zacch(c,systat);
end;
'E':begin
print('Enter File Points granted to new users');
prt(':');mpl(2);input(s,2);if s<>'' then systat.newfp:=value(s);
end;
'Q':done:=true;
end;
until (done) or (hangup);
end;
procedure postring;
var done:boolean; s:astr;
begin
done:=false;
repeat
cls;
cl(5); print('Text Configuration');
nl;
print('A) Engage chat string : '+systat.engage);
print('B) Exit chat string : '+systat.endchat);
print('C) Echo character : '+systat.echoc);
print('D) Sysop IN string : '+systat.sysopin);
print('E) Sysop OUT string : '+systat.sysopout);
print('F) Logon note #1 : '+systat.note[1]);
print(' Logon note #2 : '+systat.note[2]);
print('G) Logon prompt : '+systat.lprompt);
print('H) Sysop working str : '+systat.wait);
print('I) Pause screen : '+systat.pause);
print('J) Ansi Logon question: '+systat.ansiq);
nl;
prt('Enter selection (A-J, Q=quit) :'); cl(9);
onek(c,'ABCDEFGHIJQ');
case c of
'A':chsth;
'B':chsti;
'C':chstk;
'D':chstl;
'E':chstm;
'F':chstn;
'G':chsto;
'H':chstr;
'I':begin
print('Enter new pause string');
mpl(79);inputl(s,79);if s<>'' then systat.pause:=s;
end;
'J':begin
print('Enter new ansi logon question or <CR> for same.');
mpl(79);inputl(s,79);if s<>'' then systat.ansiq:=s;
end;
'Q':done:=true;
end;
until (done) or (hangup);
end;
procedure pofile;
var done:boolean; s:astr;
begin
done:=false;
repeat
cls;
cl(5); print('File Paths & BBS Configuration');
nl;
print('A) System password : '+systat.sysoppw);
print('B) Newuser password : '+systat.boardpw);
print('C) Gfiles drive & path : '+systat.gfilepath);
print('D) Message drive & path: '+systat.msgpath);
print('E) Menu data drive+path: '+systat.menupath);
print('F) BBS Name : '+systat.bbsname);
print('G) Sysop First Name : '+systat.sysopfirst);
print('H) Sysop Last Name : '+systat.sysoplast);
print('I) BBS Phone Number : '+systat.bbsphone);
print('J) Max lines in msg : '+cstr(systat.maxlines));
print('K) Sysop Color in Chat : '+cstr(systat.sysopcolor));
print('L) User Color in Chat : '+cstr(systat.usercolor));
prompt('M) Special Effects : '); if systat.special then print('Yes') else print('No');
prompt('O) BBS Password : '); if systat.bbspw='' then print('None') else print(systat.bbspw);
prompt('P) Matrix Logon : '); if systat.matrix then print('Yes') else print('No');
nl;
prt('Enter selection (A-M,Q=quit) :'); cl(9);
onek(c,'ABCDEFGHIJKLMOPQ');
case c of
'A':chsta;
'B':chstb;
'C':begin
nl;
print('Enter new gfiles path where data files are to be stored');
print('<CR>=no change.');
mpl(79);input(s,79);
if s<>'' then systat.gfilepath:=s;
end;
'D':begin
nl;
print('Enter new message drive:\path <CR>=no change');
mpl(79);input(s,79);if s<>'' then systat.msgpath:=s;
end;
'E':begin
nl;
print('Enter new menu data drive:\path <CR>=no change');
mpl(79);input(s,79);if s<>'' then systat.menupath:=s;
end;
'F':begin
nl;
print('Enter new BBS name, or <CR> for no change.');
prt(':');mpl(40);inputl(s,40);if s<>'' then systat.bbsname:=s;
end;
'G':begin
nl;
print('Enter Sysop''s first name, or <CR> for no change.');
prt(':');mpl(12);inputl(s,12);if s<>'' then systat.sysopfirst:=s;
end;
'H':begin
nl;
print('Enter Sysop''s last name, or <CR> for no change.');
prt(':');mpl(12);inputl(s,16);if s<>'' then systat.sysoplast:=s;
end;
'I':begin
nl;
print('Enter new BBS Phone number in the following format');
print('or <CR> for no change.');
print(' XXX-XXX-XXXX');
prt(':');mpl(12);input(s,12);if s<>'' then systat.bbsphone:=s;
end;
'J':begin
print('Enter maximum amount of lines allowed in a message (10-120):');
mpl(3);input(s,3); if (s<>'') and (value(s)>9) and (value(s)<121)
then systat.maxlines:=value(S);
end;
'K':begin
print('Enter numeric color value for the SysOp typing color:');
mpl(1);input(s,1);if s<>'' then systat.sysopcolor:=value(s);
end;
'L':begin
print('Enter numeric color value for the User typing color:');
mpl(1);input(s,1);if s<>'' then systat.usercolor:=value(s);
end;
'M':begin
print('Do you want opening screen special effects? ');
if yn then systat.special:=true else systat.special:=false;
end;
'O':Begin
print('Current BBS password is "'+systat.bbspw+'". Enter new BBS password.');
prt(':');mpl(20);
input(s,20); systat.bbspw:=s;
end;
'P':begin
prt('Do you want Telegard to have a Matrix Logon? ');
if yn then systat.matrix:=true else systat.matrix:=false;
end;
'Q':done:=true;
end;
until (done) or (hangup);
end;
procedure poflag;
var done:boolean; s:astr;
begin
done:=false;
repeat
cls;
cl(5); print('General Flags & SL Configuration'); nl;
prompt('A) System Status : ');
if systat.closedsystem then print('Closed') else print('Open');
prompt('B) Sysop hours : ');
if systat.lowtime=systat.hitime then
print('None')
else
with systat do
print(tch(cstr(lowtime div 60))+':'+tch(cstr(lowtime mod 60))+' to '+
tch(cstr(hitime div 60))+':'+tch(cstr(hitime mod 60)));
prompt('C) Allow handles : ');if systat.alias then print('Yes') else print('No');
prompt('D) ANSI Logons : ');if systat.lansi then print('Yes') else print('No');
prompt('E) Newuser App RQ: ');if systat.app then print('Yes') else print('No');
prompt('F) Phone # pw : ');if systat.fone then print('Yes') else print('No');
prompt('G) Multitasking : ');if systat.multitask then print('Yes') else print('No');
print('H) Bkspace delay : '+cstr(systat.bsdelay));
prompt('I) 300 Baud hours: ');
if systat.b300lowtime=systat.b300hitime then
print('Always allowed')
else
with systat do
print(tch(cstr(b300lowtime div 60))+':'+tch(cstr(b300lowtime mod 60))+' to '+
tch(cstr(b300hitime div 60))+':'+tch(cstr(b300hitime mod 60)));
prompt('J) 300 d/l hours : ');
if systat.b300dllowtime=systat.b300dlhitime then
print('Always allowed')
else
with systat do
print(tch(cstr(b300dllowtime div 60))+':'+tch(cstr(b300dllowtime mod 60))+' to '+
tch(cstr(b300dlhitime div 60))+':'+tch(cstr(b300dlhitime mod 60)));
prompt('K) reg d/l hours : ');
if systat.dllowtime=systat.dlhitime then
print('Always allowed')
else
with systat do
print(tch(cstr(dllowtime div 60))+':'+tch(cstr(dllowtime mod 60))+' to '+
tch(cstr(dlhitime div 60))+':'+tch(cstr(dlhitime mod 60)));
prompt('L) Lock out 300 : '); if systat.lock300 then print('Yes') else print('No');
print('M) # of tries : '+cstr(systat.tries));
{ prompt('O) Quote of Day : '); if systat.wantquote then print('Yes') else print('No');}
prompt('O) Message Cls : '); if systat.clearmsg then print('Yes') else print('No');
nl;
prt('Enter selection (A-O,Q=quit) :'); cl(9);
onek(c,'ABCDEFGHIJKLMOQ');
case c of
'A':chstc;
'B':chstg;
'C':chstj;
'D':chstp;
'E':chsts;
'F':chstt;
'G':begin
nl;
print('Is this system under multitasking environment? ');
if yn then systat.multitask:=true else systat.multitask:=false;
end;
'H':begin
nl;
prompt('Enter new backspace delay (1-255)');
prt(':');mpl(3);input(s,3);if s<>'' then systat.bsdelay:=value(s);
end;
'I':ch300;
'J':ch300dl;
'K':chdl;
'L':begin
print('When 300 baud callers are locked out, Telegard will print');
print(systat.gfilepath+'NO300.MSG when 300 baud is connected.'); nl;
ynq('Would you like to lock-out 300 baud callers? ');
if yn then systat.lock300:=true else systat.lock300:=false;
end;
'M':begin
prompt('Enter new # of tries allowed (1-255):');
prt(':');mpl(3);input(s,3);if s<>'' then systat.tries:=value(s);
end;
{ 'O':begin
cl(9);print('Do you want Telegard to display Quote of the Day');
ynq('At logon? ');if yn then systat.wantquote:=true else systat.wantquote:=false;
end;}
'O':begin
cl(9);print('Do you want Telegard to clear the screen before a message');
ynq('is printed? '); if yn then systat.clearmsg:=true else systat.clearmsg:=false;
end;
'Q':done:=true;
end;
until (done) or (hangup);
end;
var done:boolean;
begin
if checkpw then begin
repeat
done:=false;
abort:=false;
cls;
cl(5);
print('System Configuration:');
nl;
print('A) Modem Configuration');
print('B) String Configuration');
print('C) File Paths & BBS Configuration');
print('D) General Flags & SL settings');
print('E) New User Configuration');
print('F) Auto Validation Command');
nl;
prt('Enter selection (A-F, Q=quit) :'); cl(9);
onek(c,'ABCDEFQ');
case c of
'A':pomodem;
'B':postring;
'C':pofile;
'D':poflag;
'E':ponew;
'F':poauto;
'Q':done:=true;
end;
until (done) or (hangup);
savesystat;
end;
end;
END.