Skip to content

Latest commit

 

History

History
67 lines (58 loc) · 2.09 KB

menus4.pas

File metadata and controls

67 lines (58 loc) · 2.09 KB
 
Nov 18, 2000
Nov 18, 2000
1
2
3
4
5
6
7
8
(*****************************************************************************)
(*> <*)
(*> MENUS4 .PAS - Written by Eric Oman <*)
(*> <*)
(*> Menu command execution routines. <*)
(*> <*)
(*> <*)
(*****************************************************************************)
Nov 25, 2000
Nov 25, 2000
9
{$A+,B+,E+,F+,I+,L+,N-,O+,R-,S+,V-}
Nov 18, 2000
Nov 18, 2000
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
unit menus4;
interface
uses
crt, dos,
{rcg11172000 no overlay under Linux.}
{overlay,}
common;
procedure autovalidationcmd(pw:astr);
implementation
procedure autovalidationcmd(pw:astr);
var s:astr;
ok:boolean;
begin
nl;
if (pw='') then begin
sysoplog('[> Auto-Validation command executed - No PW specified! Nothing done.');
print('Sorry; this function is not available at this time.');
exit;
end;
if (thisuser.sl=systat.autosl) and (thisuser.dsl=systat.autodsl) and
(thisuser.ar=systat.autoar) then begin
sysoplog('[> Already validated user executed Auto-Validation command');
print('You''ve already been validated! You do not need to use this command.');
exit;
end;
print('Note (or warning, if you prefer):');
print('The SysOp Log records ALL usage of this command.');
print('Press <Enter> to abort.');
nl;
prt('Password: '); input(s,50);
if (s='') then sprint(#3#7+'Function aborted.'^G)
else begin
ok:=(s=allcaps(pw));
if (not ok) then begin
sysoplog('[> User entered wrong password for Auto-Validation: "'+s+'"');
sprint(#3#7+'Wrong!'^G);
end else begin
sysoplog('[> User correctly entered Auto-Validation password.');
autovalidate(thisuser,usernum);
topscr; commandline('User Validated.');
printf('autoval');
if (nofile) then begin
nl;
print('Correct. You are now validated.');
end;
end;
end;
end;
end.