Node Node \ / Node - Hub - Node Global War InterBBS Technical Documentation / \ Node Node Global War InterBBS Routing - OVERVIEW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Global War InterBBS networks are arranged with one central Hub connected to any number of Nodes. All games must be Fixed Turn Order games. This is a new type of game in Global War 3.0 where players take their turns in sequence. New games created on a Node are MOVED to the Hub. The Hub receives the new game, assigns it a game number, and adds it to its games area. Copies of the game are then sent to all Nodes. New games created on the Hub are sent to all Nodes. When any change occurs in a game, the Node sends a copy of the game to the Hub and the Hub sends copies of the game to all Nodes. When changes to a game on the Hub occur, copies of the game are sent to all Nodes. Score changes on a Node are saved in a file called updscore.war. When any scores change, this file is moved to the Hub. The Hub combines the score changes in updscore.war with those in the master (winners.war) score file. Copies of the updated winners.war file are then sent to all Nodes. If the upper limit of the rankings is exceeded (see war.cfg line 35) the Hall of Fame (HOF) utility is executed. HOF resets the ranks in winners.war and updates the Bulletin.Ans file. Bulletin.Ans is then sent to all Nodes. GWIBBS InterBBS processing program ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GWIBBS In File.ZIP (input games to a node) Copies specified zip file into inzip directory. Unzips inzip\zip file into infiles directory. Checks for valid key (1) within the ZIP file. If invalid, deletes inzip and infiles dirs and quits. If valid key (1) found, proceeds with the following: Deletes zip file. Examines the Stage (2) value of all incoming games and compares it with the Stage (2) value of the existing game (if there is one). If the Stage (2) value of the incoming game is greater or equal, the incoming game is imported (3). If there is no existing game the incoming game is imported (3). If the Stage (2) value is less, the incoming game is not imported. If a WAR.CFG file is found, lines 3, 4, 7, 10-12, 15, 17-30, 33-35, 39, 53-61 and 63 of the Node's WAR.CFG file are updated to match those of the WAR.CFG file received from the Hub. If an IBBS.CFG file is found, lines 1 and 4 are updated to match those of the IBBS.CFG file received from the Hub. Any *.TOP, *.WAR, *.ANS or *.EXE files found are moved to the door directory. They will replace any files by the same name unless the file in the door directory is write protected. All files in the infiles directory are deleted. GWIBBS Out (output games from a node) Reads GWIBBS.$$$ (a log file created by Global War) to get N:ew, U:pdated game numbers and S:corechange indication New games: moves the warxx.dat, warxx.log, warxx.msg to outfiles dir where they are renamed newxx.dat, newxx.log, newxx.msg Updated games: copies the warxx.dat, warxx.log, warxx.msg files to outfiles directory. Score Updates: moves updscore.war to outfiles where it is renamed score##.war (## is a unique id from 1..255 incremented each time). Zips all files in outfiles dir, adds Key, calls IBBSMOVE to send to hub. GWIBBS InHub File.Zip (input games to a Hub) Copies specified zip file into inzip directory. Unzips inzip\zip file into infiles directory. Checks for valid key (1) within the ZIP file. If invalid, deletes inzip and infiles dirs and quits. If valid key (1) found, proceeds with the following: Deletes ZIP file. If any new games exist (newxx.*), copies them to current dir & names them warnn.* where nn is an unused game number. Moves game to outfiles dir to send to all Nodes. Examines the Stage (2) value of all incoming games and compares it with the Stage (2) value of the existing game (if there is one). If the Stage (2) value of the incoming game is greater, the incoming game is imported (3) and copied to the outfiles directory to send to all Nodes. If there is no existing game the incoming game is imported (3). If the Stage (2) value is less or equal, the incoming game is not imported or sent to Nodes. If score file updates (score##.war) exists, they are moved to the door directory and renamed updscore.war, combined with the scores in the master score file winners.war. If the maximum score is exceeded then the Hall of Fame utility is run to generate a Bulletin.Ans file. Winners.Top is deleted. Bulletin.Ans and winners.war are copied to the outfiles dir to be sent to all Nodes. For every Node listed in Route.Cfg - Zips all files in outfiles dir, adds Key (1), calls IBBSMOVE send Zip file to each Node. GWIBBS OutHub (output games from a Hub) Reads GWIBBS.$$$ (log file created by Global War) to get N:ew, U:pdated game numbers and S:corechange indication New and Updated games: copy the *.dat, *.log, *.msg to outfiles dir Score file updates: copy winners.war to outfiles directory. Deletes updscore.war, which is not used on the hub. For every Node listed in Route.Cfg - Zips all files in outfiles dir, adds Key (1), calls IBBSMOVE send Zip file to each Node. GWIBBS HubInit [NodeAddress] (initialize a node. If NodeAddress is not specified, reinitializes all nodes) Copies all games (WAR*.DAT, WAR*.LOG, WAR*.MSG) to outfiles dir. Copies current score file (WINNERS.WAR) to outfiles dir. Copies current Hall of Fame (BULLETIN.ANS) to outfiles dir. Copies WAR.CFG and IBBS.CFG to outfiles dir. Copies WAR.EXE and GWIBBS.EXE to outfiles dir. Zips all files in outfiles dir, adds Key (1), calls IBBSMOVE to send Zip file. Zip file is sent to NodeAddress if specified on command line and matches entry in ROUTE.CFG. If no NodeAddress is specified (or if NodeAddress is "ALL" then Zip files are created and sent to all Nodes listed in ROUTE.CFG. GWIBBS HubSend [NodeAddress] (sends all files in outfiles dir to a node. If NodeAddress is not specified, sends to all nodes) Zips all files in outfiles dir, adds Key (1), calls IBBSMOVE to send Zip file. Zip file is sent to NodeAddress if specified on command line and matches entry in ROUTE.CFG. If no NodeAddress is specified (or if NodeAddress is "ALL" then Zip files are created and sent to all Nodes listed in ROUTE.CFG. ------------------------------------------------------------------------- Notes: (1) What is The Key file? It identifies the ZIP file as a valid IBBS archive. If no key file is found in the ZIP file, the ZIP file will not be accepted for processing. The Sysop may have tried to process the wrong ZIP file. The Key file is also for security. The key file contains the secret password for the net. If the password is wrong, the ZIP file will not be accepted. This prevents a hacker from sending us a bogus ZIP file. When the ZIP file is created, it is encrypted using PKZIP's -S switch. If the ZIP file should ever fall into the wrong hands, the encryption will prevent a hacker from unzipping the file and discovering the password stored in the key file. (2) Stage value. This is a number that indicates how far the game has progressed. It is used when comparing two games to see which one is newer and to prevent an older game from replacing a newer game. Stage=100 when a game is created. Stage is incremented by 1 every time a player takes a turn, changes a vote or password. Stage is incremented by 100 every time a player joins or removes their name from a game. When a game starts, Stage is set to 10000. The higher the stage value, the newer the game. (3) Imported means the WAR*.DAT, WAR*.LOG and WAR*.MSG files are accepted by the node. They are copied from the infiles directory to the door directory and replace any files with the same name.