-
Notifications
You must be signed in to change notification settings - Fork 0
/
door.pas
67 lines (53 loc) · 1.28 KB
/
door.pas
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
{$O+,F+}
Unit Door;
INTERFACE
Var
BBSPath : String;
Procedure MakeDoorInfo (Username: String);
Procedure DoorModeParser (s,rest,options: String);
IMPLEMENTATION
Uses
BFiles,
Misc,
Modem,
Net;
Procedure MakeDoorInfo (Username: String);
Var
f: Text;
Begin
Assign (f,BBSPath+'\DORINFO1.DEF');
ReWrite (f);
WriteLn (f,'Sonic BBS');
WriteLn (f,'Igor');
WriteLn (f,'Loncarevic');
WriteLn (f,'COM2:');
WriteLn (f,'2400 BAUD,N,8,1');
WriteLn (f,'0');
WriteLn (f,Username);
WriteLn (f,'');
WriteLn (f,'');
WriteLn (f,'1');
WriteLn (f,'0');
WriteLn (f,'19');
Close (f);
End;
Procedure Start (which: String);
Begin
MakeDoorInfo (Misc.Username);
If (which='TETRIS') Then Begin
If Not(Local) Then Misc.Execute ('/C '+BBSPath+'\TETRIS.BAT')
Else Misc.Execute ('/C '+BBSPath+'\STACK''EM\LOCAL.BAT');
End;
End;
Procedure DoorModeParser (s,rest,options: String);
Begin
If (s='?') Or (s='HELP') Then BFiles.Show (BFiles.DoorList)
else if (s='TETRIS') Or (s='TET') Then Door.Start ('TETRIS')
else if (s='EX') Or (s='..') Or (s='EXIT') Or (s='\') Then
Begin
Misc.DoorPrompt:=FALSE;
Net.SetWhere ('Sonic');
End
else If (s<>'') Then Modem.OutLn ('Unknown Door name "'+s+'", ? for list od Doors');
End;
End.