ParlorNet
Turn-based game server for any computer, old or new
Clients | Protocols | Browsers | Telnet programs | Docs | Source

X11 and Unix FIBS clients (xfibs 0.8, xibc 0.31) and the Amiga Connect_FIBS script: what they expect from a FIBS server

Status: research notes, 2026-11-21. Every fact carries a source tag like [S1] (list in section a). Anything not backed by a source is marked UNVERIFIED.

Method: reading the distributed source code (C for xfibs, Tcl/Expect for xibc, an AmigaDOS script for Connect_FIBS). Nothing was compiled or run, and no server was contacted. TkFibs (Keith Vetter, 1994) was not found in the archives searched (discmaster.textfiles.com, Aminet). It is listed as missing.

Key findings in brief

  1. All three are telnet-mode FIBS clients: login: / password: prompts, > prompt, set boardstyle 3, English messages, CR LF line ends [S1][S2]. None speaks CLIP.
  2. **xfibs needs the > prompt after every burst of output. Once logged in, it buffers everything it reads until the buffer ends with > ** and only then parses. Asynchronous messages, such as the opponent's roll and move, must also be followed by a fresh > prompt, or xfibs shows nothing [S1]. It splits lines on CR LF only.
  3. **xibc anchors every pattern at line start and requires \r\n**. It recognises > as a prompt token. Its host and port are hard-coded in the script (spawn telnet fraggel65.mdstud.chalmers.se 4321), so the user edits one line of Tcl [S2].
  4. The Amiga Connect_FIBS is only a one-line launcher, telnet fibs.com 4321. On the Amiga, FIBS was played as a plain terminal session [S3]. The same holds for any machine with a terminal program: the server's ASCII board (boardstyle 1/2) is then the interface.
  5. Verdict: covered by the planned FIBS adapter's telnet mode. The requirements here are the opposite of MacFIBS's: prompts on (and after asynchronous output), CR LF line ends, login: and password: prompts. The adapter must decide per session, and the login style tells it which: a two-step login: / password: login means telnet mode with prompts, connect name pw means no prompts (see bg-client-macfibs.md).

(a) Sources

(b) Connection

Itemxfibs 0.8xibc 0.31Connect_FIBS
TransportBSD socket, connect(). Optional SOCKS Rconnect [S1]spawn telnet <host> 4321 under Expect [S2]AmigaDOS telnet fibs.com 4321 [S3]
Host / port.xfibsrc keywords Host and Port. Default host fraggel65.mdstud.chalmers.se (config.h). Port 4321 in the sample rc file [S1]hard-coded in proc connecthard-coded
Client line end\r\n for every command, login name and password [S1]\n (telnet client adds its own line ending; Unix telnet sends CR LF or CR NUL in NVT mode, UNVERIFIED which) [S2]terminal
Server line endlines split only at \r\n [S1]every pattern ends in \r\n [S2]terminal
Telnet optionsnone handled. A raw IAC byte would end up in the text [S1]handled by the Unix telnet program [S2]handled by the Amiga telnet program

(c) Login

xfibs [S1]: on a line starting login: it sends the configured user name plus \r\n. On a line starting password: (only 6 characters compared, passwo) it sends the password plus \r\n. Without a configured name the user types it. The client counts as logged in at the first input that ends in > . It then queues the on_login commands from .xfibsrc (none by default; users add set boardstyle 3 there, as backgammon-network.md [S7] notes). Prompts before login can arrive without CR LF; login: is matched on the partial buffer.

xibc [S2]: expect loop with ^login: $ (exact, trailing space, nothing after it), ^password:, server lines (...)\r\n, and ^> as the logged-in marker. After the first > it sends set boardstyle 3. Guests register by hand ("Login as "guest" if you are new").

(d) Messages parsed

xfibs (parseInput, callbacks.c) [S1]. Each line first has a leading > removed, then:

PatternMatchEffect
line ends in > suffixprompt: logged in, ready to send queued commands. If the line also contains away, away mode
board:prefix, the line needs at least 52 colonsboard update. A shorter one is held until the rest arrives
login: / password:prefixlogin (above)
Welcome backprefix, case-insensitiveaway mode off
<name> roll(s) <d1> <d2>sscanf("%s%s%i%s%i") = 5 fields, word 2 rolls or rolldice
<name> rolled <d1>, <name2> rolled <d2>sscanf 7 fields, word 2 rolledopening roll (You rolled 6, bob rolled 2)
Please move <n>first two words, then a numbermoves to make
It's your turn to moveprefix, case-insensitivetwo moves (opening)
contains double. Please wait or doubles. Typesubstringdouble offered (name = first word)
contains gives up.substringdouble rejected
contains accept the double / accepts the doublesubstringdouble accepted
contains wants to resignsubstringresign offer dialog
contains has joined you, or prefix You're now watchingclient sends board
It's your turn.prefix, case-insensitiveroll / double popup
Type 'join' if you wantprefixnext-game popup (join then board)
Type 'join <name>' ...words 1-3invitation: remembers <name>. The popup sends join <name> and board
<name> shouts:word 2gag-list filter only

