home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
bbs
/
qstruct
/
struct.doc
Wrap
Text File
|
1989-02-05
|
19KB
|
492 lines
//////////////////////////////////////////////////////////////////////////
/ /
/ QuickBBS ST v0.30c Structures /
/ /
/ The descriptions given here are for your info only. They are will /
/ probably change without notice! If you decide to use these structures, /
/ you may do so, but if ANYTHING goes wrong IT'S ALWAYS YOUR OWN STUPID /
/ FAULT. /
/ /
/ Part of this document is based on structures created by Adam Hudson, /
/ the author of the 'original' PC version, and by Jac Kersing and /
/ J.P. Middeling, authors of Pandora, The-Box and related utilities /
/ /
/ - Jon - /
/ /
//////////////////////////////////////////////////////////////////////////
***********************************
** 1 ** Variable types used... **
***********************************
The following variable types and names have been used:
* Pas[n]
A Pascal type string with a maximum length of n. The first
byte contains the length of the string. When stored in a
file the string will be n long. Example:
User name 'Alexis Carrington' is 17 characters long. The
space reserved for the user name in USERS.BBS is 36. In
the file it would look something like:
<17>Alexis Carrington__________________
Where <17> is a character with ascii value 17, and
____ is something undefined.
Note that the actual user name may only be 35 characters!
To convert a Pascal type string A$ into a GfA string, use:
A$=Mid$(A$,2,Asc(A$))
* Str[n]
A C-Type string, null terminated, of max n characters.
An example: A message is addressed to 'Alexis Carrington'.
In the message header a space of 36 characters is reserved
for the 'To' field. That space would be filled like this:
Alexis Carrington<0>__________________
Where <0> is a character with ascii value 0, and
____ is something undefined.
To convert a C-type string A$ into a GfA string, use:
A$ = Char{ V:A$ } ( GfA 3.0 only )
or
A$=Left$(A$,Instr(A$,Chr$(0))-1) ( Any GfA )
You might want to check the string is actually null-terminated
with...
If Instr(A$,Chr$(0))
.
.
.
Endif
* Byte
A single byte, range 0..255.
* Word
A two-byte value, range 0..65535.
* Long
A four-byte value, range 0..?????
* MS-Word
The same as a word, but the two bytes are in Intel-format.
* MS-Long
The same as a long, but the for bytes are in Intel-format.
*** NOTE ***
The information given here is the way QUICKBBS ST handles the files.
This may differ from the way Pandora, The-Box, QuickBBS PC and
utilities handle them!
**************************
** 2 ** The user file **
**************************
The file USERS.BBS has the following format :
Name .............. 36 .... Pas[36]
City .............. 26 .... Pas[26]
Password .......... 16 .... Pas[16]
Data Phone ........ 13 .... Pas[13]
Home Phone ........ 13 .... Pas[13]
Last Time On ...... 6 .... Pas[ 6] Format HH:MM
Last Date On ...... 9 .... Pas[ 9] Format DD/MM/YY
Attributes ........ 1 .... Byte See below
Flags ............. 4 .... Long
Credit ............ 2 .... Word
- Reserved - ...... 2 .... -
Posted Messages ... 2 .... Word
Graphics Mode ..... 2 .... Word
Security Level .... 2 .... Word
Calls ............. 2 .... Word
Uploads ........... 2 .... Word
Downloads ......... 2 .... Word
Uploaded Kb ....... 2 .... Word
Downloaded Kb ..... 2 .... Word
DL'ed Today Kb .... 2 .... Word
Secs used today ... 2 .... Word
Screen Length ..... 2 .... Word
- Reserved - ...... 8 .... -
The user attributes are:
Bit 0 - Deleted
Bit 1 - Clear Screen
Bit 2 - More Prompts
Bit 3 - Use F.S.E.
Bit 4 - Reserved
Bit 5 - Reserved
Bit 6 - Reserved
Bit 7 - Reserved
If the lastread pointers are used, each user has one record of 400
bytes in the LASTREAD.BBS file, 2 bytes for each message board,
like this:
+-------+-------+-------...---------+
User 1 | area1 | area2 | area3 ... area200 |
+-------+-------+-------...---------+
User 2 | area1 | area2 | area3 ... area200 |
+-------+-------+-------...---------+
User 3 | area1 | area2 | area3 ... area200 |
. . . . . .
. . . . . .
***********************************
** 3 ** The configuration file **
***********************************
The file QCONFIG.BBS has the following structure:
Max Baudrate .................... 2 ....... Word
Max Init Tries .................. 1 ....... Byte
Connect Delay (Seconds) ......... 1 ....... Byte
*Answer Delay (Seconds) .......... 1 ....... Byte
Init String ..................... 70 ....... Str[70]
Reset String .................... 70 ....... Str[70]
*Answer String ................... 70 ....... Str[70]
Ring Detection .................. 20 ....... Str[20]
Init Response ................... 20 ....... Str[20]
Reset Response .................. 20 ....... Str[20]
300 Baud Response ............... 20 ....... Str[20]
1200 Baud Response .............. 20 ....... Str[20]
2400 Baud Response .............. 20 ....... Str[20]
Minimum Baudrate to Logon ....... 2 ....... Word
Minimum Baudrate for VT-52 ...... 2 ....... Word
Minimum Baudrate for Xfer ....... 2 ....... Word
... Paths & names
Menu Path ....................... 70 ....... Str[70]
Textfile Path ................... 70 ....... Str[70]
Message Path .................... 70 ....... Str[70]
OARC Path ....................... 70 ....... Str[70]
- Reserved - .................... 70 ....... -
External Chat ................... 70 ....... Str[70]
FSE Program ..................... 70 ....... Str[70]
Sysop Name ...................... 40 ....... Str[40]
*System Name ..................... 40 ....... Str[40]
... Times
Start 300 Baud Access ........... 10 ....... Str[10] Format:
End 300 Baud Access ............. 10 ....... Str[10]
Start Download Hours ............ 10 ....... Str[10] HH:MM:SS
End Download Hours .............. 10 ....... Str[10]
Start Paging Hours .............. 10 ....... Str[10]
End Paging Hours ................ 10 ....... Str[10]
... New users
New User Security ............... 2 ....... Word
New User Flags ...,,............. 4 ....... Long
New User Credit (Cents) ......... 2 ....... Word
... Restrictions
Max OARC Size (Kb)............... 2 ....... Word
Timeout (Seconds) ............... 2 ....... Word
Default Logon Time (Minutes) .... 2 ....... Word
Password Tries .................. 1 ....... Byte
Maximum Pages ................... 1 ....... Byte
Page Tune Length ................ 1 ....... Byte
... Network information
Zone Number ..................... 2 ....... Word
Net Number ...................... 2 ....... Word
Node Number ..................... 2 ....... Word
*Allow Reply to Unlisted Nodes ... 1 ....... Byte
... Screen
Status Line Character Colour .... 1 ....... Byte
Status Line Background Colour ... 1 ....... Byte
Colour 0 (RGB) - Background ..... 4 ....... Long
Colour 1 (RGB) .................. 4 ....... Long
Colour 2 (RGB) .................. 4 ....... Long
Colour 3 (RGB) - Foreground ..... 4 ....... Long
Screen Saver Delay (Seconds) .... 2 ....... Word
... Toggles
^E at Logon ..................... 1 ....... Byte
Fast Logon Locally .............. 1 ....... Byte
Ask for Pwd Locally ............. 1 ....... Byte
Use LastRead Pointers ........... 1 ....... Byte
Exit for Net/Echo ............... 1 ....... Byte
Check for Mail .................. 1 ....... Byte
Ask Voice Phone ................. 1 ....... Byte
Ask Data Phone .................. 1 ....... Byte
Ask New Users Graphics .......... 1 ....... Byte
Use Xmodem ...................... 1 ....... Byte
Use Xmodem 1K ................... 1 ....... Byte
Use Ymodem ...................... 1 ....... Byte
Use WXmodem ..................... 1 ....... Byte
Use Zmodem ...................... 1 ....... Byte
Allow Batch Downloads ........... 1 ....... Byte
*Enforce Language ................ 1 ....... Byte
*Enforce Lower Case .............. 1 ....... Byte
*Touch Uploads ................... 1 ....... Byte
*Use Extended File Info .......... 1 ....... Byte
Allow Quoting ................... 1 ....... Byte
*Save Combined Boards ............ 1 ....... Byte
*Use Manual Answer ............... 1 ....... Byte
... Additions
Use YellTunes .................... 1 ....... Byte
Nodelist Path .................... 70 ....... Str[70]
- Reserved - .....................970 ....... -
* = Not (yet) supported / used.
**********************************
** 4 ** The message board file **
**********************************
The message board configuration file BOARDS.BBS has 200 records
which are built up like this:
Board Name ...................... 20 ....... Str[20]
Board Type ...................... 2 ....... Word
Read Security ................... 2 ....... Word
Read Flags ...................... 4 ....... Long
Write Security .................. 2 ....... Word
Write Flags ..................... 4 ....... Long
Sysop Security .................. 2 ....... Word
Sysop Flags ..................... 5 ....... Long
Origin line ..................... 60 ....... Str[60]
***************************
** 5 ** The menu files **
***************************
The menu files (*.MNU) have the following record layout:
Option Type ..................... 1 ....... Byte
Option Security ................. 2 ....... MS-Word
Option Flags .................... 4 ....... MS-Long
Option Text ..................... 76 ....... Pas[76]
Option Key ...................... 1 ....... Byte
Option Parameters ............... 81 ....... Pas[81]
*Option Foreground Colour ........ 1 ....... Byte
*Option Background Colour ........ 1 ....... Byte
Record 0 contains the prompt line in its 'Option Text' field. Colours
are not (yet) supported.
*****************************
** 5 ** The Message files **
*****************************
The *.HDR files are built up like this:
From ............................ 36 ........ Str[36]
To .............................. 36 ........ Str[36]
Subject ......................... 72 ........ Str[72]
Time ............................ 20 ........ Str[20]
Stamp ........................... 4 ........ Long
Offset in .MSG .................. 4 ........ Long
- Reserved - .................... 2 ........ Word
Message is a reply to .......... 2 ........ Word
Attributes ...................... 2 ........ Word
- Reserved - Mailer ............. 16 ........ -
Size in .MSG .................... 2 ........ Word
Read Count ...................... 2 ........ Word
Cost (cents) .................... 2 ........ Word
Origin ........ Zone ............ 2 ........ Word
Origin ........ Net ............. 2 ........ Word
Origin ........ Node ............ 2 ........ Word
*Origin ........ Point ........... 2 ........ Word
Destination ... Zone ............ 2 ........ Word
Destination ... Net ............. 2 ........ Word
Destination ... Node ............ 2 ........ Word
*Destination ... Point ........... 2 ........ Word
Notes: - Fields marked '*' are not supported/used by QuickBBS ST, but MIGHT
be used by The-Box and/or Import/Export/ComScan etc!
- Do NOT mess around with the 'Mailer' field. This is OFF LIMITS!
- The 'Time' field is a string containing the date and time in Ascii
of the message, example : "24 Oct 88 13:25:00".
- The 'Stamp' field is the number of seconds between 01/01/1970 and
the time the message was processed by Import, or the message was
entered in QuickBBS/Pandora/Caned/whatever.
- Message Attributes:
Bit 0 ............ Message is private
*Bit 1 ............ Message is crashmail
Bit 2 ............ Message has been received
Bit 3 ............ Message has been sent
*Bit 4 ............ Message has a file attached
*Bit 5 ............ Message has been forwarded
*Bit 6 ............ Message has unknown destination
Bit 7 ............ Message to be killed when sent
Bit 8 ............ Message was entered here
*Bit 9 ............ Message to be held for pickup
Bit 10 ............ - Reserved -
Bit 11 ............ - Reserved -
Bit 12 ............ - Reserved -
Bit 13 ............ - Reserved -
Bit 14 ............ - Reserved -
Bit 15 ............ Message has been deleted
- Each message board consists of two files, which are located in
your 'message file' directory as specified in QConfig. The files
are called nnnn.HDR and nnnn.MSG where 'nnnn' is the message
area number, such as...
D:\QBBS\MSG\0004.HDR
D:\QBBS\MSG\0004.MSG
The header file '.HDR' is described above. It contains two
fields which relate to the message text file '.MSG':
- Offset in .MSG points to the first byte of the message
in the .MSG file
- Size in .MSG is the size in bytes of the message.
- The field 'Message is a reply to' contains the message number
to which the message is a reply. This is NOT supported in
Echomail or Netmail, unless the reply was entered locally.
- Basically: if you don't know FOR SURE what you're doing, don't
touch the message files!!!
*****************************
** 6 ** The 'Door' files **
*****************************
The file LASTUSER.LOG is a plain ASCII file which contains the following
lines:
- The users name
- The users security level
- A plain zero (0, used on the PC for port number?)
- Minutes left
Example:
Alexis Carrington.Colby.Dexter
10
0
47
Another file can be written, called DORINFO1.DEF. This is also an ASCII
file, containing:
- The sysops first name
- The sysops last name
- The baudrate ( 0 = Local )
- The users first name
- The users last name
- Where the guy lives
- His graphics mode
- The length of his screen
- His security level
- Number of minutes left
- His record number in the USERS.BBS file
Example:
J.R.
Ewing
1200
Alexis
Carrington.Colby.Dexter
Denver
1
24
10
47
56
For the structure of the FOREM.DAT file, please refer to the FoReM
documentation. Some information is required in FOREM.DAT, but is not
available to QuickBBS. They are filled in with 'standard' values, which
are enclosed in brackets. The fields supported by QuickBBS ST are:
Password
Name
Phone number
Age (25)
Line feeds (ON)
Computer type (1)
Time left today
Max calls (2)
Calls remaining (1)
Time left this call
City
************************
** 7 ** Other files **
************************
The file TIMELOG.BBS has a somewhat different structure. The first 8 bytes
contain the date in ASCII when the file was created. Then there are 24
records (one for each hour, 3 bytes each) which contain the percentage of
BBS usage in the first byte, and the number of 'entries' (calls in that
hour) in the second and third byte :
Percentage ........... 1 ....... Byte
Entries .............. 2 ....... Word
QuickBBS ST writes a file called 'EXITINFO.BBS' when exit-with-errorlevel
is used:
Baudrate ............. 2 ....... Word
User number .......... 2 ....... Word
Security level ....... 2 ....... Word
Echomail entered? .... 1 ....... Byte
Netmail entered? ..... 1 ....... Byte
Mode of operation .... 1 ....... Byte
Time of exit ......... 5 ....... HH:MM
Here again the time is written as a 5-byte string, no termination. The
'mode of operation' is there for possible future multitasking
environments:
Bit 0 On? - I/O to Modem
Bit 1 On? - I/O to Screen
this enables the screen to be switched off under - say - the Beckemayer
multi-tasking shell. I haven't been able to get my hands on anything like
this (exept MX2, and GfA doesn't like it!), so I can't implement any
support yet. If anyone knows where to get a copy...
Last file is the SYSINFO.BBS file, written each time QuickBBS exits:
Call count .......... 4 ....... Long
Last User ........... 36 ....... Pas[36]
- Reserved - ........ 128 ....... -
******************************
** X ** That's All Folks! **
******************************