Skip to content

Latest commit

 

History

History
1355 lines (1237 loc) · 34.8 KB

init.pas

File metadata and controls

1355 lines (1237 loc) · 34.8 KB
 
Nov 18, 2000
Nov 18, 2000
1
2
3
4
5
6
7
8
9
10
11
(*****************************************************************************)
(*> <*)
(*> Telegard Bulletin Board System - Copyright 1988,89,90 by <*)
(*> Eric Oman, Martin Pollard, and Todd Bolitho - All rights reserved. <*)
(*> <*)
(*> Program name: INIT.PAS <*)
(*> Program purpose: Initialization program for new systems <*)
(*> <*)
(*****************************************************************************)
program init;
Nov 25, 2000
Nov 25, 2000
12
{$A+,B+,E+,F+,I+,L+,N-,O+,R-,S+,V-}
Nov 18, 2000
Nov 18, 2000
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{$M 50000,0,1024} { Declared here suffices for all Units as well! }
uses
crt, dos,
myio, timejunk;
{$I rec25.pas}
var
systatf:file of systatrec;
systat:systatrec;
modemf:file of modemrec;
modemr:modemrec;
fstringf:file of fstringrec;
fstring:fstringrec;
uf:file of userrec;
u:userrec;
sf:file of smalrec;
sr:smalrec;
bf:file of boardrec;
br:boardrec;
uff:file of ulrec;
ufr:ulrec;
xp:file of protrec;
xpr:protrec;
zf:file of zlogrec;
zfr:zlogrec;
brdf:file;
mixf:file;
tref:file;
(* mailfile:file of mailrec;
mr:mailrec;*)
lcallf:file of lcallers;
lcall:lcallers;
tfilf:file of tfilerec;
tfil:tfilerec;
verbf:file of verbrec;
vr:verbrec;
vdata:file of vdatar;
vd:vdatar;
smf:file of smr;
sm:smr;
ulff:file of ulfrec;
ulffr:ulfrec;
evf:file of eventrec;
evr:eventrec;
macrf:file of macrorec;
macr:macrorec;
fidorf:file of fidorec;
fidor:fidorec;
curdir:string;
path:array[1..8] of string;
found:boolean;
dirinfo:searchrec;
i,j,k:integer;
c:char;
function syn(b:boolean):astr;
begin
if (b) then syn:='Yes' else syn:='No ';
end;
function yn:boolean;
var c:char;
b:boolean;
begin
repeat c:=upcase(readkey) until c in ['Y','N',^M];
case c of 'Y':b:=TRUE; else b:=FALSE; end;
write(syn(b));
yn:=b;
end;
function pynq(s:string):boolean;
begin
textcolor(4); write(s);
textcolor(11); pynq:=yn;
end;
procedure prt(s:string);
begin
textcolor(9); write(s);
end;
procedure star(s:string);
begin
textcolor(9); write('þ ');
textcolor(11); cwrite(s); writeln;
end;
function freek(d:integer):longint;
var lng:longint;
begin
lng:=diskfree(d);
freek:=lng div 1024;
end;
function exdrv(s:astr):byte;
begin
Nov 19, 2000
Nov 19, 2000
112
113
{rcg11172000 always 'C' under Linux...}
{
Nov 18, 2000
Nov 18, 2000
114
115
s:=fexpand(s);
exdrv:=ord(s[1])-64;
Nov 19, 2000
Nov 19, 2000
116
117
}
exdrv := 3;
Nov 18, 2000
Nov 18, 2000
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
end;
function leapyear(yr:integer):boolean;
begin
leapyear:=(yr mod 4=0) and ((yr mod 100<>0) or (yr mod 400=0));
end;
function value(s:astr):longint;
var i,j:integer;
begin
val(s,i,j);
if (j<>0) then begin
s:=copy(s,1,j-1);
val(s,i,j)
end;
value:=i;
if (s='') then value:=0;
end;
function days(mo,yr:integer):integer;
var d:integer;
begin
d:=value(copy('312831303130313130313031',1+(mo-1)*2,2));
if ((mo=2) and (leapyear(yr))) then inc(d);
days:=d;
end;
function daycount(mo,yr:integer):integer;
var m,t:integer;
begin
t:=0;
for m:=1 to (mo-1) do t:=t+days(m,yr);
daycount:=t;
end;
function daynum(dt:astr):integer;
var d,m,y,t,c:integer;
begin
t:=0;
m:=value(copy(dt,1,2));
d:=value(copy(dt,4,2));
Nov 19, 2000
Nov 19, 2000
159
160
{rcg11182000 hahahaha...a Y2K bug. :) }
Nov 18, 2000
Nov 18, 2000
161
y:=value(copy(dt,7,2))+1900;
Nov 19, 2000
Nov 19, 2000
162
163
164
165
166
{rcg11182000 added this conditional. }
if (y < 1977) then { Ugh...this is so bad. }
y := y + 100;
Nov 18, 2000
Nov 18, 2000
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
for c:=1985 to y-1 do
if (leapyear(c)) then inc(t,366) else inc(t,365);
t:=t+daycount(m,y)+(d-1);
daynum:=t;
if y<1985 then daynum:=0;
end;
function tch(s:astr):astr;
begin
if (length(s)>2) then s:=copy(s,length(s)-1,2) else
if (length(s)=1) then s:='0'+s;
tch:=s;
end;
function time:astr;
var h,m,s:string[3];
hh,mm,ss,ss100:word;
begin
gettime(hh,mm,ss,ss100);
str(hh,h); str(mm,m); str(ss,s);
time:=tch(h)+':'+tch(m)+':'+tch(s);
end;
function date:astr;
var r:registers;
y,m,d:string[3];
yy,mm,dd,dow:word;
begin
getdate(yy,mm,dd,dow);
str(yy-1900,y); str(mm,m); str(dd,d);
date:=tch(m)+'/'+tch(d)+'/'+tch(y);
end;
procedure ttl(s:string);
begin
writeln;
textcolor(9); write('ÄÄ[');
textbackground(1); textcolor(15);
write(' '+s+' ');
textbackground(0); textcolor(9);
write(']');
repeat write('Ä') until wherex=80;
writeln;
end;
(* FIX THIS UP *)
procedure movefile(var ok,nospace:boolean; showprog:boolean;
srcname,destname:astr);
var buffer:array[1..16384] of byte;
fs,dfs:longint;
nrec,i:integer;
src,dest:file;
procedure dodate;
var r:registers;
od,ot,ha:integer;
begin
srcname:=srcname+#0;
destname:=destname+#0;
with r do begin
ax:=$3d00; ds:=seg(srcname[1]); dx:=ofs(srcname[1]); msdos(dos.registers(r));
ha:=ax; bx:=ha; ax:=$5700; msdos(dos.registers(r));
od:=dx; ot:=cx; bx:=ha; ax:=$3e00; msdos(dos.registers(r));
ax:=$3d02; ds:=seg(destname[1]); dx:=ofs(destname[1]); msdos(dos.registers(r));
ha:=ax; bx:=ha; ax:=$5701; cx:=ot; dx:=od; msdos(dos.registers(r));
ax:=$3e00; bx:=ha; msdos(dos.registers(r));
end;
end;
begin
ok:=TRUE; nospace:=FALSE;
assign(src,srcname);
{$I-} reset(src,1); {$I+}
if (ioresult<>0) then begin ok:=FALSE; exit; end;
Nov 19, 2000
Nov 19, 2000
241
242
243
{rcg11172000 why bother checking total disk space in a modern OS?}
{
Nov 18, 2000
Nov 18, 2000
244
245
246
247
248
249
250
dfs:=freek(exdrv(destname));
fs:=trunc(filesize(src)/1024.0)+1;
if (fs>=dfs) then begin
close(src);
nospace:=TRUE; ok:=FALSE;
exit;
end else begin
Nov 19, 2000
Nov 19, 2000
251
252
}
Nov 18, 2000
Nov 18, 2000
253
254
255
256
257
258
259
260
261
262
assign(dest,destname);
{$I-} rewrite(dest,1); {$I+}
if (ioresult<>0) then begin ok:=FALSE; exit; end;
repeat
blockread(src,buffer,16384,nrec);
blockwrite(dest,buffer,nrec);
until (nrec<16384);
close(dest); close(src);
dodate;
erase(src);
Nov 19, 2000
Nov 19, 2000
263
264
265
{rcg11172000 why bother checking total disk space in a modern OS?}
{end;}
Nov 18, 2000
Nov 18, 2000
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
end;
procedure ffile(fn:string);
begin
findfirst(fn,anyfile,dirinfo);
found:=(doserror=0);
end;
procedure nfile;
begin
findnext(dirinfo);
found:=(doserror=0);
end;
procedure movefile1(srcname,destpath:string);
var ps,ns,es:string;
ok,nospace:boolean;
begin
ok:=TRUE; nospace:=FALSE;
fsplit(srcname,ps,ns,es);
star(srcname+#3#9+' -- '+#3#11+destpath);
movefile(ok,nospace,FALSE,srcname,destpath+ns+es);
if (not ok) then
if (nospace) then
star('Move failed: Insufficient space!!'^G)
else
star('Move failed!!'^G);
end;
procedure movefiles(srcname,destpath:string);
var ok,nospace:boolean;
begin
ffile(srcname);
while found do begin
movefile1(dirinfo.name,destpath);
nfile;
end;
end;
function make_path(s:string):boolean;
begin
Nov 19, 2000
Nov 19, 2000
308
309
310
{rcg11182000 dosism.}
{while (copy(s,length(s),1)='\') do s:=copy(s,1,length(s)-1);}
while (copy(s,length(s),1)='/') do s:=copy(s,1,length(s)-1);
Nov 18, 2000
Nov 18, 2000
311
312
313
314
315
316
317
318
319
320
321
322
make_path:=TRUE;
{$I-} mkdir(fexpand(s)); {$I+}
if (ioresult<>0) then begin
writeln;
star('Error creating directory "'+fexpand(s)+'"'^G^G);
make_path:=FALSE;
end;
end;
procedure make_paths;
var s:string;
begin
Nov 19, 2000
Nov 19, 2000
323
324
325
326
327
328
329
330
{rcg11182000 1 to 7? Swap path is excluded...}
{for i:=1 to 7 do begin}
for i:=1 to 8 do begin
{rcg11182000 dosism.}
{while copy(path[i],length(path[i]),1)='\' do}
while copy(path[i],length(path[i]),1)='/' do
Nov 18, 2000
Nov 18, 2000
331
332
333
334
335
path[i]:=copy(path[i],1,length(path[i])-1);
case i of 1:s:='GFILES'; 2:s:='MSGS'; 3:s:='MENUS'; 4:s:='TFILES';
5:s:='AFILES'; 6:s:='TRAP'; 7:s:='TEMP'; 8:s:='SWAP'; end;
star(s+' path ("'+fexpand(path[i])+'")');
if (not make_path(path[i])) then halt(1);
Nov 19, 2000
Nov 19, 2000
336
337
338
{rcg11182000 dosism.}
{path[i]:=path[i]+'\';}
path[i]:=path[i]+'/';
Nov 18, 2000
Nov 18, 2000
339
340
341
342
343
end;
(* star('Creating EMAIL and GENERAL message paths');
if (not make_path(path[2]+'EMAIL\')) then halt(1);
if (not make_path(path[2]+'GENERAL\')) then halt(1);*)
star('Creating SYSOP and MISC file paths');
Nov 19, 2000
Nov 19, 2000
344
345
346
{rcg11182000 dosisms.}
{
Nov 18, 2000
Nov 18, 2000
347
348
349
350
351
352
353
if (not make_path('DLS\')) then halt(1);
if (not make_path('DLS\SYSOP')) then halt(1);
if (not make_path('DLS\MISC')) then halt(1);
star('Creating TEMP 1, 2, and 3 file paths');
if (not make_path(path[7]+'1\')) then halt(1);
if (not make_path(path[7]+'2\')) then halt(1);
if (not make_path(path[7]+'3\')) then halt(1);
Nov 19, 2000
Nov 19, 2000
354
355
356
357
358
359
360
361
}
if (not make_path('DLS/')) then halt(1);
if (not make_path('DLS/SYSOP')) then halt(1);
if (not make_path('DLS/MISC')) then halt(1);
star('Creating TEMP 1, 2, and 3 file paths');
if (not make_path(path[7]+'1/')) then halt(1);
if (not make_path(path[7]+'2/')) then halt(1);
if (not make_path(path[7]+'3/')) then halt(1);
Nov 18, 2000
Nov 18, 2000
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
end;
procedure make_status_dat;
begin
with systat do begin
gfilepath:=path[1];
msgpath:=path[2];
menupath:=path[3];
tfilepath:=path[4];
afilepath:=path[5];
trappath:=path[6];
temppath:=path[7];
bbsname:='Telegard BBS';
bbsphone:='000-000-0000';
sysopname:='System Operator';
maxusers:=9999;
lowtime:=0; hitime:=0;
dllowtime:=0; dlhitime:=0;
shuttlelog:=FALSE;
lock300:=FALSE;
sysoppw:='SYSOP';
newuserpw:='';
shuttlepw:='MATRIX';
b300lowtime:=0; b300hitime:=0;
b300dllowtime:=0; b300dlhitime:=0;
closedsystem:=FALSE;
swapshell:=FALSE;
eventwarningtime:=60;
tfiledate:=date;
{ with hmsg do begin ltr:='A'; number:=-32766; ext:=1; end; }
{* A-32767.1 is the "Greetings from Telegard" message *}
for i:=1 to 20 do res1[i]:=0;
sop:='s255';
csop:='s250';
msop:='s199';
fsop:='s230';
spw:='s250';
seepw:='s255';
normpubpost:='s11';
normprivpost:='s11';
anonpubread:='s100';
anonprivread:='s100';
anonpubpost:='s100';
anonprivpost:='s100';
seeunval:='s50';
dlunval:='s230';
nodlratio:='s255';
nopostratio:='s200';
nofilepts:='s255';
ulvalreq:='s21';
for i:=1 to 100 do res2[i]:=0;
maxprivpost:=20;
maxfback:=5;
maxpubpost:=20;
maxchat:=3;
maxwaiting:=15;
csmaxwaiting:=50;
maxlines:=120;
csmaxlines:=160;
maxlogontries:=4;
bsdelay:=20;
sysopcolor:=4;
usercolor:=3;
minspaceforpost:=10;
minspaceforupload:=100;
backsysoplogs:=7;
wfcblanktime:=0;
linelen:=80;
pagelen:=25;
for i:=1 to 18 do res3[i]:=0;
specialfx:=TRUE;
fossil:=FALSE;
allowalias:=TRUE;
phonepw:=TRUE;
localsec:=FALSE;
localscreensec:=FALSE;
globaltrap:=FALSE;
autochatopen:=TRUE;
autominlogon:=TRUE;
bullinlogon:=TRUE;
lcallinlogon:=TRUE;
yourinfoinlogon:=TRUE;
multitask:=FALSE;
offhooklocallogon:=TRUE;
forcevoting:=FALSE;
compressbases:=FALSE;
searchdup:=FALSE;
slogtype:=0;
stripclog:=FALSE;
newapp:=1;
guestuser:=-1;
timeoutbell:=2;
timeout:=5;
usewfclogo:=TRUE;
useems:=FALSE;
usebios:=TRUE;
cgasnow:=FALSE;
for i:=1 to 16 do res4[i]:=0;
for i:=1 to 5 do
with filearcinfo[i] do
case i of
1:begin
active:=TRUE;
ext:='ZIP';
listline:='/1';
arcline:='PKZIP -aex @F @I';
unarcline:='PKUNZIP @F @I';
testline:='PKUNZIP -t @F';
cmtline:='PKZIP -z @F';
succlevel:=0;
end;
2:begin
active:=FALSE;
ext:='ARC';
listline:='/2';
arcline:='PKPAK a @F @I';
unarcline:='PKUNPAK @F @I';
testline:='PKUNPAK -t @F';
cmtline:='PKPAK x @F';
succlevel:=0;
end;
3:begin
active:=FALSE;
ext:='PAK';
listline:='/2';
arcline:='PAK a @F @I';
unarcline:='PAK e @F @I';
testline:='PAK t @F';
cmtline:='';
succlevel:=-1;
end;
4:begin
active:=FALSE;
ext:='LZH';
listline:='/4';
arcline:='LHARC a @F @I';
unarcline:='LHARC e @F @I';
testline:='LHARC t @F';
cmtline:='';
succlevel:=0;
end;
5:begin
active:=FALSE;
ext:='ZOO';
listline:='/3';
arcline:='ZOO aP: @F @I';
unarcline:='ZOO x @F @I';
testline:='ZOO xNd @F';
cmtline:='ZOO cA @F';
succlevel:=0;
end;
6:begin
active:=FALSE;
ext:='DWC';
listline:='DWC v @F';
arcline:='DWC a @F @I';
unarcline:='DWC x @F @I';
testline:='DWC t @F';
cmtline:='';
succlevel:=0;
end;
end;
filearcinfo[6].ext:='';
filearccomment[1]:=bbsname+' '+bbsphone;
filearccomment[2]:=''; filearccomment[3]:='';
uldlratio:=TRUE;
fileptratio:=FALSE;
fileptcomp:=3;
fileptcompbasesize:=10;
ulrefund:=100;
tosysopdir:=0;
validateallfiles:=FALSE;
remdevice:='COM1';
maxintemp:=500;
minresume:=100;
maxdbatch:=20;
maxubatch:=20;
for i:=1 to 30 do res5[i]:=0;
newsl:=20;
newdsl:=20;
newar:=[];
newac:=[rpostan,rvoting];
newfp:=0;
autosl:=50;
autodsl:=50;
autoar:=[];
autoac:=[];
allstartmenu:='MAIN';
chatcfilter1:='';
chatcfilter2:='';
bulletprefix:='BULLET';
for i:=1 to 15 do res6[i]:=0;
for i:=0 to 255 do begin
case i of 0..9:k:=1; 10..19:k:=10; 20..29:k:=20; 30..39:k:=40;
40..49:k:=50; 50..59:k:=80; 60..69:k:=90; 70..79:k:=100;
80..89:k:=110; 90..99:k:=120; 100..199:k:=130;
200..239:k:=150; 240..249:k:=200; 250:k:=250;
251..255:k:=6000; end; timeallow[i]:=k;
case i of 200..255:k:=20; 100..199:k:=15; 50..99:k:=10;
30..49:k:=5; 20..29:k:=3; else k:=1; end; callallow[i]:=k;
case i of 60..255:k:=5; 20..59:k:=3; else k:=2; end; dlratio[i]:=k;
case i of 60..255:k:=10; 20..59:k:=5; else k:=2; end; dlkratio[i]:=k;
postratio[i]:=100;
end;
lastdate:=date;
curwindow:=1;
istopwindow:=FALSE;
callernum:=0;
numusers:=1;
with todayzlog do begin
for i:=0 to 4 do userbaud[i]:=0;
active:=0; calls:=0; newusers:=0; pubpost:=0;
privpost:=0; fback:=0; criterr:=0;
uploads:=0; downloads:=0;
uk:=0; dk:=0;
end;
postcredits:=0;
rebootforevent:=FALSE;
watchdogdoor:=FALSE;
windowon:=TRUE;
swappath:=path[8];
for i:=1 to 119 do res[i]:=0;
end;
Nov 19, 2000
Nov 19, 2000
599
Nov 18, 2000
Nov 18, 2000
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
assign(systatf,'status.dat');
rewrite(systatf); write(systatf,systat); close(systatf);
end;
procedure make_fidonet_dat;
begin
with fidor do begin
zone:=0;
net:=0;
node:=0;
point:=0;
origin:=copy(systat.bbsname+' ('+systat.bbsphone+')',1,50);
text_color:=1;
quote_color:=3;
tear_color:=9;
origin_color:=5;
skludge:=TRUE;
sseenby:=TRUE;
sorigin:=FALSE;
scenter:=TRUE;
sbox:=TRUE;
mcenter:=TRUE;
addtear:=TRUE;
end;
assign(fidorf,'fidonet.dat');
rewrite(fidorf); write(fidorf,fidor); close(fidorf);
end;
procedure make_modem_dat;
var i,j:integer;
begin
with modemr do begin
waitbaud:=1200;
comport:=1;
init:='ATH0Q0V0E0M0X1S0=0S2=43S10=40&C1';
answer:='ATA';
hangup:='~~~+++~~~ATH0';
offhook:='ATH1M0';
nocallinittime:=30;
arq9600rate:=9600;
noforcerate:=FALSE;
nocarrier:=3;
nodialtone:=6;
busy:=7;
for i:=1 to 2 do
for j:=0 to 4 do begin
case i of
1:case j of 0:k:=1; 1:k:=5; 2:k:=10; 3:k:=0; 4:k:=13; end;
2:case j of 0:k:=0; 1:k:=15; 2:k:=16; 3:k:=0; 4:k:=17; end;
end;
resultcode[i][j]:=k;
end;
modemr.ctschecking:=TRUE;
modemr.dsrchecking:=TRUE;
modemr.usexonxoff:=FALSE;
modemr.hardwired:=FALSE;
end;
assign(modemf,'modem.dat');
rewrite(modemf); write(modemf,modemr); close(modemf);
end;
procedure make_string_dat;
begin
with fstring do begin
ansiq:='Display ANSI logon? ';
note[1]:='Enter your Telegard NAME or USER NUMBER';
note[2]:='* NEW USERS, enter "NEW" *';
lprompt:='Logon : ';
echoc:='X';
sysopin:='^3The SysOp is probably around!';
sysopout:='^3The SysOp is NOT here, or doesn''t want to chat';
engage:='@M^3The SysOp brings you into chat!';
endchat:='^3The SysOp returns you to the BBS....@M';
wait:='^3{-^9Please Wait^3-}';
pause:='(* pause *)';
entermsg1:='Enter message now. You have ^3@X^1 lines maximum.';
entermsg2:='Enter ^3/S^1 to save. ^3/?^1 for a list of commands.';
newscan1:='^7[^5@Y ^7- ^5@W msgs^7] ^4NewScan began.@M';
newscan2:='^7[^5@Y ^7- ^5@W msgs^7] ^4NewScan complete.@M';
scanmessage:='^3[^1@Y^3]@M^5[@U] ^4Read (1-@W,<CR>,?=help) : ';
automsgt:='^5AutoMessage by: ';
autom:='-';
shelldos1:=#3#5+'>> '+systat.sysopname+' has shelled to DOS, please wait ...';
shelldos2:=#3#5+'>> Thank you for waiting';
chatcall1:=#3#0+'Paging '+systat.sysopname+' for chat, please wait.....';
chatcall2:=#3#7+' >>'+#3#5+'<'+#3#8+'*'+#3#5+'>'+#3#7+'<<';
guestline:='Enter "GUEST" as your user name to be a guest user on the system.';
namenotfound:=#3#5+'That name is'+#3#8+' NOT'+#3#5+' found in the user list.';
bulletinline:=#3#4+'Enter Bulletin Selection (XX,?,Q=Quit) : ';
thanxvote:=#3#3+'Thanks for taking the time to vote!';
listline:='List files - P to Pause';
newline:='Search for new files -';
searchline:='Search all directories for a file mask -';
findline1:='Search descriptions and filenames for keyword -';
findline2:='Enter the string to search for:';
downloadline:='Download - You have @P file points.';
uploadline:='Upload - @Kk free on this drive';
viewline:='View archive interior files -@MP to Pause, N for Next file';
nofilepts:=#3#8+'Access denied: '+#3#5+'Insufficient file points to download.';
unbalance:=#3#8+'Access denied: '+#3#5+'Your upload/download ratio is out of balance:';
pninfo:='P to Pause, N for next directory';
gfnline1:='[Enter]=All files';
gfnline2:=#3#4+'File mask: ';
batchadd:='File added to batch queue.';
end;
assign(fstringf,'string.dat');
rewrite(fstringf); write(fstringf,fstring); close(fstringf);
end;
procedure make_user_lst;
const dcols:clrs=((15,7,7,15,15,15,112,7,143,7),(15,7,1,11,9,14,31,4,140,10));
begin
with u do begin
name:='SYSOP';
realname:='System Operator';
pw:='SYSOP';
ph:='000-000-0000';
bday:='00/00/00';
firston:=date;
laston:=date;
street:='';
citystate:='';
zipcode:='';
computer:='IBM Compatible';
occupation:='';
wherebbs:='';
note:='Change these stats to yours.';
lockedout:=FALSE;
deleted:=FALSE;
lockedfile:='';
ac:=[onekey,pause,novice,ansi,color,
smw, {* short message waiting, in SHORTMSG.DAT *}
fnodlratio,fnopostratio,fnofilepts,fnodeletion];
ar:=[]; for c:='A' to 'Z' do ar:=ar+[c];
(* with qscan[1] do begin ltr:='A'; number:=-32767; ext:=1; end;*)
(* for i:=2 to maxboards do qscan[i]:=qscan[1];*)
(* for i:=1 to maxboards do qscn[i]:=TRUE;*)
(* dlnscn:=[];*)
(* for i:=0 to maxuboards do dlnscn:=dlnscn+[i];*)
for i:=1 to 20 do vote[i]:=0;
sex:='M';
ttimeon:=0;
uk:=0;
dk:=0;
uploads:=0;
downloads:=0;
loggedon:=0;
tltoday:=600;
msgpost:=0;
emailsent:=0;
feedback:=0;
forusr:=0;
filepoints:=0;
waiting:=1; {* A-32767.1 -- "Greetings from Telegard" message *}
linelen:=80;
pagelen:=20; {* to make room for SysOp window when on.. *}
ontoday:=0;
illegal:=0;
sl:=255;
dsl:=255;
cols:=dcols;
lastmsg:=1;
lastfil:=0;
credit:=0;
timebank:=0;
for i:=1 to 5 do boardsysop[i]:=255;
trapactivity:=FALSE;
trapseperate:=FALSE;
timebankadd:=0;
mpointer:=-1;
chatauto:=FALSE;
chatseperate:=FALSE;
userstartmenu:='';
slogseperate:=FALSE;
{* NEW STUFF *}
clsmsg:=2; { clear screen before displaying each message }
flistopt:=1; { use file listing option #1 (normal) }
msgorder:=0; { use Chrono message ordering }
avadjust:=1; { no AVATAR color adjustment }
{* NEW STUFF *ENDS* *}
for i:=1 to 54 do res[i]:=0;
end;
assign(uf,'user.lst');
rewrite(uf);
seek(uf,0); write(uf,u); { write dummy record }
seek(uf,1); write(uf,u); { write user #1 }
close(uf);
end;
procedure make_names_lst;
begin
with sr do begin
name:='SYSOP';
number:=1;
end;
assign(sf,'names.lst');
rewrite(sf);
seek(sf,0); write(sf,sr);
seek(sf,1); write(sf,sr); {* think that was the bug... time will tell *}
close(sf);
end;
procedure make_macro_lst;
var i:integer;
begin
with macr do
for i:=1 to 4 do macro[i]:='';
assign(macrf,'macro.lst');
rewrite(macrf);
seek(macrf,0); write(macrf,macr);
close(macrf);
end;
procedure make_boards_dat;
begin
with br do begin
name:='General Messages';
filename:='GENERAL';
msgpath:='';
acs:='';
postacs:='vv';
mciacs:='%';
maxmsgs:=50;
anonymous:=atno;
password:='';
mbstat:=[mbskludge,mbsseenby,mbscenter,mbsbox,mbmcenter,mbaddtear];
permindx:=0;
mbtype:=1;
origin:=fidor.origin;
text_color:=fidor.text_color;
quote_color:=fidor.quote_color;
tear_color:=fidor.tear_color;
origin_color:=fidor.origin_color;
for i:=1 to 11 do res[i]:=0;
end;
assign(bf,'boards.dat');
rewrite(bf); write(bf,br); close(bf);
end;
procedure make_uploads_dat;
begin
assign(uff,'uploads.dat');
rewrite(uff);
with ufr do begin
name:='SysOp directory';
filename:='SYSOP';
Nov 19, 2000
Nov 19, 2000
853
854
855
{rcg11182000 dosisms}
{dlpath:=curdir+'\DLS\SYSOP\';}
dlpath:=curdir+'/DLS/SYSOP/';
Nov 18, 2000
Nov 18, 2000
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
ulpath:=dlpath;
maxfiles:=2000;
password:='';
arctype:=1;
cmttype:=1;
fbdepth:=0;
fbstat:=[];
acs:='s255d255';
ulacs:='';
nameacs:='s255';
permindx:=0;
for i:=1 to 6 do res[i]:=0;
end;
write(uff,ufr);
with ufr do begin
name:='Miscellaneous';
filename:='MISC';
Nov 19, 2000
Nov 19, 2000
873
874
875
{rcg11182000 dosisms}
{dlpath:=curdir+'\DLS\MISC\';}
dlpath:=curdir+'/DLS/MISC/';
Nov 18, 2000
Nov 18, 2000
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
ulpath:=dlpath;
maxfiles:=2000;
password:='';
arctype:=1;
cmttype:=1;
fbdepth:=0;
fbstat:=[];
acs:='d30';
ulacs:='';
nameacs:='';
permindx:=1;
for i:=1 to 6 do res[i]:=0;
end;
write(uff,ufr); close(uff);
end;
procedure make_zlog_dat;
var i:integer;
begin
with zfr do begin
date:='08/18/89';
for i:=0 to 4 do userbaud[i]:=0;
active:=0; calls:=0; newusers:=0; pubpost:=0; privpost:=0;
fback:=0; criterr:=0;
uploads:=0; downloads:=0;
uk:=0; dk:=0;
end;
assign(zf,'zlog.dat');
rewrite(zf); write(zf,zfr);
zfr.date:=''; write(zf,zfr);
close(zf);
end;
procedure blockwritestr(var f:file; s:string);
begin
blockwrite(f,s[0],1);
blockwrite(f,s[1],ord(s[0]));
end;
procedure savemhead1(var brdf:file; mhead:mheaderrec);
procedure outftinfo(var ft:fromtoinfo);
var s:string;
begin
with ft do begin
blockwrite(brdf,anon,1);
blockwrite(brdf,usernum,2);
blockwritestr(brdf,as);
blockwritestr(brdf,real);
blockwritestr(brdf,alias);
end;
end;
begin
with mhead do begin
blockwrite(brdf,signature,4);
blockwrite(brdf,msgptr,4);
blockwrite(brdf,isreplyto_iddate,6);
blockwrite(brdf,isreplyto_idrand,2);
blockwritestr(brdf,title);
outftinfo(fromi);
outftinfo(toi);
blockwritestr(brdf,originsite);
end;
end;
procedure make_email_brd;
var t:text;
fb:file;
mheader:mheaderrec;
mixr:msgindexrec;
s:string;
dt:ldatetimerec;
pdt:packdatetime;
lng,lsize:longint;
i:integer;
bb:byte;
year,month,day,dow,hour,min,sec,sec100:word;
begin
assign(fb,'tosysop.ltr'); reset(fb,1); lsize:=filesize(fb); close(fb);
assign(t,'tosysop.ltr'); reset(t);
assign(brdf,'email.brd');
rewrite(brdf,1);
lng:=$FC020010; blockwrite(brdf,lng,4);
lng:=$DCBA0123; blockwrite(brdf,lng,4);
blockwrite(brdf,lsize,4);
while (not eof(t)) do begin
readln(t,s);
bb:=$FF; blockwrite(brdf,bb,1);
blockwrite(brdf,s[0],1);
blockwrite(brdf,s[1],ord(s[0]));
end;
close(t);
erase(t);
with mixr do begin
messagenum:=1;
hdrptr:=filesize(brdf);
msgindexstat:=[miexist];
msgid:=4242;
getdate(year,month,day,dow);
dt.year:=year; dt.month:=month; dt.day:=day;
gettime(hour,min,sec,sec100);
dt.hour:=hour; dt.min:=min; dt.sec:=sec; dt.sec100:=sec100;
dt2pdt(dt,pdt);
for i:=1 to 6 do msgdate[i]:=pdt[i];
msgdowk:=0;
for i:=1 to 6 do lastdate[i]:=pdt[i];
lastdowk:=0;
isreplyto:=65535;
numreplys:=0;
end;
assign(mixf,'email.mix');
rewrite(mixf,sizeof(mixr)); blockwrite(mixf,mixr,1); close(mixf);
with mheader do begin
signature:=$ABCD0123;
msgptr:=4;
for i:=1 to 6 do isreplyto_iddate[i]:=0;
isreplyto_idrand:=0;