Skip to content

Waiting For Caller (WFC)

The wfc.js module provides a Waiting For Caller (WFC) type dashboard from a bygone era. Many traditional features are available including newer concepts for modern times. Node spy is left out as it feels like something that should be left in the past.

WFC

By default, the WFC may be accessed via the !WFC main menu command when connected over a secure connection via a user with the proper ACS. This can be configured as per any other menu in the system. Note that ENiGMA½ does not expose the WFC as a standalone application as this would be much less flexible. To connect locally, simply use your favorite terminal or for example: ssh -l yourname localhost 8889. See Security below for more information.

The system allows any user with the proper security to access the WFC / system operator functionality. The security policy is enforced by ACS with the default of SCAF2ID1GM[wfc], meaning the following are true:

  1. Securely Connected (such as SSH or Secure WebSocket, but not Telnet)
  2. Auth Factor 2+. That is, the user has 2FA enabled.
  3. User ID of 1 (root/admin)
  4. The user belongs to the wfc group.

Adding your user to the wfc group:

Terminal window
# Replace USERNAME with your leet +op username
./oputil.js user group USERNAME "+wfc"

To change the ACS required, specify an alternative acs in the config block. For example:

mainMenuWaitingForCaller: {
config: {
// initial +op over secure connection only
acs: ID1SC
}
}

The WFC config block allows for the following keys:

KeyRequiredDescription
acsYesSee Security above.
opVisibilityNoVisibility on entering the WFC: visible, hidden, or current (default, leave as-is). true/false are accepted as aliases for visible/hidden.
quickLogLevelNoSets the log level for the quick log view. Defaults to info. See also Monitoring Logs.
artYesAn object containing art specs: main for the WFC main view and help for a help screen.
confirmKickNodePromptNoOverride the prompt name used for the “Kick selected node?” prompt. Defaults to confirmKickNodePrompt.
pageIndicatorNoString shown in the node list for nodes with a pending sysop chat page. Defaults to !.
chatMenuNameNoOverride the menu name used for sysop chat. Defaults to sysopChat.
nodeMessageMenuNameNoMenu used by S (send) and R (reply). Defaults to wfcNodeMessage, the +op-side copy of nodeMessage — separate so the sysop path can be themed without changing what users see.
notificationsNoWhere each kind of notification goes while you are at the WFC. See Notifications below.
inboxMaxItemsNoHow many messages the inbox holds before evicting. Read items are evicted before unread. Defaults to 50.
messageAlertNoBoolean. Send a BEL when a message arrives. Defaults to true.
messagePreviewLengthNoMax length of {pendingNodeMessagePreview}. Defaults to 40.
messageListFormatNoFormat for each row of the message list. Tokens below.
messageDetailFormatNoFormat for the detail pane. Defaults to {text}.
noMessagesTextNoShown when the inbox is empty.
statusBarMessagesFormatNo%SB5 messages panel. Token: {count}. Defaults to MSG {count}.
statusBarPagesFormatNo%SB5 pages panel. Token: {count}. Defaults to PAGE {count}.
tickerNoActivity marquee config. See Activity Ticker below.
hideCursorNoBoolean. Hide the terminal cursor while on the dashboard, which otherwise parks wherever the last refresh finished drawing. Defaults to true.

An +op sitting at the WFC is a node like any other, so achievements, node messages and time warnings are all aimed at their terminal. Painting any of those over the dashboard would corrupt it, so each kind is routed instead of displayed.

Routing is per notification type, and each type names zero or more sinks:

SinkEffect
inboxHeld for you to read with the message key. Sends a BEL unless messageAlert is false.
statusBarSurfaces as a count in a %SB5 panel.
logRely on the log and surface nothing further here. Achievements are logged by the achievement subsystem for every op, not only one sitting at the WFC, so this sink means “it is already in the quick log and full log viewers”.
tickerFed to a %TK ticker.
interruptFall through to normal behaviour — displayed full screen with a pause.

Defaults:

TypeDefault sinksWhy
nodeMsginbox, statusBarRead them when you choose to.
achievementlogDecorative; the log already shows it.
achievementGloballogAs above — a busy board earns a lot of these.
sysopPage(none)Already surfaced via {pendingPage*} and the node list indicator.
timeWarning(none)Sysops are typically unlimited.
systeminterruptAnything untagged behaves exactly as before.

