IBBS - An InterBBS Unit Copyright (c)1993-95 Andy Stewart Introduction =---====---= What is InterBBS? In it's simplest explanation, it's the ability for a BBS Door to share it's scores with a number of other BBS'. Yup, that's about as simple an explanation as you can get. But this is NOT the only use for an InterBBS package. The complexity for the InterBBS portion of your Door is only limited by two things: your imagination and programming ability. (Ok, three... patience) . You could go as far as to create a Space Door, and treat each BBS as it's own galaxy/government where you send attack fleets, spys, diplomats, start wars, sign treaties, discover new planets, create space stations, explore uncharted territory, etc. (You know, your basic Star Trek / Star Wars / Babylon 5 sorta game ). Copyright Info =----====----= The IBBS.PAS code included in the archive is Freeware and can be used in any manner you wish and without cost, but remains copyrighted by Andy Stewart. You may NOT distribute modified copies of this unit! You may, however, send your changes/fixes/etc. to Andy Stewart (1:2230/146) or Bob Dalton (1:391/3010) for possible inclusion in the next release of IBBS/DDPlus. Requirements =---====---= At this point only requirements are that you must be using Turbo Pascal v6.0 or 7.0. I compiled the unit with Turbo Pascal v7.0 and know it works. I expect it will with TP v6.0 and BP v7.0 as well but can't guarantee it. IBBS.PAS does NOT rely on DDPLUS.PAS, everything it needs is either self contained, or comes with your compiler. To USE the InterBBS package, you need a copy of PKZIP.EXE and PKUNZIP.EXE in your path. Be SURE to tell the Sysop using your Door that these two files are REQUIRED for InterBBS use! You also need to be running a front door system (ie: FrontDoor, InterMail, Binkley, etc.) and be in a FidoNet compatable network. This unit ONLY works with a Fidonet style network. Files Included =----====----= - Below is a listing of all files for the IBBS.ZIP Package - IBBS.DOC - This text file. IBBS.CFG - Sample configuration file for the IBBS unit. ROUTE.CFG - Sample routing configuration file. IBBSDEMO.EXE - Compiled version of the IBBSDEMO.PAS program. Just a little demo of how to use the IBBS unit. You'll need to edit IBBS.CFG first to reflect your paths. Actually, it won't do anything because it won't find any *.MSG files to it or any files to be sent. IBBSDEMO.PAS - Source code to the IBBSDEMO.EXE program. IBBS.PAS - The InterBBS unit. READMSGS.PAS - Sample source code for reading all messages. Installation and Preparation for Use =-----------============-----------= 1) Move the archive package to a temporary directory and UNZip it. 2) Edit the IBBS.CFG to reflect your paths, etc. 3) Try the IBBSDEMO.EXE program just for the 'ell of it. It accepts 3 different parameters: IN, OUT, and HUB. IBBSDEMO IN will scan all *.MSG files in your 'netmail' directory for any messages to the Door, and copy the file(s) attached to the 'inzip' directory. (It won't FIND any *.MSG files to it on this run, but it'll give ya an idea.) Then, if any files exist in the 'inzip' directory, it will unzip them into the 'infiles' directory. The *.MSG files to the Door will be deleted after use, and the ZIP(s) will be deleted after they are UNZip'd. IBBSDEMO OUT will scan your 'outfiles' directory, and if any files exist, it will create a ZIP called 13913010.ZIP in the 'outzip' directory, and create a *.MSG in your 'netmail' directory with TEST.ZIP as a file attach with all the correct flags for Fido. All files that were ZIP'd into .13913010ZIP will be deleted. IBBSDEMO HUB will scan your 'outfiles' directory, and if any files exist, it will read each line in ROUTE.CFG, and create a ZIP based on the name in the second field of the line into the 'outzip' directory, and create a *.MSG in your 'netmail' directory with the file as a file attach with all the correct flags for Fido. After reading all of ROUTE.CFG, all files that were ZIP'd into the files will be deleted. 4) Before compiling the IBBS.PAS unit be sure that your compiler knows where to find the listed units. 5) Add IBBS to the 'Uses' portion of your program and call the procedures as needed and shown below. 6) That's it! Enjoy and good luck. Configuration Files Explained =-------=============-------= (* Begin IBBS.CFG *) 1:2230/146 1:391/3010 DreamROM C:\FD\NETMAIL\ C:\FD\FILE\ INFILES\ OUTFILES\ OUTZIP\ INZIP\ (************** IBBS.CFG - Everything after line 9 is ignored. ************) Line 1: Your Net Address Line 2: The To Net Address Line 3: This Door's Name Line 4: Netmail Path Line 5: Incoming File Path Line 6: Name Of Directory To Uncompress Incoming Files To Line 7: Name Of Directory Holding Outgoing Files To Be Compressed Line 8: Name Of Directory Holding Compressed Outgoing Files Line 9: Name Of Directory Holding Compressed Incoming Files (* End IBBS.CFG *) (* Begin ROUTE.CFG *) 1:398/2;ARTI 1:105/278;WCS 1:137/201;WOODLAND 1:115/258;STATION1 1:246/93;FIREHSE ; --------------------------------------------------------- ; Format for ROUTE.CFG is: ; TO_ADDRESS:FILENAME ; IE: In line one above, all files in the outfiles directory ; will be ZIP'd into ARTI.ZIP and sent to 1:398/2 ; ; All lines beginning with ; are ignored. (* Begin END.CFG *) How To Use The InterBBS Unit And How It Works =-------============-------= The InterBBS unit handles all the transfers of InterBBS packets between systems. An InterBBS packet can be scores, messages, files, etc., it doesn't matter and the unit doesn't care. Your Door handles the USE of the packets send to and from systems using the InterBBS package, IBBS will NOT process them for you, as it's impossible for me to know the format, what they are, what's supposed to be done with them, etc. IBBS just gathers them, compresses them sends them to the system, takes files from the system, and uncompresses them. To send InterBBS files via IBBS.PAS: Your Door MUST place all files to be sent to the remote system via IBBS in the OUTFILES directory. The files can be ANYTHING, but MUST be in the OUTFILES dir. Call procedure make_ibbs_outgoing(); like so: make_ibbs_outgoing('FILENAME'); where FILENAME is the filename you want created (ZIP'd) and sent. To base it on the to_system_address, call it as make_ibbs_outgoing(convert_address(to_system_address)); Do NOT add the '.ZIP' extension! Make_ibbs_outgoing will ZIP create the zipfile, then create a *.MSG file in your NETMAIL directory with C:\DOORPATH\OUTZIP\FILENAME.ZIP attached to it. (C:\DOORPATH is your current Door's directory, which is obtained at the start of the unit). It will set the correct flags for the *.MSG file, which are: Pvt, Crash, Attached, Kill/Sent, Local, Direct, Delete/Sent. It will add IBBS, INTL, FLAGS, and TID: lines to the top of the text portion of the message. These are used by the front door program and/or by IBBS. Your front door program takes it from here. To receive InterBBS files via IBBS.PAS: Call get_ibbs_incoming; Get_ibbs_incoming will scan your NETMAIL directory for all *.MSG files address to the Door. (*.MSG identity is determined by several factors including System Address, To Field, and the IBBS line). If any *.MSG files to it are found, the attached file is moved from your FILES directory to the INZIP directory and the *.MSG is deleted. Your INZIP directory will next be scanned for for any ZIP files. If any exist, they will be unzip'd into your INFILES directory and the ZIP file(s) will be deleted. This is where your program takes over. To use the 'HUB' feature: This is the same as INTERBBS OUT except it creates multiple *.MSG and ZIP files. The systems and filenames are taken from ROUTE.CFG. To use this feature, call make_multi_ibbs_outgoing; This can be used in a couple different ways. Either you can set up one system to be a hub where all systems send their packets to it, it processes them and sends the processed packets out to all systems. Or, each system could send thier packet to each system in the InterBBS network. This will be expanded on in later version. See Future Directions. You can integrate the IBBS into your Door in two ways. You can: 1) Use it internally and call in incoming procedures as the user enters the door and the outgoing procedures are the user exists the door. (This is ok if your InterBBS routines are just simple ones like score sharing, etc. Anything MAJOR will cause the user to wait and they can become VERY impatient waiting on it to finish. This isn't a recommended method of handling InterBBS files). 2) Create an InterBBS EXE similar to IBBSDEMO.EXE and use it in your frontdoor's batchfile. For example, after mail is received, the front door program drops with an errorlevel, this is where you'd run the EXE. (This is the recommended method) IBBSDEMO IN { To check for incoming *.MSG files } IBBSDEMO OUT { To create outgoing *.MSG files } IBBSDEMO HUB { To create multiple *.MSG files } Future Directions =-------============-------= This InterBBS kit will be kept as Freeware (as far as I can tell ), but will remain copyrighted to myself. Refer back to Copyright Info. In future versions, the 'HUB' feature will be expanded upon. I'm working on adding a routing grid for use with the kit which will be added to the kit at a later date. Enjoy the InterBBS package, and I hope it's of use to you. Andy Stewart DreamWARE Communications 1:2230/146