-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenus4.pas
More file actions
48 lines (39 loc) · 1.17 KB
/
menus4.pas
File metadata and controls
48 lines (39 loc) · 1.17 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
{$A+,B-,D-,E-,F+,I-,L-,N-,O+,R-,S+,V-}
{ Menu command execution routines. }
unit menus4;
interface
uses crt, dos, overlay, common;
procedure autovalidationcmd(const pw:astr;level:char);
implementation
procedure autovalidationcmd(const pw:astr;level:char);
var s:astr;
ok:boolean;
begin
nl;
if (thisuser.sl=general.validation[level].newsl) and
(thisuser.dsl=general.validation[level].newdsl) then begin
print('You''ve been validated! You do not need to use this command.');
exit;
end;
print('Press [Enter] to abort.');
prt(^M^J'Password: '); input(s,50);
if (s='') then print('^7Function aborted.'^G)
else begin
ok:=(s = allcaps(pw));
if (not ok) then
begin
sysoplog('Wrong password for auto-validation: "'+s+'"');
print('^7Wrong!'^G);
end
else
begin
sysoplog('Used auto-validation password.');
autovalidate(thisuser,usernum,level);
status_screen(100,'This user has auto-validated himself.',FALSE,s);
printf('autoval');
if (nofile) then
print(^M^J'Correct. You are now validated.');
end;
end;
end;
end.