Override in the WFC config block:

notifications: {
nodeMsg: {
sinks: [
inbox
statusBar
]
}
achievementGlobal: {
sinks: [
ticker
]
}
}

Add a %TK6 ticker to the WFC art and it becomes a board activity marquee, fed from the same system events that drive each user’s log.

ticker: {
// 'cycle' advances when the ticker finishes a pass, so a message is
// never cut off. A number of milliseconds uses a timer instead.
rotateOn: "cycle"
maxItems: 10
idleText: "{boardName} - {totalCalls} calls, {callsToday} today"
events: {
userLogin: "|15{userName}|07 logged in on node |15{nodeId}|07"
userAchievementEarned: "|15{userName}|07 earned |14{title}|07 (+{points})"
userUpload: "|15{userName}|07 uploaded |15{fileCount}|07 file(s)"
}
}

Available event keys: userLogin, userLogoff, userUpload, userDownload, userPostMessage, userSendMail, userRunDoor, userSendNodeMsg, userAchievementEarned. An event with no format string is not shown, so the noisier ones are opt-in. The three above are shown by default.

Format tokens: {userName}, {realName}, {nodeId}, {title}, {points}, {achievementTag}, {areaTag}, {doorTag}, {fileCount}, {minutesOnline}, {boardName}. idleText is formatted against the same custom MCI values as the rest of the dashboard.

Routing a notification type to the ticker sink puts it on the marquee too.

With the default key bindings:

KeyAction
MOpen the message viewer
SSend a node message to the node selected in VM1. Selecting your own node sends to -ALL-.

Inside the viewer: R replies to the sender, D or DEL dismisses, ESC/Q returns to the dashboard.

Both S and R go to wfcNodeMessage rather than the user-facing nodeMessage. It is the same module and form, shipping with the same art, but as its own menu entry you can retheme or reconfigure it without affecting the msg command users see. Override with nodeMessageMenuName.

The viewer uses the messages art spec with %VM1 (list) and %MT2 (detail). If that art is missing, a plain text list is shown instead, so the feature works before a theme provides art.

Message list and detail format tokens: {index}, {id}, {userName}, {realName}, {nodeId}, {type}, {read}, {timestamp}, {text}.

