
BAJA PROGRAMMING


                   Ŀ
                 A Practical                  
                      Guide to       Creating  
                                              
                  \  / \Ĵ
                       "Rooms"                 
                 /\    In       
                                              
                Synchronet   BBS   Systems    
                



Here is the way I configured "rooms" or virtual BBSes for my Synchronet
BBS, COMM*Net. Read this through and be sure you understand it so that
you can reconfigure the steps to suit your board.

                       --------------------------

                                OVERVIEW

        User John Lite logs on to the BBS and wants to go into the PC
Support area. He wants to read messages, look for new files, chat with
others that he knows are interested in PC Support also, and run a
database that accesses a list of PC based, shareware heavy BBSes.

        From the Main Menu, he hits the "R" key to take him to the
"Rooms Master Menu" where he selects room #1, PC Support.

        After he hits the "1" key, the baja-shell runs exec_xtrn <code>
and runs a batch file that copies a text file (c:\sbbs\xtrn\pccprt\pcIN.txt)
to John's node directory and renames it "moduser.dat". This file removes
his access to all the rest of the board, and gives him access to the
room's features. Synchronet reads this file and modifies his ARS
settings on return from this xtrn program and his access is modified
instantly.

        Then, the shell runs a mymod.bin (a baja module - which for my
test was a complete command shell, renamed, with a baja step "return"
used for returning to the main board.)

        John does whatever he does in the room, then hits "Q" from the
room's main menu (or from any menu where I've placed the "return"), to
return to the main board.

        The mymod.bin quits and control goes back to the main shell
where the next step is another exec_xtrn <code> (another one line batch
file) that copies a different text file (c:\sbbs\xtrn\pccprt\rmreset.txt) as
"moduser.dat" to John's current node directory, where SBBS resets his
access back to main-board "normal" and removes his access to the room's
contents.

        That's basically it. Now here are the steps.

                            ---------------

1. Go through and add a particular flag for every board feature. Message
groups, File Libraries, chat channels (except channel 1 - since
everybody goes to channel 1 first, it has to be kept open or there won't
be ANY chat available in the rooms), doors, text file areas -
everything. I made Flag Set 3A my "everything else" flag. Items with
this flag will be accessible OUTSIDE the rooms.

        a. Add the ARS access for the room contents. (I set aside all of
        Flag Set 4 solely for room access purposes.) Replace your access
        strings for room features with the appropriate flags. Everything
        in John's PC Support Room had an access flag of 4A. The Mac room
        might be 4B, get it?

2. Give every user the flag for access to "everything else", 3A.

3. Make an sbbs\xtrn\pcsuprt directory to put menus, batch files and
text files in for each room.

4. Write the baja module for the room. This could be anything from a
full BBS shell handled as a module with a "return" appropriately placed,
to a simple text file display, or game. In baja you can include the
"welcome to..." and "thanks for visiting..." screens, and anything else
you want for the room. Also create your menus and place them wherever
your module will expect to find them. I put mine in the room's \xtrn\
directory for simplicity.

   If you are going to let users do "O" and/or "/O" logoffs from inside
the room, then be sure immediately after he presses that key that the
exit.bat executes to reset his access back to main board normal before
the baja "logoff" or "logoff_fast".

