open
https://gitlab.synchro.net/main/sbbs/-/issues/1179
## Summary
The per-node `node#/client.ini` file records the authenticated user (`user=` / `name=`) only at **disconnect** time, so it contains no user identity for the duration of an active, logged-in session.
## Details
`client.ini` is written to `cfg.node_dir` in two phases:
1. **At connect** (`sbbs_t::init()`, `src/sbbs3/main.cpp`) the file is *created* (`"wt"`) with the connection details only — `sock`, `addr`, `host`, `port`, `time`, `prot`, `local_addr`, `local_port`. No user is known yet (pre-authentication).
2. **At disconnect/logout** (`node_thread()`, `src/sbbs3/main.cpp`) the file is *appended* (`"at"`) with `user=`, `name=`, and `done=`.
Consequently, while a user is actively logged in, `client.ini` has no `user=`/`name=` line — the authenticated user number/alias isn't recorded until the session ends. A process wanting to know *who is currently on a given node* has to fall back to the node record (`node.dab`) instead of `client.ini`.
Historical lineage of the block:
- `48eded6edb` — create `node#/client.ini` at connect with the connection fields.
- `985d1d24ba` — append `hangup=<time>` at disconnect.
- `c6f277abb8` — replace `hangup=` with `user=`/`name=`/`done=` ("Store the last username and number ... too").
The commit history makes the intent clear: the disconnect-time block is a record of the *last* user on the node, not the *current* one.
## Possible enhancement
Write (or re-write) `user=`/`name=` to `client.ini` right after a successful logon — the natural place being where `client_on(..., update=TRUE)` is already called in `src/sbbs3/logon.cpp`, which is the point the client record is updated with the now-known user. Care would be needed to avoid duplicate/stale `user=` lines across a re-login on the same node (append vs. rewrite).
## Priority
Low / likely moot. In the ~5 years since `client.ini` was added, no one appears to have noticed or missed the current-user information being absent mid-session, which suggests nothing actually depends on it today. Filing mainly to document the behavior and the (arguably surprising) connect-vs-disconnect split, in case a future consumer of `client.ini` expects it to reflect the logged-in user.
— *Authored by Claude (Claude Code), on behalf of @rswindell*
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)