The following MCI codes are available:

  • VM1: Node status list with the following format items available:
    • text: Username or *Pre Auth*.
    • action: Current action/menu.
    • affils: Any affiliations for the authenticated user, else “N/A”.
    • authenticated: Boolean whether the node is authenticated (logged in) or not.
    • availIndicator: Availability indicator. Displayed via statusAvailableIndicators or system theme. See also Themes.
    • isAvailable: Boolean whether the node is available (e.g. for messaging) or not.
    • isSecure: Is the node securely connected (e.g. SSL/SSH)?
    • isVisible: Boolean whether the node is visible to others or not.
    • node: The node ID.
    • pageIndicator: Non-empty when the node has a pending sysop chat page. Defaults to !. Override with pageIndicator in the WFC config block.
    • realName: Real name of authenticated user, or “N/A”.
    • remoteAddress: A friendly formatted remote address such as an IPv4 or IPv6 address.
    • serverName: Name of connected server such as “Telnet” or “SSH”.
    • timeOn: How long the node has been connected.
    • timeOnMinutes: How long in minutes the node has been connected.
    • userId: User ID of authenticated node, or 0 if not yet authenticated.
    • userName: User name of authenticated user or *Pre Auth*.
    • visIndicator: Visibility indicator. Displayed via statusVisibleIndicators or system theme. See also Themes.
  • VM2: Quick log with the following format keys available:
    • timestamp: Log entry timestamp in quickLogTimestampFormat format.
    • level: Log entry level from Bunyan.
    • levelIndicator: Level indicators can be overridden with the quickLogLevelIndicators key (see defaults below).
    • quickLogLevelIndicators: A map defaulting to the following:
      • trace: T
      • debug: D
      • info: I
      • warn: W
      • error: E
      • fatal: F
    • nodeId: Node ID.
    • sessionId: Session ID.
    • quickLogLevelMessagePrefixes: A map of log level names (see above) to message prefixes. Commonly used for changing message color with pipe codes, such as |04 for red errors.
    • message: Log message.
  • MT3 or ET3: Selected node status information. May be a single or multi-line view.
    • Set nodeStatusSelectionFormat to the format desired, using \n for line feeds in an MT view. The available format keys are the same as the node status list above.
  • SB5: Optional status bar. Named panels messages and pages are driven from code; format them with statusBarMessagesFormat / statusBarPagesFormat. See Status Bar View.
  • MCI 10…99: Custom entries with the following format keys available:
    • nowDate: Current date in the dateFormat style, defaulting to short.
    • nowTime: Current time in the timeFormat style, defaulting to short.
    • now: Current date and/or time in nowDateTimeFormat format.
    • processUptimeSeconds: Process (the BBS) uptime in seconds.
    • totalCalls: Total calls to the system.
    • totalPosts: Total posts to the system.
    • totalUsers: Total users on the system.
    • totalFiles: Total number of files on the system.
    • totalFileBytes: Total size in bytes of the file base.
    • callsToday: Number of calls today.
    • postsToday: Number of posts today.
    • uploadsToday: Number of uploads today.
    • uploadBytesToday: Total size in bytes of uploads today.
    • downloadsToday: Number of downloads today.
    • downloadBytesToday: Total size in bytes of downloads today.
    • newUsersToday: Number of new users today.
    • currentUserName: Current user name.
    • currentUserRealName: Current user’s real name.
    • lastLoginUserName: Last login username.
    • lastLoginRealName: Last login user’s real name.
    • lastLoginDate: Last login date in dateFormat format.
    • lastLoginTime: Last login time in timeFormat format.
    • lastLogin: Last login date/time.
    • totalMemoryBytes: Total system memory in bytes.
    • freeMemoryBytes: Free system memory in bytes.
    • systemAvgLoad: System average load.
    • systemCurrentLoad: System current load.
    • newPrivateMail: Number of new private mail for current user.
    • newMessagesAddrTo: Number of new messages addressed to the current user.
    • availIndicator: Is the current user available? Displayed via statusAvailableIndicators or system theme. See also Themes.
    • visIndicator: Is the current user visible? Displayed via statusVisibleIndicators or system theme. See also Themes.
    • processBytesIngress: Ingress bytes since ENiGMA started.
    • processBytesEgress: Egress bytes since ENiGMA started.
    • pendingPageCount: Number of pending sysop chat pages across all nodes.
    • pendingPageUser: Username of the most recent pending page, or empty.
    • pendingPageNode: Node ID of the most recent pending page, or empty.
    • pendingPageMessage: Message/reason of the most recent pending page, or empty.
    • pendingNodeMessageCount: Number of unread messages in the inbox.
    • pendingNodeMessageTotal: Total messages in the inbox, read or not.
    • pendingNodeMessageUser: Username who sent the most recent unread message, or empty.
    • pendingNodeMessageNode: Node ID of that sender, or empty.
    • pendingNodeMessagePreview: Truncated text of that message. Length via messagePreviewLength.

The WFC supports receiving pages from users and initiating chat with any connected node.

When a user pages the sysop:

  1. An alert is sent according to sysopChat.pageAlert in config.hjson — bel (default, sends \x07 to sysop terminals), none (silent), or command (runs a shell command).
  2. Sysops not at the WFC receive an interrupt notification with the user’s name, node, and message.
  3. Sysops at the WFC see the page reflected immediately via pendingPageCount, pendingPageUser, pendingPageNode, and pendingPageMessage custom tokens, plus a pageIndicator on the paging node’s row in VM1. No duplicate interrupt is queued for them.

With a node selected in VM1, press B to break into chat. If the selected node has a pending page, that session is accepted; otherwise a new sysop-initiated session is created. Both parties enter the sysopChat menu directly — no pre-chat confirmation is shown to the user.

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''Shell command run when pageAlert is command. Tokens: {userName}, {nodeId}, {message}. Example: 'notify-send "Page from {userName}" "{message}"'
Sponsor
SponsoredKunjungi sekarang
Promo