Skip to content

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 flow
  • sysop_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.


The pageSysop menu entry drives the user side:

  1. Rate limited? — The user sees rate-limit art (PAGESYPLM) or fallback text and returns to the previous menu.
  2. 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.
  3. On a successful page: a session is created, all online sysops are alerted (per pageAlert config), 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.


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.


Both parties use the same sysopChat menu entry. The role (sysop or user) is passed via extraArgs.role.

Art file: SYSOPCHAT

MCIRoleDescription
%MT1BothSysop’s scrollback panel (top)
%ET2SysopSysop’s input line
%MT3BothUser’s scrollback panel (bottom)
%ET4UserUser’s input line
%TL10+BothCustom 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.


SpecModuleDescriptionKey MCI
PAGESYSPpage_sysopMain page form — user types optional reason%ET1 (message), %TL10+
PAGESYSPOKpage_sysop“Your page has been sent” confirmationnone required
PAGESYPNApage_sysopSysop not available — combined with “send as mail?” Y/N%TM1 (Y/N confirm)
PAGESYPLMpage_sysopRate limit art (optional — fallback text used if missing)none required
SYSOPCHATsysop_chatSplit-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)”
KeyDefaultDescription
pageCooldownMinutes5Minimum minutes a user must wait between pages.
pageAlertbelAlert 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.

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 leading VAR=value, or a line break. The command is then not run, and an error naming sysopChat.pageAlertCommand is logged once.

The page’s details are passed to the program in environment variables:

VariableValue
ENIG_PAGE_USERNAMEThe paging user’s name
ENIG_PAGE_MESSAGEThe page message (may be empty)
ENIG_PAGE_NODEThe paging user’s node number
ENIG_PAGE_SESSIONThe 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 them
notify-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 '...' (or bash -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, cmd and others), so taskset -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 formats tmux and screen expand 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.


KeyDefaultDescription
notifyFormatpipe-colored textInterrupt text sent to non-WFC sysops. Tokens: {userName}, {nodeId}, {message}, {sessionId}
pageSentArtPAGESYSPOKArt shown after a successful page
notAvailableArtPAGESYPNAArt shown when sysop unavailable (must contain %TM1)
rateLimitArtPAGESYPLMArt shown when rate-limited (optional; fallback text used if missing)
rateLimitTextpipe-colored stringFallback text if rateLimitArt is missing
mailSubjectPage from {userName}Subject for the “send as mail” path. Token: {userName}
sysopUserNameroot user’s usernameName 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
mailMenuNameprivateMailMenuCreateMessageMenu navigated to for the mail compose path

KeyDefaultDescription
chatEndedText|08[ Chat session ended ]|07Message 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}

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}.


  • Pre-Auth Feedback — allow unauthenticated visitors to send mail to the sysop directly from the login matrix.