fsxNet Wiki

BBS Development & Resources

User Tools

Site Tools


probbs:qwk

This is an old revision of the document!


QWK File Format

QWK is a common protocol for offline message readers and BBS software. This is a quick synopsis on how to implement support into your product (reader, processor, or BBS).

Files in a QWK zip

Even though the files are zipped, the file extension is renamed to .QWK for the download from the BBS software, and .REP for the zip uploading messages to the BBS.

  1. CONTROL.DAT (a string list file)
  2. MESSAGES.DAT (a 128 block ASCII file)
  3. *.NDX (an array of binary bytes)

CONTROL.DAT

Each line is CRLF 0x0D 0x0A (#13#10) (\r\n) delimited.

Line 1 BBS name
Line 2 BBS city and state
Line 3 BBS phone number
Line 4 BBS Sysop name
Line 5 Mail door registration #, BBSID
Line 6 Mail packet creation time
Line 7 User name (upper case)
Line 8 Name of menu for Qmail, blank if none
Line 9 ? Seem to be always zero
Line 10 Total number of messages in packet
Line 11 Total number of conference minus 1
Line 12 1st conf. number
Line 13 1st conf. name (13 characters or less) Modern QWK BBSes send Full Conference Names
Line 14 next conf. number
Line 15 next conf. name (13 characters or less) Modern QWK BBSes send Full Conference Names
2nd from lastWelcome screen file
Next from lastBBS news file
Last LineLog off screen

Some BBS systems will have additional lines after those above:

Next Section ? always a zero
Screen length on the BBS 25
User name in uppercase OZZ NIXON
User first name in mixed case Ozz
User city information Crestview, Fl
User data phone number 850-123-4567
User home phone number 850-555-1212
Security level 110
Expiration date 00-00-00
Last log on date 11-16-19
Last log on time 13:24:59
Log on count 134
Current conference number on the BBS 8
Total KB downloaded 0
Download count 0
Total KB uploaded 0
Upload count 0
Minutes per day 459
Minutes remaining today 439
Minutes used this call 20
Max. download KB per day 10240000
Remaining KB today 10240000
KB downloaded today 0
Current time on BBS 13:27:03
Current date on BBS 11-17-19
BBS network tag-line FSXNet BBS

MESSAGES.DAT

Messages file starts with a 128 byte product information. Like:

  • Produced by Qmail…Copyright © 1987 by Sparkware. All Rights Reserved. (padded with spaces)
  • QWK Packet Produced by PCBoard v15.0 (padded with spaces)

That block is followed by messages using PCBoard 12.0 format.

In Pascal:

  type
     MsgHeaderRec=Packed Record
        TypeID:String[1];
        MsgID:String[7];
        DateStr:String[8];
        TimeStr:String[5];
        MsgTo:String[25];
        MsgFrom:String[25];
        MsgSubj:String[25];
        Reserved:String[12];
        MsgRefer:String[8];
        Chunks:Longint;
        Attributes:String[6];
     End;

Of course to populate that structure you will BlockRead 128 bytes, them move from offset to length to each field.

Offset Length Description
11Message status flag (unsigned character)
#32 = (space) public, unread
'-' = public, read
'+' = private, unread
'*' = private, read
'~' = comment to Sysop, unread
'`' = comment to Sysop, read
'%' = password protected, unread
#94 = (carrot) password protected, read
'!' = group password, unread
'#' = group password, read
'$' = group password to all
27Message number (in ASCII)
98Date (mm-dd-yy, in ASCII)
175Time (24 hour hh:mm, in ASCII)
2225To (uppercase, left justified)
4725From (uppercase, left justified)
7225Subject of message (mixed case)
9712Password (space filled)
1098Reference message number (in ASCII)
1176Number of 128-bytes blocks in message [1]
1231Flag [2]
1242Conference number (unsigned word)
1262Logical message number in the current packet [3]
1281Indicates whether the message has a network tag-line or not. [4]

[1] = (including the header, in ASCII; the lowest value should be 2, header plus one block message; this number may not be left flushed within the field)

[2] = (ASCII 225 means message is active; ASCII 226 means this message is to be killed)

[3] = this number will be 1 for the first message, 2 for the second, and so on. (unsigned word)

[4] = A value of '*' indicates that a network tag-line is present; a value of ' ' (space) indicates there isn't one. Messages sent to readers (non-net-status) generally leave this as a space. Only network software need this information.

probbs/qwk.1573933819.txt.gz · Last modified: 2019/11/16 19:50 by ozz