home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
HM11A.ZIP
/
22222222.222
/
PROGRAM.DOC
< prev
next >
Wrap
Text File
|
1992-11-10
|
75KB
|
1,733 lines
Harmony BBS Programmer's Reference Guide
(C)Copyright 1992 Concord Software
All Rights Reserved
====================================================================
The information discussed in this document has been supplied to
developers interested in creating Harmony BBS compatible software.
This file contains the basic outline of all the data files that
Harmony BBS uses. Concord Software offers a full blown utility box
(in Turbo Pascal 6.0 .TPU format) for a fee. With this unit,
programmers will be able to easily create their own doors and other
useful utilities for Harmony BBS WHILE incorporating ALL of the
functionality of the BBS itself. For more information, please
contact Concord Software.
====================================================================
This document will be broken down into each directory that Harmony
BBS uses. It will attempt to explain in detail, all of Harmony BBS's
data files.
Note that since Harmony BBS was written mostly in Turbo Pascal v6.0,
all data types are Pascal data types. If you wish to create
utilities or doors in another language, you will have to make the
conversion WITHIN the program, but Pascal data structures must always
be read/written to the files.
====================================================================
Updates from Harmony BBS version 1.0 -> 1.1
There are a few changes that you should be aware of in the newest
version of Harmony BBS.
1) Within the BBS_STATS record, the variable MAILDIR is no longer
used. It is still there, and is in the BBSSTATS.HMY file, but it is
not currently used. I am leaving it there for a possible future
addition that I have an idea for.
2) Within the MSG_BASE_STATS record, the directory variable MSGPATH
is GONE. Since Harmony BBS now uses the Squish format, this variable
was no longer needed.
Also within this record, the variable NEW, which was the array of
high message read pointers for each record, is also gone. Squish uses
its own format for this type of work, and Harmony BBS now looks at
that.
3) Since Harmony BBS is now using the Squish format, MSG_INDEX, and
MSG_FILE are gone.
4) The 3rd file for each file transfer section, known as the extended
description file (XX.EXT) has been eliminated (with extreme prejudice
{I've always wanted to say that} ). It has been moved directly into
the FILE_STATS record. This was done because of a bug in Harmony that
was causing it to lock up sometimes because of all the indexing that
was being done between 3 files.
5) All file statistic records are now parallel to each other between
the index file and the statistics file. In other words, record #3
within the XX.IDX file, contains the file name of the information for
record #3 within the XX.HMY file. This was done to make a lot easier
on the programmers. The EXT_DESC_IDX within the FILE_DESC record is
now gone sine that information is local to that record now.
6) The record BATMAIL is gone all together. The batch mail function
within Harmony BBS was very redundant, so this has been eliminated.
7) No more MARKED.HMY file in the message base section is gone. The
Squish format facilitates a very fast searching structure so marking
messages is no longer needed.
====================================================================
All variables and record fields marked throughout this document as
RESERVED should NEVER be used by any 3rd part software. It is the
programmer's responsibility to ensure that all the variables marked
as RESERVED to NOT get changed through the use of their program.
Here is the list of all the constants and data types used through this
document :
CONST
MAXUSERS = 1000;
TYPE
String36 = string[36];
String72 = string[72];
String20 = string[20];
readflag = ARRAY [1..1000] OF Boolean;
{ ReadFlag type is used throughout many of the data files. It is a
type that is used to keep track of each user's status of something.
A true indicates that the user has read or seen or has access to that
specific item.
}
flagtype = ARRAY [1..32] OF Boolean; {Flag Settings}
newflags = ARRAY[1..1000] OF Integer;
sltimes = ARRAY [1..100] OF Byte; {TimeLimits for each SL}
slcalls = ARRAY [1..100] OF Byte; {Number of calls per day}
bbs_stats = RECORD
bbsname : String[80]; {Name of BBS}
sysopname : String[30]; {Sysop(s) name}
sysopalias : String[30]; {Sysop(s) alias}
dospassword, {Password for DOS in Sysopmode}
bbspassword : String[20]; {Private BBS's password}
lastcaller : String[35]; {Name/Alias of last caller}
date : String[10]; {Current date}
maxusers : 1..1000; {Maximum amount of users}
totalcalls : LongInt; {Total number of calls}
sltime : SLTimes; {Security level time limits}
slcall : SLCalls; {Security Level calls per day}
netaddress : string; {Network address}
clrwscr, {Number of minutes to clear scr}
numbulletins, {Number of system bulletins}
nummsgbases, {Number of message bases}
numudsections, {Number of U/D bases}
numbooths, {Number of voting booths}
RESERVED,
numdoors, {Number of active doors}
numnews : Byte; {Number of news files}
regcost : Real; {Registration Cost}
numnewcalls, {number of calls b4 sec. drop}
newusersec, {New User security level}
firstcallsec, {First time call sec.}
importsec, {Security to import msgs}
udsecurity, {Security to enter ud section}
messagesecurity, {Security to enter messagebase}
valsecurity, {Security of validated users}
votingsecurity, {Security to enter voting}
bbssecurity, {Security to enter BBS-DBase}
RESERVED,
callsforday, {Number of calls for today}
numusers, {Active number of users}
startclosed, {Military hour start closed}
endclosed, {Military hour end closed}
startavail, {Military hour start chat}
endavail, {Military hour end chat avail}
savemailsec, {Security to save mail}
batmailsec, {Security to send batch mail}
readnamesec, {Security to veiw real names}
valfiles, {# days to val.files 0-dont}
tagmail : Integer; {# days to tag mail}
minavail : Longint; {Minimum amt of free dsk space}
chatmode, {Text shown at chat mode}
tagline : String[60]; {Tagline for network}
maildir, {Location of private mail}
msgbasedir, {Location of msg base stats}
uddir, {Location of ud stats}
userdir, {Location of userlog}
menusdir, {Location of ALL menus}
systemdir : String; {Location of mail,log,etc.}
newdefaults, {new user settings}
loglevels,
bbsflags : FlagType; {BBS flags}
END;
nodes = RECORD
modemport : byte; {port to use for node}
portaddr : integer; {default address}
minbaud, {minimum baud rate allowed}
maxbaud : longint; {maximum baud rate allowed}
hwflow, {use hardware flow}
swflow, {use software flow}
dropdtr, {drop dtr}
locked, {port locked at max bps?}
RESERVED1,
RESERVED2 : boolean;
RESERVED3
RESERVED4 : string[72];
connect300, {Modem Responses}
connect1200,
connect1275,
connect2400,
connect4800,
connect9600,
connect19200,
connect38400,
errorcorrect,
error,
no_carrier,
voice,
no_dialtone,
busy,
ring,
ok,
escape, {escape code}
answer, {to make modem answer}
onhook, {on hook}
offhook,
dial_prefix, {atdp/atdt}
force_ok : String[20]; {at| usually}
init1, {init strings}
init2,
init3,
init4 : String[60];
delay : byte; {time between commands}
END;
user_stats = RECORD
firstname : String[14]; {First name of user}
lastname : String[15]; {Last name of user}
alias : String[30]; {Alias of user}
address : String[40]; {Address of user}
city : String[20]; {City of user}
state : String[02]; {State of user}
zipcode : String[05]; {Zipcode of user}
phone : String[12]; {Phone number of user}
password : String[20]; {Password of user}
birthday, {Birthday of user}
laston : String[10]; {Last call date of user}
kbuploaded, {Number of K uploaded}
kbdownloaded, {Number of K downloaded}
callstotal : Longint; {Total number of calls}
mailwaiting, {Amount of mail waiting}
totalposted, {Total number of msgs posted}
totdownloaded, {Total # of files D/L}
totuploaded, {Total # of files U/L}
callstoday : Integer; {Number of calls made today}
RESERVED5 , {Unreg calls w/ Harmony Term}
screenlength, {Number of rows on users term}
screenwidth, {Number of cols on users term}
Protocol, {Active Protocol}
security, {Security level of user}
computer : Byte; {Computer type}
moneyowed : Real; {Amount of money user owes}
userflags : Flagtype; {User's flags}
END;
msg_base_stats = RECORD
basename, {Name (seen) of msg base}
netname : String[40]; {Net name (exact!) of base}
reqstring : String[30];
subopnum : 1..1000; {SubOp user number}
maxmsgs, {Max number of messages}
nettype, {Type of net. 2-FIDO }
activemsgs : Integer; {Number of active msgs}
anonsec, {Security for anon. msgs}
seclvlbatch : Byte; {Security for batch retr.}
netaddress, {Address of message base}
tagline : string[70]; {Tagline for message base}
msgbaseflags: Flagtype; {Message base flags}
newscan, {1-in newscan 0 not}
postflags : ReadFlag; {1-post 0-not allowed to ps}
END;
voting_stats = RECORD
title : string[60]; {Title of voting booth}
reqstring : string[70]; {requirement to see q.}
votes : integer; {Total number of votes}
uservote : readflag; {User's who have voted}
END;
bbs_data = RECORD
name : string[70]; {Name of system}
host : byte; {System computer type}
minbaud, {Minimum baud rate}
maxbaud : integer; {Maximum baud rate}
date, {Date entered}
phone : string[12]; {Phone number}
hours, {Hours of op.}
city : string[30]; {City location}
state : string[02]; {State location}
note : string[40]; {Special note}
END;
transfer_stats = RECORD
subname : String[40]; {Name of base}
file_path : String[70]; {pathname for files}
def_ext : String[3];
fratio,
kratio : Real;
spaceused,
maxspace : Longint; {Max space allowed 0 off}
maxfiles, {max files allowed 0-off}
activefiles, {number of active files}
kperup, {K per 1 Upload given}
kperdown, {K per 1 Download taken}
cperup, {Credits per upload given}
cperdown : Integer; {Credits per dload taken}
sltoval : byte; {security to val. files}
transfersl, {Requirement String}
batchsl, {Security for batch u/d}
creditsl : String[70]; {Security unactive credit}
minbaud : Integer; {Minimum baud for base}
transferflags : Flagtype; {Transfer flags}
END;
index_stats = RECORD
filename : string[12]; {filename}
index : Longint; {Pointer to index}
END;
ext_stats = ARRAY[1..5] OF String[50];
file_stats = RECORD
comment,
description : string[50];
username : string[30];
usernumber : integer;
dateuploaded: string[10];
ext_desc_index,
timesdl,
size : Longint;
password : string[15];
flag : char;
ext_desc : ext_stats;
END;
door_info = RECORD
name,
description,
reqstring : string[70]; {name of door}
start_time, {start time avail}
end_time : Integer; {end time avail}
lbatch_file,
batch_file : string[100]; {batch file to execute}
END;
news = RECORD
subject : string[60]; {Subject of message}
dateposted, {Date message was posted}
timeposted : string[30]; {Time message was posted}
requirements: string[70]; {requirements #---}
userread : readflag; {who has read}
RESERVED : Longint;
readtype : Byte; {Type of reading}
RESERVED2 : flagtype
END;
bulletin = RECORD
title : string[60]; {Title of file}
reqstring: string[80]; {Requirement string}
filename : string[100]; {Path and filename}
readflags: readflag; {UserReadFlag}
END;
tevent = RECORD
title : string[50]; {Short description of event}
hh,mm, {Hour/minute in military time}
errlvl : integer; {errorlevel to exit with}
ldate : string[10]; {last sdate ran}
eflags : flagtype {event flags}
END;
Each one of these data types will be discussed in more detail
throughout this document.
====================================================================
Main Harmony BBS Directory (C:\HM )
BBSSTATS.HMY - Main BBS statistics (text)
This file contains the heart of all information for Harmony BBS.
If this file get corrupted, chances are the sysop is up the
creek.
This is a normal text file of line text (not a file of Pascal
records). Most of this file is read into a variable
of BBS_STATS :
Name of BBS
Real name of sysop
Alias of sysop
Password to enter dos shell from sysop mode
Password to enter BBS when it is in closed mode (private mode)
Name and time of last caller
Current date in MM/DD/YYYY (with padded 0's, ex: 07/01/1992)
Maximum users allowed on BBS (1-1000)
Total number of calls received to this system
Time limits (per security level) - This line contains 100
characters. Each character position refers to the corresponding
security level. Each character is translated to its ORD(ch) to
come up with the resulting time limit. For example, the
character 'A' in column 60 would give all users with a security
level of 60, a time limit of 65 minutes. If the character is
#255 (alt-255), that is considered to be a NO TIME LIMIT for
that security level.
Call limits (per security level) - This line follows the exact
same format as the time limits line. It determines the total
number of calls per day allowed for each security level.
Number of minutes to wait before blanking screen while the BBS
is waiting for an incoming call. If this is set to 0, the
screen will never blank.
Total number of system bulletins available
Total number of message bases available
Total number of file transfer section
Total number of voting booths
RESERVED (always ignore)
Total number of doors available
Total number of news files
Registration cost for this BBS
Number of calls the user stays at new user security level
New user security (1-100)
Default 1st time caller security
Security required to import text files into messages
Security required to enter file transfer section
Security required to enter message bases
Validated user security level (1-100)
Security level required to enter voting booths (1-100)
Security level required to enter BBS database
RESERVED (ignore)
Total number of calls received ever
Highest active user number
Military start closed time
Military end closed time
Military start sysop available time
Military end sysop available time
Security required to be able to save post office mail
Security required to be able to send batch mail
Security required to be able to read real names in an alias
enviroment
Number of days to wait before automatically validating
unvalidated files (0=always keep unvalidated)
Number of days to keep unread public mail marked for retrieval
Minmimum amount of K(1024bytes) to leave available on system
Text printed when chat mode is entered
Default tag line appended to networked message bases
Full directory path pointing to mail (post office) information
Full directory path pointing to message base information
Full directory path pointing to file transfer information
Full directory path pointing to user information
Full directory path pointing to system information
Newuser default flags. This line contains a string of 32 1's and
0's. Each place determines the default settings for a new user's
userflags. For information on each user flag, refer to the
USERLOG.HMY file in the USERS directory. A 1 indicates the flag
as being ON and a 0 indicates a flag as being OFF
Caller log activity recording. This line also contains a line of
32 1's and 0's. All 32 must ALWAYS be present, even though
Harmony BBS uses only the first 15. A 1 turns that part of
the recording as ON, and a 0 indicates Harmony BBS to NOT record
that criteria. Each column stands for specific caller activity :
1 Log the entering and exiting of different sections of
your system.
2 Log all deletions and additions of items.
3 Log sysop mode activity.
4 Log when files are created and read.
5 Log any attempts which Harmony considers to be "hacking".
6 Log editor functions.
7 Log any house work done on BBS.
8 Log start up activities.
9 Reserved for future use.
10 Log file transfer activity.
11 Log user editing activity.
The 3 different levels of recording (as defined in HM.DOC) are :
13 Record POSITIVE things with each type. If this
flag is on, Harmony BBS will record all activities
it considers POSITIVE for each type.
14 Record NEGATIVE things with each type. If this flag
is on, Harmony BBS will record all activities it
considers NEGATIVE for each type.
15 Record SYSOP things with each type. If this flag
is on, all special activities that are executed by
people with security level of 100 will be recorded.
Notice that there is nothing used in the position 12. It has
been left open for future expansion
General BBS flags. This line also contains a string of 32 1's and
0's. Each character in the string corresponds that BBS flag. The
current list of BBS flags follow :
1 Reserved (ignore)
2 Private BBS. If this flag is not on, Harmony BBS will
ignore the closed BBS hours defined above. This flag HAS
to be on in order for the hours to take effect
3 Individual passwords needed to log on to system
4 Aliases allowed
5 Activity logging on. If this flag is OFF, NO BBS activity
will be recorded.
6 BBS is accepting new users
7 1st time callers have access to message bases
8 1st time callers have access to file transfers
9 Message bases active. If this flag is off, entrance to
the message bases is not allowed by ANYONE
10 New users required to leave first time feedback
11 Non-validated users allowed to post messages
12 Reason required for chat request
13 New users allowed in post office
14 Reserved (ignore)
15 Display message base entrance files
16 BBS is connected to a network
17 Users allowed to send netmail
18 Reserved (ignore)
19 Reserved (ignore)
20 Reserved (ignore)
21 File transfer section active. If this flag is off,
entrance to the file transfer section is not allowed by
ANYONE
22 Sigma commands allowed in post office
23 Doors active. If this flag is off, entrance to the doors
menu is not allowed by ANYONE
24 Auto-message active. If this flag is off, the automessage
is ignored
25 Used internally by Harmony BBS. This flag determines the
chat availability override status. If this flag is on, the
current state of the chat mode is toggled
26 Zip log offs allowed from BBS
27 Swapping to EMS memory allowed. If this flag is off, the
BBS will always swap to disk when needed
28 ONLY USED IN PROFESSIONAL VERSION! If this flag is on,
Qwik logons/logoff are allowed
29 Show bulletins at logon. If this flag is TRUE, the user
will be brought the to system bulletins list temporarily
when first logging on the the BBS so they can read any
NEW system bulletins
30-32 These flags are reserved for future use. Your software
should NOT take advantage of these flags. They were put
there for future expansion by Concord Software.
Network Addresses. The rest of this file contains all of the
network addresses that the BBS is affiliated with. Each address
line is in the ZONE:NET/NODE.POINT format. Since a BBS can have
many different addresses, the end of this file is of variable
length. The programmer is responsible for reading to the EOF and
making sure their program, if need be, is aware of all the network
address.
====================================================================
HMC HMY - Used to hold defined editors in HMC (text)
This file is a file that contains 2 lines of text.
The first line is the full path and name of the ASCII text
editor set up by the sysop for use within HMC.EXE
The second line is the full path and name of the ANSI editor
set up by the sysop for use within HMC.EXE
====================================================================
HMQWIK HMY - Configuration for Qwik reader (professional version,text)
The structure of this file is explained within the HMQWIK.DOC
documentation file
====================================================================
NODES HMY - Contains modem, port, (and node for future use) info.
This is a file of the record data type NODES. The first record
(record #0) in this file is used internally by Harmony BBS and
should NOT be modified. The second record is used by Harmony
BBS. Each variable within NODES datatype will now be
discussed :
nodes = RECORD
modemport : byte;
{ The port number (1-4) that the modem is connected to. }
portaddr : integer;
{ If the system uses the default port address of the
communications port (defined above), then this will be set
to 0. Otherwise, this will contain the new memory
address of the communications port }
minbaud,
{ Minimum baud rate allowed for a connection to the BBS }
maxbaud : longint;
{ Maximum baud rate allowed for a connection to the BBS. If
the sysop has the communications port locked, this
variable will contain the baud rate at which it is locked
at }
hwflow,
swflow,
{ These two variables will be true if the BBS is using
either kind of flow control }
dropdtr,
{ This variable tells the BBS to drop the DTR
during a log off. If it is NOT true, it will only send
the modem offline but keep the connection }
locked,
{ This variable tells Harmony BBS whether the port is locked
at a specific baud rate }
RESERVED1,
RESERVED2 : boolean;
RESERVED3
RESERVED4 : string[72];
connect300,
connect1200,
connect1275,
connect2400,
connect4800,
connect9600,
connect19200,
connect38400,
errorcorrect,
error,
no_carrier,
voice,
no_dialtone,
busy,
ring,
{ These strings contain the text responses that Harmony
BBS will check for }
ok,
escape,
answer,
onhook,
offhook,
dial_prefix,
force_ok : String[20];
init1,
init2,
init3,
init4 : String[60];
{ These strings contain the text the Harmony BBS will
send to the modem }
delay : byte;
{ The number of seconds Harmony BBS will wait before sending
any command to the modem }
END;
====================================================================
PACKERS HMY - Contains user information on default packers for Qwik
This file will only be present in the professional version of
Harmony BBS. It is a file of CHAR; and contains the default
packer for all the users of the Qwik mail facility within
Harmony BBS. Each record number contains a character, and the
ASCII value of that character is the packer number for that
user. The packer number is determined by the order in which
they are defined within HMQWIK.HMY. This example reads a user's
default packer :
VAR
f : FILE of CHAR;
c : CHAR;
default_packer : BYTE;
BEGIN
assign (f,'packers.hmy');
reset (f);
seek (f,userNUMBER)
read (f,c);
default_packer := ORD(c);
close (f);
END;
________________________
====================================================================
Message Base Directory (C:\HM\MSGS )
MSGBSTAT HMY - All message base statistics
This is a file of MSG_BASE_STATS record types. It contains all
of the information needed for the message base section of the
BBS. The 1st record (record #0) contains the information
for message base #1. The Nth record (record #N+1) contains the
information for message base #1. The msg_base_stats explanation
follows :
msg_base_stats = RECORD
basename,
{ Name of the message base }
netname : String[40];
{ If this message base is considered to be a networked
base (and ECHO), this line contains the actual network
name of this message base. The only time this is used
by Harmony BBS is within HMC/Messages/Create AREAS.BBS
}
reqstring : String[30];
{ Requirement string Harmony BBS uses to determine access
to this message base }
subopnum : 1..1000;
{ Subop's usernumber. This number is set to 1 if the
sysop does not have an active subop for this message base
}
maxmsgs,
{ Maximum number of messages allowed for this message
base }
nettype,
{ This is currently not used by Harmony BBS. It should
not be changed since it may be incorporated in a future
version of Harmony BBS }
activemsgs : Integer;
{ The actual number of active messages for this message
base. Note that this number may not always be the actual
number of messages in the directory. The problem arises
when mail is imported to a message base and HMHOUSE
with the -M or -U parameter is not run afterwards.
Rather then checking this variable for the total number
of messages, depending on the application being written,
it may be better to be look inside the message directory
and find the highest message number }
anonsec,
{ Security level required to leave anonymous messages
for this message base }
seclvlbatch : Byte;
{ Security level required to be able to receive this
message base in a qwik packet }
netaddress,
{ The network address for this message base. When
dealing with networked message bases, this variable
should be checked instead of the main BBS network
addresses. This is because each message base may have
a different address }
tagline : string[70];
{ Tagline that is appended to the bottom of all
networked message bases }
msgbaseflags: Flagtype;
{ Message base flags. A description of each one follows:
1 - TRUE if networked message base
2 - TRUE if batch retrieval allowed
3 - TRUE is messages are to be rotated, FALSE if
message base will just be marked as "FULL"
4 - TRUE is aliases are allowed on this message
base. This flag is only checked if aliases are
allowed on the BBS
5-32 are currently not used. DON'T TOUCH! Concord
Software may use them in a later version
newscan,
{ Determines which users have this message base turned on
in their newscan. Example, if newscan[201]=TRUE then
user number 201 has this message base on and it will be
scanned when they are new scanning all message bases, and
will be packaged up into a qwik packet if available. }
postflags : ReadFlag;
{ Determines which users have the ability to post on this
message base. If postflags[user_number]=TRUE then that
user has the ability to post on this message base. }
END;
====================================================================
System Directory (C:\HM\SYSTEM )
AUTOMSG HMY - User message
This file contains the auto-message information. It is a normal
text file that contains lines containing the following
information :
User name who left message - If aliases are turned on, the
user's alias will be stored here. If the auto-message was
left as anonymous, the real name of the user is stored in
parenthesis after. For example :
Anonymous (Jasen Fici)
If the message was not left anonymously, this line would just
contain either the user's name or alias
Date AutoMessage was left - This line of text is in the
format DAY., MMM DD YYYY where DAY is the 3 letter abbreviation
for day of the week, MMM is the 3 letter abbreviation for
month, DD is the left-zero padded date (ex. 04), and YYYY is
the year
Text - The next (and last) three lines of this file contain
the actual text of the automessage
====================================================================
BBSDATA HMY - Database file for online BBS database
This file contains all the information on the BBS's that have
been entered into the BBS database. It is a file of type
BBS_DATA records. The BBS_DATA type explanation follows :
bbs_data = RECORD
name : string[70];
{ Name of bulletin board system }
host : byte;
{ Computer type BBS is run off of. This number corresponds
to the list of computers in the documentation under
configuration of users }
minbaud,
{ Minimum baud rate allowed to connect to BBS }
maxbaud : integer;
{ Maximum baud rate allowed to connect to BBS }
date,
{ Date this BBS was added to the database }
phone : string[12];
{ Phone number of BBS in XXX-XXX-XXXX formt }
hours,
{ Text describing hours of operation }
city : string[30];
{ City where BBS is operated }
state : string[02];
{ State where BBS is operated }
note : string[40];
{ Text left by user who added BBS to database. Just a note
}
END;
====================================================================
BULLETIN HMY - System bulletin information
This file contains information on all the system bulletins of
the BBS. It is a file of type BULLETIN records. Record #0 (the
first record in the file) contains information on bulletin #1.
The BULLETIN type explanation follows :
bulletin = RECORD
title : string[60];
{ This is the title of the bulletin. It is what is shown in
the bulletin listing }
reqstring: string[80];
{ Requirement string required to be able to view the
bulletin }
filename : string[100];
{ Actual file name (including drive, full path, and
name) of the file to show for this bulletin }
readflags: readflag;
{ Flags to signify if user READFLAGS[USER_NUMBER] has read
this particular bulletin. This field in conjunction with
the actual DOS file date of FILENAME are used to determine
if a bulletin is new }
END;
====================================================================
CALLLOG HMY - Activity log of callers (text)
This file contains all of the BBS activity being recorded by
Harmony BBS. Interpreting this file can be tricky. If you have
any other programs that are recording anything to this file,
then chances are it is close to impossible. The CALLLOG.HMY
file is a normal text file, each line containing information on
an event that has taken place on the BBS. Each line of text
has the following format :
X C hH:MM:SSxm Text
Where X = a number 1 though 11 which corresponds to the type of
action that has taken place. This number corresponds
the the 11 logging events that can occur and are
described in the BBSSTATS.HMY file of this document
C = a character (+,-,!,*) If a plus is in this place, it
corresponds with a positive (normal) event happening.
If it contains the -, a negative (something wrong)
thing has taken place. If it contains the !
character, then a sysop only function was executed.
hH:MM:SSxm = the time that this event was recorded. hH
stands for the hour, MM the minute and SS the second.
xm will either be "am" or "pm"
Text = a short one line description of what has taken
place
Note that the actual length of these can vary in 2 places. The
first is with the X. This can range from 1 to 2 characters long
since it has to hold 1-11. Also, the hour variable within the
time is NOT zero padded so it can range from being 1 to 2
characters long (1-12)
====================================================================
DOORSTAT HMY - Information on all available doors
This file contains all of the information on the doors setup for
use with the BBS. It is a file of of records of the DOOR_INFO
data type. An explanation of DOOR_INFO follows :
door_info = RECORD
name,
{ Name of the door }
description,
{ Short one line description of the door displayed during
listing }
reqstring : string[70];
{ Requirement string Harmony BBS checks for access to door }
start_time,
{ Start time (military hours 0-23) door becomes available }
end_time : Integer;
{ End time (military hours 0-23) door becomes unavailable.
Note that if the start_time and the end_time are the same,
then the door is considered to be available 24 hours a day
}
lbatch_file,
{ Batch file called whenever the door is entered from a
local logon (host mode) }
batch_file : string[100];
{ Batch file called whenever a user calls the door }
END;
====================================================================
EVENTS HMY - Event information
This file contains all of the information on external events for
the BBS to execute. It is a file of records of data type
TEVENT. Record #0 (the first record in the file) contains the
information on one of the events. The description of TEVENT
follows :
tevent = RECORD
title : string[50];
{ Short one line description of event }
hh,
{ Hour (military time) for event to take place }
mm,
{ Minute (0-59) for event to take place }
errlvl : integer;
{ DOS exit errorlevel to halt BBS program with }
ldate : string[10];
{ Last date this event was executed. Harmony BBS matches
the current date with this date to determine if it is time
to run the event. It is in the standard MM/DD/YYYY format }
eflags : flagtype
{ These flags are used to determine the status of this
event. The definition of each flag is as follows :
1 - TRUE is this event is currently active. If this event
is NOT active, it will not execute when the time comes.
It is the functional equivalent of turning this event off.
2 - TRUE is this event is forced. If the event is forced,
and a user logs on with a time limit that will interfere
with this event, the time limit will be adjusted. If the
event is not forced, and the event is missed (something is
happening other than the BBS waiting for a call)
3-9 These flags determine which days of the week this
event is to be executed. If they are TRUE then the
event will be executed on that day. Flag 3 stands for
Sunday through flag 9 which stands for Saturday
10-32 Reserved for Concord Software
}
END;
====================================================================
LOGON HMY - List of text files displayed at logon
This is a normal text file that contains information on the text
files displayed during a user logon right after the news is
shown. Each line of data contains the following information :
Ascii file - The full path and file name of the file to
be displayed to callers only with Ascii capability
Ansi file - The full path and file name of the file to be
displayed to callers with Ansi capability
C - A single character on this line of text. It contains
either a 'N' or a 'Y'. An 'N' tells Harmony BBS NOT to clear
the screen before showing this file, and a 'Y' tells Harmony
to clear the screen
Requirement String - This line of text contains the
requirement string that is used to determine whether a user is
allowed to read this file or not
If there is more than one logon file to be shown, they are
followed one right after another. For example, if a BBS had 3
logon files to display, this file would be 12 lines long
====================================================================
NEWSXX HMY - Text displayed when user is reading news file XX
This is a normal text file that contains the news for
news XX.
====================================================================
NEWSSTAT HMY - News information
This file contains the actual information for all of the news
files. It is a file of records of the NEWS. Record #0 (the
first file in the record) contains the information on news file
one. A description of NEWS follows :
news = RECORD
subject : string[60];
{ Subject of news }
dateposted,
{ Date the news was posted on }
timeposted : string[30];
{ Time the news was posted }
requirements: string[70];
{ Requirement string used for checking whether user has
access to read this news }
userread : readflag;
{ These flags determine each individual user's status as
to whether or not they have read this news file or not.
It will be TRUE if they HAVE read it }
RESERVED : Longint;
{ Reserved for future -- DON'T TOUCH }
readtype : Byte;
{ Determines what type of news this is. If this variable
holds the number 1, then the news file is required to be
read by the user at least one time. If it holds a 0 then
it is NOT required to be read at least once }
RESERVED : flagtype
{ Reserved for future use --- DON'T TOUCH }
END;
====================================================================
VOTINGXX HMY - Voting booth XX information
This file contains information for voting booth XX where XX is a
number from 1-TOTAL NUMBER OF VOTING BOOTHS. It is a normal
ascii file that contains the following information :
Voting Question - The number of lines the voting question
occupies is unlimited. Each line at the beginning of this file
can be part of the voting question, UP UNTIL a text line with
the text <eoq> is encountered. That text must be displayed on
a line all by its lonesome. For example :
What's your favorite type of ice cream
that you like to eat ?
<eoq>
Voting choices - The rest of this file contains all of the
choices available for this question. Each choice takes up 2
lines of text. The first line is that actual text of the
choice, and the second line is the total number of people who
have responded to the voting booth with that choice. A sample
VOTINGXX.HMY file would look like this :
What's your favorite type of ice cream
that you like to eat ?
<eoq>
Chocolate
44
Vanilla
34
Strawberry
6
Rasberry
10
The actual number of allowable choices for a voting booth has
not been determined, but is WELL beyond reasonable
====================================================================
VSTATXX HMY - Voting booth XX statistics
This file contains even more information on voting booth XX. It
is a file of records of the VOTING_STATS type. An explanation
of this type follows :
voting_stats = RECORD
title : string[60];
{ This is the title that is displayed when all of the
voting booths are listed }
reqstring : string[70];
{ This is the requirement string Harmony BBS uses to
determine if a user has access to this voting booth }
votes : integer;
{ Total number of people who have voted on this booth }
uservote : readflag;
{ Flags to determine which users have voted and which
users haven't voted. TRUE if a user has voted, and FALSE
if they haven't }
END;
________________________
====================================================================
File Transfer Directory (C:\HM\UD )
XX HMY - File descriptions for file base XX
This file contains information on all of the individual files
for file transfer base XX. It is a file of records of data type
FILE_STATS (described below). This first record in this file
(record #0) is a buffer record and should not be modified.
file_stats = RECORD
comment,
{ Individual user comment. This record can be updated by
anyone with access to this file. It is used to allow
"second opinions" on the file }
description : string[50];
{ Actual 1 line description given when the file is added
to the file base. If the file is added through HMC Move
Files, the description 'None.' will be insterted here }
username : string[30];
{ Full name or alias of user who added this file to the
file base }
usernumber : integer;
{ User log of person who added this file to the base.
This can be helpful in an alias BBS situation where the
real name of the user wants to be discovered }
dateuploaded: string[10];
{ Date file was added to file base. This string is in the
MM/DD/YYYY format and will always contain padded 0's (for
example 01/05/1991 }
timesdl,
{ Number of times this file has been downloaded }
size : Longint;
{ Actual size of file (in BYTES) }
password : string[15];
{ Password required to download this file. If no password
is required, this field should be empty }
flag : char;
{ Character containing flag information on this file.
The ORD of this character should should be AND'ed with
the following 4 bits to determine its status :
ORD(flag) AND $01 = $01 file is password protected
$00 file is NOT password protected
AND $02 = $02 file is unvalidated
$00 file is validated
AND $04 = $04 file is for sysop only
$00 file is NOT sysop only
The other 5 bits of this flag should be left alone for
Concord Software }
ext_desc : ARRAY[1..5] OF String[50];
{ In other words, only files that have extended
descriptions are placed here. }
END;
====================================================================
XX IDX - Index of files for file base XX
Index lookup table for file information. The purpose of this
file is to allow for a faster way of searching and retrieving
file information. Since each record in this file only contains
the file name and an index to the actual file information, this
file should be used to find information. It is a file of
records of data type INDEX_STATS :
index_stats = RECORD
filename : string[12];
{ File name and extention in FILENAME.EXT format. If the
file has no extention, then the . separator will not be
found (operated just like DOS) }
index : Longint;
{ Record number from XX.HMY, described above, that
contains statistics on this file }
END;
The index numbers in this file should ALWAYS be in order. For
example, record #2 should have the longint 2 in the index field.
The placement of each of these records should coincide with the
placement of the file statistics within XX.HMY
====================================================================
Example code describing how to grab a files statistics :
FUNCTION GetFileStats(
VAR fbase: transfer_stats; basenum: byte; VAR fn: STRING;
VAR idx_rec : index_stats; VAR file_rec : file_stats;
VAR
s : STRING; {temporary string }
fle : FILE OF index_stats; {used for quick look up }
fl2 : FILE OF file_stats; {actual meat of file statistics}
done : boolean; {notify when finished }
ti : index_stats; {temporary }
fi : file_stats; {temporary }
count: longint; {temporary }
BEGIN
{set up function return value }
getfilestats := False;
{determine if this is a floopy based directory }
IF fbase.transferflags[9] THEN BEGIN
{check for presense of disk by taking first character of
the file bases path name, which should contain the drive
letter of this floppy }
IF (isdiskthere( fbase.file_path[1] )) AND
(exist( fbase.file_path + fn )) THEN BEGIN
{set up file information to default setting for a floppy
file }
idx_rec.filename := fn;
idx_rec.index := 0;
file_rec.description := 'Floppy file.';
file_rec.comment := 'None.';
file_rec.username := 'Sysop';
file_rec.usernumber := 1;
file_rec.dateuploaded := sdate;
file_Rec.timesdl := 0;
file_rec.password := '';
file_rec.flag := #0;
file_rec.size := fsize(fbase.file_path + fn);
{confirm a file was found }
getfilestats := True;
END; {presence of floppy disk }
Exit; {get out of this function }
END; {floppy based transfer section }
{open index file for filename search }
Assign(fle, bbsstats.uddir + IntToStr(basenum) + '.idx');
Reset(fle);
{make sure function return value is still false }
GetFilestats := False;
{set up for loop}
done := False;
{while the the end of the index file has NOT been reached,
and DONE=FALSE }
WHILE (NOT Eof(fle)) AND (NOT done) DO BEGIN
{grab next file index }
Read(fle, ti);
{check record with file name we are looking for }
{setlower simply changes all the text to lowercase for
easier string matching }
IF SetLower(ti.filename) = SetLower(fn) THEN done := True;
END; {index search }
{check file extention }
s := fileext(fn);
{if the file we are checking for does NOT contain a file
extention, append the default extention for this base, and
search through the index again }
IF (NOT done) AND (s = '') THEN BEGIN
{append default extention }
fn := fn + '.' + fbase.def_ext;
{set file pointer to beginning of file }
Reset(fle);
{begin looping through again }
WHILE (NOT Eof(fle)) AND (NOT done) DO BEGIN
Read(fle, ti);
IF SetLower(ti.filename) = SetLower(fn) THEN done := True;
END;
END; {appended file extention search }
Close(fle); {close index file }
{file cound NOT be found, return false }
IF NOT done THEN Exit;
{grab the statistics on the file now that it has been
determined that the file exists on this base }
count := 0;
{assign found index to variable passed to function }
idx_rec := ti;
{open statistics file for reading }
Assign(fl2, bbsstats.uddir + IntToStr(basenum) + '.hmy');
Reset(fl2);
{go grab the correct record and read it }
Seek(fl2, idx_rec.index);
Read(fl2, fi);
{close file statistics file }
Close(fl2);
{assign found statistics for variable passed to function }
file_rec := fi;
{set function return value to TRUE since file was found }
GetFileStats := True;
END; {function }
This function could be made more efficient by doing a one pass
search for filename and filename+extention, but it may not
return the correct value if there were two files in the base with
the same first part of a filename (for example, HELLO and
HELLO.ANS
====================================================================
PROTOCOL HMY - External protocol information (text)
Contains all the information on the protocols set up to use with
the BBS. It is a normal text file with the following format :
{protocol 1 information}
{protocol 2 information}
...
{protocol N information}
Each protocol information consists of 7 lines of text in the
following manner :
Name - The name of the protocol. If an internal
protocol is in this place, it will start with a !# where # is
the actual internal protocol to use. This number corresponds
to the following internal protocols :
1. Xmodem
2. Xmodem-1k
3. Ymodem
4. Ymodem-G
5. Zmodem
6. Kermit
7. ASCII
As you can see it can be pretty easy to mess up the number
of the internal protocol with the actual name of the
protocol. This is the responsibility of the sysop or the
programmer who is dealing with this file
Description - Short one line descriptions (under 50
characters) of the protocol
ErrorLevel - the DOS exit code this protocol returns upon a
successful file transfer
Maximum Downloads - the maximum number of downloads the sysop
allows for this protocol. This is usually controlled by the
protocol itself, but the sysop may want to configure a smaller
number
Receive File Name - Name of the batch file called when this
protocol is called upon to receive a file. If this protocol
is defined as an internal protocol (by the ! in the protocol
name), this line should be left empty
Send File Name - Name of the batch file called when this
protocol is called upon to send a file. If this protocol is
defined as an internal protocol (by the ! in the protocol
name), this line should be left empty
Character - This line should contain the single CAPITAL letter
used to let the user pick from the protocol choice menu. This
character should NEVER be repeated within a different
protocol. If it is, then the first one will always be chosen.
====================================================================
UDSTAT HMY - All file base information
Contains all the information on the file bases. It is a file of
records of type TRANSFER_STATS. The first record (record #0)
contains information on file base #1. The TRANSFER_STATS record
description follows :
transfer_stats = RECORD
subname : String[40];
{ Name of file base }
file_path : String[70];
{ Fully qualified drive and path name of location of files
for file base }
def_ext : String[3];
{ Default extention for file base }
fratio,
{ File ratio that must be maintained for file base }
kratio : Real;
{ K (1k=1024bytes) ratio that must be maintained for file
base }
spaceused,
{ Amount of space (in K) taken up collectively by all the
files in this base }
maxspace : Longint;
{ Maximum amount of space allowed (in K) to be allocate
for file base. This number will be set to 0 if
there is no disk limit }
maxfiles,
{ Maximum number of files allowed for this file base.
This number will be 0 if there is no maximum files limit
}
activefiles,
{ The current number of files in file base }
kperup,
{ Amount of K to give to a user for every 1k uploaded }
kperdown,
{ Amount of K to take from a user for every 1k downloaded.
This variable, and the kperup variable control the
calculated user ratio }
cperup,
{ Amount of file credits to give to a user for every 1
file uploaded }
cperdown : Integer;
{ Amount of file credits to take from a user for every 1
file downloaded. This variable, and the cperup variable
conrtol the calculated user ratio }
sltoval : byte;
{ Security level required by a user to download
unvalidated files }
transfersl,
{ Requirement string used to determine access to file base
}
batchsl,
{ Requirement string used to determine access to batch
downloads from this file base }
creditsl : String[70];
{ Requirement string used to determine whether the credit
system is active for the user within the file base. If
the user does NOT meet this requirement string then the
credit system will be active for them (if the credit
system is turned on of course) }
minbaud : Integer;
{ Minimum baud rate required to enter this file base }
transferflags : Flagtype;
{ Transfer flags for file base. Each flag stands for the
following information :
1 - TRUE if file base is currently active. FALSE if the
file base has been temporarily shut down
2 - TRUE if files are automatically set to UNVALIDATED
when they are uploaded by users. FALSE is they are
never to be flagged as unvalidated
3 - TRUE if the credit system is active for file base,
FALSE if the credit system is currently turned off
for this file base
4 - TRUE if the file credit system is currently in
effect, FALSE if the KperK credit system is in
effect. Note that this flag is only looked at if
the credit system is on at all (determined by flag
3)
5 - TRUE if extended descriptions are allowed for file
base. FALSE if no extended descriptions are
allowed
6 - TRUE if users are allowed to password protect files
when they are uploaded. FALSE is passwords are not
allowed on this file base
7 - TRUE is sysop only files are allowed on this base.
FALSE is sysop only files are NOT allowed
8 - TRUE is users with VALIDATED security levels are
allowed to download unvalidated files from file base
9 - TRUE if file base is marked as a floppy base. FALSE
if it is marked as a normal base. If the file base
is marked as a floppy base, Harmony BBS will never
look for the XX.IDX,XX.HMY and XX.EXT files, it will
simply grab information directly from the disk
10-32 reserved for future use by Concord Software }
END;
________________________
====================================================================
User Directory (C:\HM\USERS )
DENIAL HMY - List of non-acceptable names of users
Contains all the words that Harmony BBS will scan for during a
logon sequence. It is a normal text file, each line containing
a word or set of words that Harmony will look for. An example
of this file follows :
hacker
pirate
jon doe
empty
In this case, Harmony BBS will not allow access to anyone with a
name or alias that CONTAINS any of the above text. For example,
someone with the name JON DOESGOOD would not be allowed access
to Harmony BBS
====================================================================
USERLOG HMY - All user information
Contains all of the information on all the users of the BBS. It
is a file of records of type USER_STATS, a explanation of this
record follows :
user_stats = RECORD
firstname : String[14];
{ First REAL name of user. Should be in all capitals }
lastname : String[15];
{ Last part of REAL name of user. Should be in all
capitals }
alias : String[30];
{ Alias of user. If BBS does not have aliases turned on,
this field will be ignored }
address : String[40];
{ Street address }
city : String[20];
{ City }
state : String[02];
{ 2 character state code }
zipcode : String[05];
{ First 5 digits of zip code }
phone : String[12];
{ Phone number in ###-###-#### format }
password : String[20];
{ Password - CASE SENSITIVE }
birthday,
{ Birthday of user (in MM/DD/YYYY format with padded 0's,
for example 01/05/1970) }
laston : String[10];
{ Last date the user called on. Follows same format at
birthday field }
kbuploaded,
{ Amount of K(1k=1024bytes) uploaded from user }
kbdownloaded,
{ Amount of K downloaded from user }
callstotal : Longint;
{ Total number of calls user made to system }
mailwaiting,
{ Amount of mail waiting .. NOTE : NEVER look at this
field to determine the actual amount of mail waiting. It
is basically left over from the original way Harmony BBS
was handling private (post office) mail. Now, Harmony BBS
does a quick scan of the mail directory at strategic times
to determine the amount of mail the user has waiting }
totalposted,
{ Total number of message user has posted }
totdownloaded,
{ Total number of files user has downloaded }
totuploaded,
{ Total number of files user has uploaded }
callstoday : Integer;
{ Number of calls user has made to BBS today }
RESERVED5 ,
{ Ignore }
screenlength,
{ User's physical screen height, used to determine screen
pausing and full screen message editor size }
screenwidth,
{ User's physical column width. Not used much except in
word wrapping situations }
Protocol,
{ Default protocol. This is currently only used within
the professional version of Harmony BBS where the default
protocol is used in Qwk mail sessions. It contains the
ORD of the character which should be equal to one of the
characters determined in the last line of every protocol
within the file PROTOCOLS.HMY (described earlier) If this
variable is set to 0, no default protocol has been chosen
}
security,
{ Security level of user, 1-100 }
computer : Byte;
{ Computer type of user. This number corresponds to the
list shown within the Harmony BBS documenation }
moneyowed : Real;
{ Amount of money user owes to whatever organization is
being run by the sysop }
userflags : Flagtype;
{ Flag settings for user. The flags definitions are as
follows :
1 - TRUE if the last time user logged on, he/she logged
on in ANSI mode
2 - TRUE if screen pausing is currently on for user
3 - TRUE if user has CAPITAL LETTER functions only
4 - TRUE if user has access to message bases
FALSE if message base access for this user has been
turned off
5 - TRUE if user has access to file transfer section
FALSE if file transfer section access has been
turned off
6 - TRUE if user has access to Qwik functions of the
professional version of Harmony BBS
7 - should ALWAYS be FALSE
8 - TRUE if user is male, FALSE if user is female
9 - should ALWAYS be TRUE
10 - TRUE if user is allowed to download batch files
11 - TRUE if user is allowed to post messages
12 - TRUE if user is allowed to send private mail
13 - TRUE if user wishes to see message base entrance
files
14 - TRUE if user is allowed to download files at all
15 - TRUE if user is allowed to download unvalidated
files (used in conjunction with transferflags[8] in
transfer_stats data type
16 - TRUE if user has full screen editor configured as
their default editor. FALSE if line editor is
default
17 - TRUE if user has graphical screen pausing turned on
18 - System defined flag A
19 - System defined flag B
20 - System defined flag C
END;
An important note should be made about this file. It is VERY
important that the first record of this file (record #0) NEVER,
EVER be written to. User records start at record #1 (the second
physical record in the file) and contains the sysop's user
information. If record #0 ever gets corrupted, chances are
almost definite a full reinstallation will have to take place
====================================================================
╔═════════════════════════════════════════════════════════════════════════╗
║Concord Software make no claims or gaurantees as to the accuracy of this║
║ document. All warranties, copyrights, and distribution policies ║
║explained in the main Harmony BBS documentation are also extended to this║
║ document. Concord Software takes NO responsibility for any damages, ║
║ either expressed or implied, that may result from the use of Harmony ║
║ BBS, or the information within this document. ║
╚═════════════════════════════════════════════════════════════════════════╝