-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.pas
225 lines (208 loc) · 6.74 KB
/
config.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
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
{$O+,F+}
Unit Config;
INTERFACE
Const
CfgFile='BBS.CFG';
Var
BBSName,
ShortBaseFile,
BigBaseFile,
LogFile,
WelcomeMessage,
UploadDir,
ZIPArchiver,
ARJArchiver,
LHAArchiver,
ModemInitStr,
ModemHangUp,
TreeFile,
ArcViewFile,
MemFile,
DescribeFile,
MailBase,
MailMessages,
Editor,
LocalEditFile,
MailHelpFile,
NormalHelpFile,
FileAdmHelpFile,
SysOpHelpFile,
PadHelpFile,
Logo,
PadRootDir,
MailAttachDir,
AutoExecPath,
AutoExecHelpFile,
ResumeHelpFile,
CommandsHelpFile,
ResumeDir,
BBSPath,
DoorList,
ZModemUl,
ZModemDl,
SessionsDir : String;
Log : Boolean;
ComPort : Byte;
ComPars : Byte;
Guest : Integer;
Normal : Integer;
Benefit : Integer;
FileAdm : Integer;
SysOp : Integer;
GuestTime : Integer;
NormalTime : Integer;
BenefitTime : Integer;
FileAdmTime : Integer;
SysOpTime : Integer;
Procedure Make;
IMPLEMENTATION
Uses
DOS;
Function Upper (s : String) : String;
var
i : Integer;
d : Byte;
Begin
d:=Ord(s[0]);
For i:= 1 To d Do
s[i]:=UpCase(s[i]);
Upper:=s;
End; {F||Upper : String}
Procedure Parser (s : String);
Var
i : Integer;
Len,b : Byte;
Left,Right : String;
Begin
Len := Length (s);
If Pos (';',s)=1 Then Exit; (* Provjerava za komentare *)
If Len<2 Then Exit; (* Provjerava za praznu liniju *)
b := Pos ('=',s);
Left := Copy (s,1,b-1);
Right := Copy (s,b+1,Len);
Left := Upper (Left);
If Left='BBSNAME' Then BBSName:=Right
Else If Left='SHORTBASEFILE' Then ShortBaseFile:=Right
Else If Left='BIGBASEFILE' Then BigBaseFile:=Right
Else If Left='LOG' Then
If (Upper(Right)='YES') Or (Upper(Right)='TRUE')
Then Log:=TRUE
Else Log:=FALSE
Else If Left='LOGFILE' Then LogFile:=Right
Else If Left='WELCOMEMESSAGE' Then WelcomeMessage:=Right
Else If Left='UPLOADDIR' Then UpLoadDir:=Right
Else If Left='ZIPARCHIVER' Then ZIPArchiver:=Right
Else If Left='ARJARCHIVER' Then ARJArchiver:=Right
Else If Left='LHAARCHIVER' Then LHAArchiver:=Right
Else If Left='GUEST' Then Val (Right,Guest ,i)
Else If Left='NORMAL' Then Val (Right,Normal ,i)
Else If Left='BENEFIT' Then Val (Right,Benefit ,i)
Else If Left='FILEADM' Then Val (Right,FileAdm ,i)
Else If Left='SYSOP' Then Val (Right,SysOp ,i)
Else If Left='GUESTTIME' Then Val (Right,GuestTime ,i)
Else If Left='NORMALTIME' Then Val (Right,NormalTime ,i)
Else If Left='BENEFITTIME' Then Val (Right,BenefitTime ,i)
Else If Left='FILEADMTIME' Then Val (Right,FileAdmTime ,i)
Else If Left='SYSOPTIME' Then Val (Right,SysOpTime ,i)
Else If Left='MODEMINITSTR' Then ModemInitStr:=Right
Else If Left='MODEMHANGUP' Then ModemHangUp:=Right
Else If Left='TREEFILE' Then TreeFile:=Right
Else If Left='ARCVIEWFILE' Then ArcViewFile:=Right
Else If Left='MEMFILE' Then MemFile:=Right
Else If Left='COMPORT' Then Val (Right,ComPort, i)
Else If Left='COMPARS' Then Val (Right,ComPars, i)
Else If Left='DESCRIBEFILE' Then DescribeFile:=Right
Else If Left='MAILBASE' Then MailBase:=Right
Else If Left='MAILMESSAGES' Then MailMessages:=Right
Else If Left='EDITOR' Then Editor:=Right
Else If Left='LOCALEDITFILE' Then LocalEditFile:=Right
Else If Left='MAILHELPFILE' Then MailHelpFile:=Right
Else If Left='NORMALHELPFILE' Then NormalHelpFile:=Right
Else If Left='FILEADMHELPFILE'Then FileAdmHelpFile:=Right
Else If Left='SYSOPHELPFILE' Then SysOpHelpFile:=Right
Else If Left='PADHELPFILE' Then PadHelpFile:=Right
Else If Left='LOGO' Then Logo:=Right
Else If Left='PADROOTDIR' Then PadRootDir:=Right
Else If Left='MAILATTACHDIR' Then MailAttachDir:=Right
Else If Left='AUTOEXECDIR' Then AutoExecPath:=Right
Else If Left='AUTOEXECHELPFILE' Then AutoExecHelpFile:=Right
Else If Left='RESUMEHELPFILE' Then ResumeHelpFile:=Right
Else If Left='COMMANDSHELPFILE' Then CommandsHelpFile:=Right
Else If Left='RESUMEDIR' Then ResumeDir:=Right
Else If Left='BBSPATH' Then BBSPath:=Right
Else If Left='DOORLIST' Then DoorList:=Right
Else If Left='ZMODEM-UPLOAD' Then ZModemUl:=Right
Else If Left='ZMODEM-DOWNLOAD' Then ZModemDl:=Right
Else WriteLn ('What a hell is ',Left,' mothere ti.');
End; {P|Parser}
Procedure Make;
Var
s : String;
F : TEXT;
Begin
Assign (F,GetEnv('SONIC_BBS')+'\'+CfgFile); (* CFG file ide uvijek u isti dir *)
{$I-}
Reset (F);
{$I+}
If IOResult<>0 Then Begin
WriteLn ('BBS.CFG don''t exist');
Exit;
End;
While Not(EOF(F)) Do Begin
ReadLn (F,s);
Parser (s);
End;
Close (F);
End; {P|OpenCfg}
End.
==========================================================================
Configuration Unit for BBS, 2 feb '93:
--------------------------------------------------------------------------
add on 9 feb '93.
- treefile (for tree cmd)
- arcviewfile (for av or archive view cmd)
- helpfile (for help command)
- memfile (for mem command)
add on 10 feb '93.
- comport (for modem unit)
- compars (for modem unit)
add on 11 feb '93.
- describefile (for dir command, description of file)
add on 14 feb '93.
- mailbase (for mail command) (base for mail)
- mailmessages (for mail command) (where are stored mails)
add on 17 feb '93.
- editor (for working in local, loads external editor)
- localeditfile (name of local working file used by extarnal editor)
add on 21 feb '93.
- mailhelpfile (help file for mail command prompt)
del on 23 feb '93.
- helpfile (for help command)
add on 23 feb '93.
- normalhelpfile (help file for normal user)
- fileadmhelpfile (help file for fileadm user)
- sysophelpfile (help file for sysop)
chg on 3 apr '93.
- you must implicit take init, not just including config
add on 7 apr '93.
- padhelpfile (help for pad system)
add on 8 apr '93.
- logo (where is stored welcome file ex. logo.bbs)
add on 10 apr '93.
- padrootdir (where is placed root of users pads)
add on 12 apr '93.
- lhaarchiver (for archiver, non-pc)
add on 19 apr '93.
- mailattachdir (where are placed attached files for mail)
add on 27 apr '93.
- autoexecpath (where are placed autoexecs for users)
- autoexechelpfile (file for help or ? in autoexec mode)
add on 2 may '93.
- commandshelpfile (where are descriptions of commands (help) )
add on 12 may '93.
- resumehelpfile (where are placed help for users)
- resumedir (where are placed all resumes of users)
add on 20 may '93.
- bbspath (where is executable bbs files eg. c:\bbs)
- doorlist (flie where is placed list of doors)
--------------------------------------------------------------------------