Sysop Chat
ENiGMA½ provides a two-way split-screen chat system between the sysop and any connected user. It is composed of two modules that work together:
page_sysop— user-facing page flowsysop_chat— split-screen chat screen used by both parties
The sysop can also break into chat with any node directly from the WFC without waiting for a page.
User Flow (Paging the Sysop)
Section titled “User Flow (Paging the Sysop)”The pageSysop menu entry drives the user side:
- Rate limited? — The user sees rate-limit art (
PAGESYPLM) or fallback text and returns to the previous menu. - Sysop available?
- No — The user sees the “not available” art (
PAGESYPNA) with a Y/N prompt offering to send their message as private mail addressed to the sysop instead. - Yes — The user sees the main page art (
PAGESYSP) with an optional text input for a reason/message, then submits.
- No — The user sees the “not available” art (
- On a successful page: a session is created, all online sysops are alerted (per
pageAlertconfig), and the user sees the confirmation art (PAGESYSPOK).
Sysops at the WFC are not sent an interrupt — they see the page reflected immediately in the node list (pageIndicator) and in the pending page tokens. Sysops not at the WFC receive an interrupt notification with the user’s name, node, and message.
Sysop Flow (WFC)
Section titled “Sysop Flow (WFC)”With a node selected in VM1, press B to break into chat:
- If that node has a pending page, the existing session is accepted.
- If there is no pending page, a new sysop-initiated session is created.
Both parties enter the sysopChat menu directly — no pre-chat confirmation is shown to the user.
Chat Screen (sysopChat module)
Section titled “Chat Screen (sysopChat module)”Both parties use the same sysopChat menu entry. The role (sysop or user) is passed via extraArgs.role.
Art file: SYSOPCHAT
| MCI | Role | Description |
|---|---|---|
%MT1 | Both | Sysop’s scrollback panel (top) |
%ET2 | Sysop | Sysop’s input line |
%MT3 | Both | User’s scrollback panel (bottom) |
%ET4 | User | User’s input line |
%TL10+ | Both | Custom status tokens (see chatInfoFormat10 etc.) |
Messages from either party appear in the sender’s panel on both screens.
ESC ends the chat. The party that exits notifies the partner, who sees a brief “chat ended” message then exits automatically after a short delay.
Art Files
Section titled “Art Files”| Spec | Module | Description | Key MCI |
|---|---|---|---|
PAGESYSP | page_sysop | Main page form — user types optional reason | %ET1 (message), %TL10+ |
PAGESYSPOK | page_sysop | “Your page has been sent” confirmation | none required |
PAGESYPNA | page_sysop | Sysop not available — combined with “send as mail?” Y/N | %TM1 (Y/N confirm) |
PAGESYPLM | page_sysop | Rate limit art (optional — fallback text used if missing) | none required |
SYSOPCHAT | sysop_chat | Split-screen chat layout — drives panel geometry | %MT1, %ET2, %MT3, %ET4, %TL10+ |
System Config (sysopChat block in config.hjson)
Section titled “System Config (sysopChat block in config.hjson)”| Key | Default | Description |
|---|---|---|
pageCooldownMinutes | 5 | Minimum minutes a user must wait between pages. |
pageAlert | bel | Alert mode on page arrival: bel (sends \x07 to sysop terminals), none (silent), or command (runs pageAlertCommand). |
pageAlertCommand | '' | Program (and arguments) run when pageAlert is command. Not run through a shell. See Page Alert Command. |
Page Alert Command
Section titled “Page Alert Command”With pageAlert: command, each page runs pageAlertCommand on the BBS machine. There is no shell. The value is split into a program and its arguments, and the program is run directly:
- Blanks separate arguments.
'...'is literal;"..."groups, with\"and\\as its only escapes. Outside quotes a backslash escapes the next character, except on Windows, where it is an ordinary path separator. - Shell syntax is refused: an unquoted
|,&,;,<,>,(,),~,*,?or[, a`or$anywhere outside single quotes, a leadingVAR=value, or a line break. The command is then not run, and an error namingsysopChat.pageAlertCommandis logged once.
The page’s details are passed to the program in environment variables:
| Variable | Value |
|---|---|
ENIG_PAGE_USERNAME | The paging user’s name |
ENIG_PAGE_MESSAGE | The page message (may be empty) |
ENIG_PAGE_NODE | The paging user’s node number |
ENIG_PAGE_SESSION | The chat session ID the page created |
The recommended form is a small script that reads them:
sysopChat: { pageAlert: command pageAlertCommand: '/path/to/page-alert.sh'}#!/bin/sh# page-alert.sh: keep the variables in double quotes; never eval themnotify-send -- "Page from $ENIG_PAGE_USERNAME (node $ENIG_PAGE_NODE)" "$ENIG_PAGE_MESSAGE"Make the script executable (chmod +x) and name it directly, rather than as an argument to sh, python and the like.
Tokens can also be put in arguments: {userName}, {nodeId} and {message}. Each is substituted into its own argument, after splitting, so a value can never add or split arguments:
pageAlertCommand: 'notify-send -- "Page from {userName}" "{message}"'A few rules apply to tokens:
- A token cannot be the program.
- Never put tokens inside
sh -c '...'(orbash -c,python -c, …): that shell would parse the user’s text as code. A command containing tokens is refused when the program, or any other argument without a token, names a shell, interpreter or wrapper (sh,bash,env,sudo,script,watch,python,perl,node,tmux,screen,powershell,cmdand others), sotaskset -c 0 sh -c "..."is refused too. Use the environment variables instead. - When an argument starts with a token, leading
-are removed from the value (on Windows leading/too), so a message cannot turn into an option.--before the arguments, as above, is still a good habit. - Line breaks and other control characters in the values become spaces, and the message is at most 256 characters.
- For free text this is best effort: a program can still give an argument a special meaning of its own, such as curl’s
-d @file, or the formatstmuxandscreenexpand in their messages (tmux runs#(...)as a command). Prefer the script form.
On Windows, use an .exe, or a PowerShell script reading $env:ENIG_PAGE_MESSAGE and friends, for example pageAlertCommand: 'powershell -NoProfile -File C:\\enigma\\page-alert.ps1' (the \\ is HJSON string escaping inside quotes). .bat and .cmd files are refused: they cannot be run without cmd.exe, whose parsing is unsafe for user text. Non-ASCII characters in token values are passed as ? there; the environment variables keep them.
Only one alert command runs at a time: a page arriving while the previous command is still running does not start another. A command is stopped after 30 seconds, and its standard input is closed. If the command starts something in the background, redirect that process’s output (e.g. >/dev/null 2>&1) rather than leave it holding the command’s standard output or error.
pageSysop Menu Config Keys
Section titled “pageSysop Menu Config Keys”| Key | Default | Description |
|---|---|---|
notifyFormat | pipe-colored text | Interrupt text sent to non-WFC sysops. Tokens: {userName}, {nodeId}, {message}, {sessionId} |
pageSentArt | PAGESYSPOK | Art shown after a successful page |
notAvailableArt | PAGESYPNA | Art shown when sysop unavailable (must contain %TM1) |
rateLimitArt | PAGESYPLM | Art shown when rate-limited (optional; fallback text used if missing) |
rateLimitText | pipe-colored string | Fallback text if rateLimitArt is missing |
mailSubject | Page from {userName} | Subject for the “send as mail” path. Token: {userName} |
sysopUserName | root user’s username | Name shown as the mail’s To. The mail always goes to the root user (user 1); falls back to Sysop if that user’s name cannot be read |
mailMenuName | privateMailMenuCreateMessage | Menu navigated to for the mail compose path |
sysopChat Menu Config Keys
Section titled “sysopChat Menu Config Keys”| Key | Default | Description |
|---|---|---|
chatEndedText | |08[ Chat session ended ]|07 | Message shown in the sysop panel when the partner ends the chat |
messageFormat | |15{userName}|07: {message} | Format for each sent message line. Tokens: {userName}, {message} |
chatInfoFormat10+ | — | Custom-range status token format (standard ENiGMA pattern). Tokens: {partnerName}, {duration}, {userName}, {userNode} |
Theming
Section titled “Theming”prefixFormat (per-view in theme.hjson)
Section titled “prefixFormat (per-view in theme.hjson)”Set prefixFormat on ET2 or ET4 in the sysopChat MCI theme block to display a role-specific label before the input line. Pipe codes are supported in the prefix, and the input line takes the width the rendered prefix draws (a || counts as the one pipe it shows). Colour codes typed into the input line (|00 to |99) render live as the user types; see In Edit Fields.
sysopChat: { 0: { ET2: { prefixFormat: "|11{userName} |14> " } ET4: { prefixFormat: "|11{userName} |14> " } }}Token available: {userName}.
See Also
Section titled “See Also”- Pre-Auth Feedback — allow unauthenticated visitors to send mail to the sysop directly from the login matrix.