-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsysop2a.pas
More file actions
203 lines (188 loc) · 7.47 KB
/
sysop2a.pas
File metadata and controls
203 lines (188 loc) · 7.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
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
112
113
114
115
116
117
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
159
160
161
162
163
164
165
166
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
{$A+,B-,D-,E-,F+,I-,L-,N-,O+,R-,S+,V-}
{ System Configuration - BBS config and file paths }
unit sysop2a;
interface
uses crt, dos, overlay, common;
procedure pofile;
implementation
uses sysop3;
const
aresure='Are you sure this is what you want? ';
function wantit:boolean;
begin
nl; wantit:=pynq(aresure);
end;
function phours(const s:astr; lotime,hitime:integer):astr;
begin
if (lotime<>hitime) then
phours:=Zeropad(cstr(lotime div 60))+':'+Zeropad(cstr(lotime mod 60))+'...'+
Zeropad(cstr(hitime div 60))+':'+Zeropad(cstr(hitime mod 60))
else
phours:=s;
end;
procedure gettimerange(const s:astr; var st1,st2:integer);
var t1,t2,t1h,t1m,t2h,t2m:integer;
begin
if pynq(s) then begin
print(^M^J^M^J'All entries in 24 hour time. Hour: (0-23), Minute: (0-59)'^M^J);
prompt('Starting time:');
prt(' Hour : '); mpl(5); inu(t1h);
if (t1h<0) or (t1h>23) then t1h:=0;
prt(' Minute : '); mpl(5); inu(t1m);
if (t1m<0) or (t1m>59) then t1m:=0;
prompt(^M^J'Ending time: ');
prt(' Hour : '); mpl(5); inu(t2h);
if (t2h<0) or (t2h>23) then t2h:=0;
prt(' Minute : '); mpl(5); inu(t2m);
if (t2m<0) or (t2m>59) then t2m:=0;
t1:=t1h*60+t1m; t2:=t2h*60+t2m;
end
else begin t1:=0; t2:=0; end;
prompt(^M^J'Hours: '+phours('Undeclared',t1,t2));
if (wantit) then begin
st1:=t1;
st2:=t2;
end;
end;
procedure pofile;
var s:string[80];
i:integer;
c:char;
done:boolean;
begin
done:=FALSE;
repeat
with general do begin
cls;
print('^5Main BBS Configuration'^M^J);
abort:=FALSE;
printacr('^1A. BBS name/number :^5'+bbsname+' ^1(^5'+bbsphone+'^1)');
printacr('^1B. SysOp''s name :^5'+mln(sysopname,16)+
'^1C. Renegade Version :^5'+ver);
printacr('^1D. SysOp chat hours :^5'+mln(phours('*None*',lowtime,hitime),16)+
'^1E. Minimum baud hours :^5'+phours('Always allowed',minbaudlowtime,minbaudhitime));
printacr('^1F. Regular DL hours :^5'+mln(phours('Always allowed',dllowtime,dlhitime),16)+
'^1G. Minimum baud DL hrs:^5'+phours('Always allowed',minbauddllowtime,minbauddlhitime));
printacr('^1H. BBS Passwords '+
'^1I. Pre-event warning :^5'+cstr(eventwarningtime)+' seconds');
printacr('^1J. Startout menu :^5'+mln(allstartmenu,16)+
'^1K. Bulletin Prefix :^5'+bulletprefix);
printacr('^1L. Multinode support:^5'+mln(onoff(general.multinode),16)+
'^1M. Network mode :^5'+onoff(general.networkmode) + ^M^J);
printacr('^1 0. Main data files dir. :^5'+datapath);
printacr('^1 1. Miscellaneous Files dir.:^5'+miscpath);
printacr('^1 2. Message file storage dir:^5'+msgpath);
printacr('^1 3. Menu file directory :^5'+menupath);
printacr('^1 4. Nodelist (Version 7) dir:^5'+nodepath);
printacr('^1 5. Log files/trap files dir:^5'+logspath);
printacr('^1 6. Temporary directory :^5'+temppath);
printacr('^1 7. Protocols directory :^5'+protpath);
printacr('^1 8. Archivers directory :^5'+arcspath);
printacr('^1 9. File attach directory :^5'+fileattachpath);
printacr('^1 R. RAM drive/multinode path:^5'+multpath);
prt(^M^J'Enter selection (A-M,R,0-9) [Q]uit : ');
onek(c,'QABCDEFGHIJKLMR0123456789'^M); nl;
case c of
'Q':done:=TRUE;
'A':begin
prt('New BBS name: ');
inputwc(s,80);
if (s<>'') then bbsname:=s;
prt(^M^J'New BBS phone number: ');
input(s,12);
if (s<>'') then bbsphone:=s;
end;
'B':begin
prt('New SysOp name: '); mpl(30); inputl(s,30);
if (s<>'') then sysopname:=s;
end;
'C':begin
end;
'D':if (incom) then
print('^7This can only be changed locally.')
else
gettimerange('Do you want to declare chat hours? ',
lowtime,hitime);
'F':gettimerange('Do you want to declare download hours? ',
dllowtime,dlhitime);
'H':begin
print('System Passwords:');
print(' A. SysOp password :'+sysoppw);
print(' B. New user password :'+newuserpw);
print(' C. Baud override password:'+minbaudoverride);
prt(^M^J'Change (A-C) : '); onek(c,'QABC'^M);
if (c in ['A'..'C']) then begin
case c of
'A':prt('New SysOp password: ');
'B':prt('New new-user password: ');
'C':prt('New minimum baud rate override password: ');
end;
mpl(20);
case c of
'A':inputwn1(SysOpPW, 20, 'U', next);
'B':inputwn1(NewUserPW, 20, 'U', next);
'C':inputwn1(MinBaudOverride, 20, 'U', next);
end;
end;
end;
'E':gettimerange('Do you want to declare hours people at the minimum baud can logon? ',
minbaudlowtime,minbaudhitime);
'G':gettimerange('Do you want to declare hours people at minimum baud can download ? ',
minbauddllowtime,minbauddlhitime);
'I':begin
prt('New pre-event warning time ['+cstr(eventwarningtime)+'] : ');
inu(i);
if (not badini) then eventwarningtime:=i;
end;
'J':begin
prt('Menu to start all users at: ');
input(allstartmenu,8);
end;
'K':begin
prt('Default bulletin prefix: ');
input(bulletprefix,8);
end;
'L':if not incom then begin
multinode:=not multinode;
savegeneral(FALSE);
clrscr;
writeln('Please restart the system.');
halt;
end else print('Can only be changed locally.');
'M':begin
networkmode := not networkmode;
if networkmode then
localsec := TRUE
else
localsec := pynq('Do you want local security to remain on? ');
end;
'0'..'9','R':begin
prt('Enter new ');
case c of
'0':prt('DATA'); '1':prt('MISC');
'2':prt('MSGS'); '3':prt('MENUS');
'4':prt('NODELIST'); '5':prt('TRAP');
'6':prt('TEMP'); '7':prt('PROT');
'8':prt('ARCS'); '9':prt('FILE ATTACH');
'R':prt('MULTI NODE');
end;
prt(' path:'^M^J);
mpl(40); input(s,40);
if (s<>'') then begin
if s[length(s)]<>'\' then s:=s+'\';
if (wantit) then
case c of
'0':datapath:=s; '1':miscpath:=s;
'2':msgpath:=s; '3':menupath:=s;
'4':nodepath:=s; '5':logspath:=s;
'6':temppath:=s; '7':protpath:=s;
'8':arcspath:=s; '9':fileattachpath:=s;
'R':multpath:=s;
end;
end;
end;
end;
end;
until (done) or (hangup);
end;
end.