Commands sent [S1]: move <a>-<b> <c>-<d> ... (bar moves first; bar-, -off spelled out, e.g. move bar-22 13-11), roll, double, accept, reject, join [name], leave, board, bye, and anything from the configurable menus (default .xfibsrc: who ready, show games, show watchers, show saved, ratings, toggle ready|double|silent|notify|report|greedy).

xibc (proc parse, main) [S2]. $NAME is [a-zA-Z_<>]+, $DIGIT is [0-9]. All patterns are anchored at line start. Most require a terminating \r\n:

^\a### ATTENTION ### The server will shut down in 1 minute\.\r\n
^Starting a new game with NAME\.\r\n
^(It's your turn\. Please roll or double)\.?\r\n      (client auto-sends "r" when Autoroll is on)
^It's your turn to move\.\r\n
^It's your turn to roll or double\.\r\n
^NAME makes the first move\.\r\n
^(You are now playing with NAME\.)<space>
^(NAME has joined you\.)<space>
^(Your running match was loaded.)\r\n                  (client sends "b")
^((NAME) and (NAME) are resuming their ...)\r\n        (sends "b" if watching one of them)
^(NAME wins? the D+ point match D+-D+ \.)\r\n          (note the space before the final '.')
^(\*\* Please don't give more than ...)\r\n
^(\*\* You have to remove pieces from the bar in your first move\.)\r\n
^(\*\* You can't move ...)\r\n
^You're now watching (NAME).                           (sends "b")
^(NAME wants to resign\. You will win D+ points?\. Type 'accept' or 'reject'\.)\r\n
^(You reject\. The game continues\.)\r\n
^Type 'join' if you want to play the next game, type 'leave' if you don't\.\r\n
^(NAME) doubles?\.
^((NAME) accepts? the double.)
^ The cube shows (D+)\.\r\n                             (the rest of the accept line, leading space)
^The only possible move is (...) \.
^(NAME) moves ([^.]+) \.? ?\r\n                         (opponent's move list, e.g. "bob moves 1-5 12-16 .")
^(NAME can't move.)\r\n
^board:(...)\r\n
^You roll (D) and (D)\.\r\n
^Please move (D) pieces?\.\r\n
^(NAME) rolls (D) and (D)\.\r\n
^> 
^\r\n
^(...)\r\n                                              (anything else: shown as text)

Two details matter for the adapter. X accepts the double. The cube shows 2. must be one line: xibc consumes the first part, then expects The cube shows N. (leading space) as the remainder. And X moves 13-7 8-7 . keeps FIBS's space before the final full stop [S2].

Commands sent by xibc [S2]: r / roll, double, b (board), accept, reject, join, leave, toggle ready|automove|double, set boardstyle 3, moves composed by proc move, plus the typed command line.

(e) What the server must produce (telnet mode)

S: login:                                     (prompt, no newline; xibc needs exactly "login: ")
C: alice
S: password:                                  (lower case, trailing space, as for FIBS/W)
C: secret1
S: <welcome lines>\r\n
S: >                                          (prompt; xfibs/xibc now consider the session up)
C: set boardstyle 3
S: Value of 'boardstyle' set to 3.\r\n        (FIBS/W needs "Value of"; see bg-client-fibsw.md)
S: >
...
S: bob rolls 5 and 4.\r\n
S: board:You:bob:...\r\n
S: bob moves 1-5 12-16 .\r\n
S: board:You:bob:...\r\n
S: It's your turn. Please roll or double\r\n
S: >                                          (xfibs parses the whole burst only now)

Rules for the adapter's telnet mode, from the code above [S1][S2]:

  1. End every line with CR LF.
  2. Send > (no newline) after the response to every command and after every asynchronous burst (opponent's actions, invitations, chat).
  3. Use FIBS's exact wording and spacing for the lines in section d.
  4. Keep the board: line whole on one line (xfibs waits for 52 colons, xibc for CR LF).

(f) Unverified items

  1. Whether FIBS really emitted a new > after asynchronous output in 1994-95. xfibs's buffering only works if it did, so it very probably did.
  2. TkFibs: not found, so its expectations are unknown.
  3. The exact text of Value of ... replies to set (FIBS/W needs only the substring).
  4. xibc's move-command spelling (proc move builds it; not traced further). FIBS accepts several spellings (backgammon-network.md section b), and the adapter should too.

(g) Feasibility verdict

Yes, the FIBS adapter's telnet mode covers them. xfibs needs only a Host/Port line in ~/.xfibsrc. xibc needs one edited line in its script, or an equivalent wrapper. Connect_FIBS needs its one line edited. None needs ParlorNet-specific code beyond prompt discipline (section e). Telnet-mode sessions (two-step login) get prompts. connect-style sessions (MacFIBS) get none.

Addendum, 2026-11-22: building xfibs, and more Unix FIBS clients

From docs/research/x11-clients.md (sources there):

This doc on GitHub


 These pages cover every ParlorNet server. | Source code | ParlorNet is free software.