Metropoli BBS
VIEWER: spawnbbs.ctl MODE: TEXT (ASCII)
@Echo off

Rem *** SPAWNBBS.BAT batch file for node @QFRONTNODE ***

@DRIVE
CD @PATH

SET DSZLOG=PCBDSZ.LOG

If Exist remote.bat rename remote.bat remote.sys
If Exist door.bat del door.bat
If Exist endpcb del endpcb

Rem *** NOTES ON LOADING PCBOARD WITH QFRONT ***

Rem In the default QFront configuration, %1 is the baud rate and
Rem %2 is YES or NO depending on whether an error-correching
Rem connection has been established.

Rem If the sysop presses 'L' from the QFront call waiting string,
Rem QFront passes the string 'LOCAL' as %1 and PCBoard gets loaded
Rem in local mode.

Rem If returing from a door, 'RETURN' gets passed as %1, and PCBoard
Rem gets reloaded normally.  Your BOARD.BAT (used to reload PCBoard after
Rem a door is done) file will pass the 'RETURN' parameter automatically.

If %1==RETURN Goto ReturnDoor
If %1==LOCAL Goto LoadLocal
If %2==YES @PCBEXENAME /C:%1 /ERR /EVENT:%MINUTES% %3 %4
If %2==NO @PCBEXENAME /C:%1 /EVENT:%MINUTES% %3 %4
Goto Top

:ReturnDoor
@PCBEXENAME /EVENT:%MINUTES%
Goto Top

:LoadLocal
@PCBEXENAME /LOCALON /KEY:@QFLOGON.KEY /EVENT:%MINUTES%
Goto Top

:Top
If Exist remote.bat remote
If Exist door.bat door PCB
If Exist endpcb goto end

Goto ReturnDoor

Rem *** NOTES ON OPENING DOORS ***

Rem Opening doors with QFront installed is as easy as it is without it
Rem installed.  Your BOARD.BAT file should be similar to this:

Rem @DRIVE
Rem CD @PATH
Rem SPAWNBBS.BAT RETURN

Rem Since the BOARD.BAT file is no longer used when you have QFront
Rem installed (STARTER.BAT replaces it), you can modify it to say the
Rem three lines just shown.  All this batch file does is loads
Rem SPAWNBBS.BAT (the file you're reading now) and will pass 'RETURN'
Rem as a command line parameter.  Then SPAWNBBS.BAT will see that
Rem %1=='RETURN' and will reload PCBoard normally.
Rem Doing all this will mean that all of your current door batch files will
Rem not need to be changed.

Rem The ':End' label will reload the STARTER.BAT file, in effect resetting
Rem the system by loading QFront and waiting for the next call.

:End
Starter
[ RETURN TO DIRECTORY ]