Logon List
The Logon List module (exec/logonlist.js
) is responsible for displaying and maintaining the list of BBS logons. It uses the logonlist_lib.js
library to store/retrieve logon information in JSON Lines (.jsonl
) format.
Format
The new data/logon.jsonl
file replaces the functionality of the old (but still supported/maintained) data/logon.lst
file.
The advantages of the new format include:
- Standard file format
- Easily parse-able by scripts/programs (especially JS)
- Supports non-terminal protocol logons (e.g. HTTP/HTTPS)
- No display-style (e.g. colors) embedded in the file
Note:
While the LastFewCallersFmt
line in the ctrl/text.dat
file is still used to generate the legacy logon.lst
file, the modopts.ini
file is used to customize the format/color used to display the new logon.jsonl
file by logonlist.js
. See below for details.
Files
- The current day's logons are stored in
data/logon.jsonl
- Yesterday's logons are stored in
data/logon.0.jsonl
- The logons from 2-days ago are stored in
data/logon.1.jsonl
- etc...
The logon list files are normally maintained/rotated daily via an invocation of “?logonlist -m” (e.g. in SCFG->External Programs->Fixed Events->Daily Event).
Install
This module (logonlist
) should be the default value of SCFG->System->Loadable Modules->List Logons.
If a sysop needs to install this module, it can be installed with the command-line jsexec logonlist install
.
Invoke
The default behavior of the Logon List module (when no command-line options are provided) is to display all user logons that have been logged so far today, in the order in which they were logged (normally, by the Logon Module).
The Logon List module supports the following command-line options:
Option | Description |
---|---|
-l [count] | Display only the “last few” logons (callers), possibly over multiple days |
-y | Display all logons that occurred yesterday |
days | Display all logons from the specified number of days ago |
-m | Maintain the Logon List files, must be executed daily, e.g. via “System Daily Event” or Timed Event |
Configure
The Logon List module supports the following options in the [logonlist]
section of the ctrl/modopts.ini
file:
Option | Default | Description |
---|---|---|
last_few_callers | 4 | Number of logons to display when only displaying the “last few” (not the entire list) |
last_few_callers_msg | (see source) | The string to announce the “Last few callers” list |
last_few_callers_fmt | (see source) | The printf-style format string for each displayed Logon List entry/line |
first_caller_msg | (see source) | The string to announce that the current logon is the first of the day |
logons_header_fmt | (see source) | The printf-style format string announcing the logon list |
nobody_logged_on_fmt | (see source) | The printf-style format string stating that nobody has logged-on that day |
backup_level | 10 | Number of previous logon list files to retain |
today | “Today” | The word displayed to represent the current day |
yesterday | “Yesterday | The word displayed to represent the day before the current day |
time_fmt | ”%H:%M“ | The strftime format of the logon date/time to be displayed |