Files
bbs/internal/server/aolconfig.go
T
Claude e75f4ea03d AOL host: AOL clients sign on with BBS accounts
internal/aol serves AOL's own clients over P3: each token the client
sends is handled, and the host answers with atom streams compiled from
FDO91 source.

- Dd, the Welcome form's screen name and password (its two de_data),
  is a BBS login (Authenticate, throttled and logged as any); the client
  becomes a node, is taken online (async_online, its main window 32-296)
  and shown the BBS's Welcome window.  A failed one gets an alert and
  async_force_off; "New User" is told to join by telnet or the web.
- pE (Sign Off) is answered with XS, the host's sign-off.
- Other tokens are answered with uni_wait_off, so the client doesn't
  wait on them, and are logged; before sign-on they're ignored.
- Streams go as aT in one packet, or at pieces with one 4-byte id when
  long; a stream the client spreads over packets (4.0) is put together.

[aol] turns it on, at :5190 by default.  When [oscar] listens there too
the two share the port: OSCAR hands over connections that begin as P3.

Tested with a scripted client (sign-on, refusals, sign-off, long
streams both ways) and through OSCAR's port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRm1WrfJdB863kw36V
2026-11-09 01:00:22 +00:00

37 lines
778 B
Go

package server
import (
"fmt"
"net"
"github.com/D-Modem/bbs/internal/aol"
"github.com/D-Modem/bbs/internal/config"
)
// aolSection reads [aol]: the host for AOL's own clients.
func (c *Config) aolSection(cf *config.File) error {
s := cf.Get("aol", "")
if s == nil {
return nil
}
err := func() error {
a := &aol.Settings{Address: s.String("address", ":5190")}
if _, _, err := net.SplitHostPort(a.Address); err != nil {
return fmt.Errorf("address: %v", err)
}
var err error
if a.MaxClients, err = s.Int("max_clients", 256, 1, 100000); err != nil {
return err
}
if a.MaxPerIP, err = s.Int("max_per_ip", 4, 0, 1000); err != nil {
return err
}
c.AOL = a
return nil
}()
if err != nil {
return fmt.Errorf("[aol] %w", err)
}
return nil
}