====== Synchronet set-up (member BBS) ======

On a member BBS running Synchronet, callers reach the hub through ''doorhub.js''. It works like ''doorparty.js'': it opens an RLogin connection to the [[doorhub:connector|connector]] with the caller's alias, a password it makes for that caller, and the game code.

===== Install doorhub.js =====

Copy ''doorhub.js'' from the package into your Synchronet ''mods'' folder (''/sbbs/mods'' or ''C:\sbbs\mods''). Synchronet looks in ''mods'' before ''exec'', so nothing else needs changing.

The first time a caller uses it, ''doorhub.js'' makes a random 16-character hub password for them and keeps it in their user properties (section ''doorhub''). The same password is sent every time after that.

==== Options ====

If your connector isn't on ''localhost:9998'', add a section to ''ctrl/modopts.ini'':

<code ini>
[doorhub]
tunnel_host = localhost
tunnel_port = 9998
; password = something   ; optional: one hub password for every caller
</code>

===== Add the door in SCFG =====

In SCFG choose **External Programs**, **Online Programs (Doors)**, pick a section (for example the one your DoorParty entry is in) and add a program:

^ SCFG setting ^ Value ^
| Name | Door Hub Games |
| Internal Code | DOORHUB |
| Start-up Directory | (blank) |
| Command Line | ''?doorhub.js'' |
| Multiple Concurrent Users | Yes |
| BBS Drop File Type | None |
| Native Executable/Script | No |

Save and exit SCFG. Synchronet reads the change when nobody is online, so log off and back on to see the new entry.

That entry shows the hub's game menu. To send callers **straight into one game**, add one entry per game with the game's code after the script name:

^ Command Line ^ Game (Kalgoorlie Door Hub) ^
| ''?doorhub.js lord'' | Legend of the Red Dragon |
| ''?doorhub.js reach'' | Ember Reach |
| ''?doorhub.js seal'' | The Broken Seal |
| ''?doorhub.js wake'' | The Long Wake |

Other hubs have their own codes; ask the hub's sysop. If a game is closed, the caller gets the hub menu instead.

**Tip:** while you test, set the entry's **Access Requirements** to ''SYSOP'' so only you see it. Clear it when you're ready for callers.

===== Synchronet on Windows =====

Exactly the same: ''doorhub.js'' in ''C:\sbbs\mods'', the same SCFG entry. The connector runs as a Windows service (see [[doorhub:connector#windows|The connector]]).

===== What the caller sees =====

<code>
Connecting to the Door Hub, please wait ...

                               Kalgoorlie Door Hub

 Playing as [KAL]Heisenberg

 1) Ember Reach
 2) Legend of the Red Dragon
 3) The Broken Seal
 4) The Long Wake

 Q) Return to your BBS

 Choose:
</code>

After a game chosen from the menu, the caller returns to the menu. After a direct entry (''?doorhub.js lord'') they return straight to your BBS. If no key is pressed at the menu for 5 minutes, the caller is sent back to your BBS.
