Table of Contents
Message Variables (@-codes)
Synchronet sysop-posted messages, text and menu files, and some lines in the ctrl/text.dat file may contain special Message Variables, also called @-codes (“at codes”, some BBS authors and sysops refer to these types of codes as “@ Macros” or “@ Variables” or “MCI codes”1)). @-codes may also be displayed using the bbs.atcode() JavaScript method.
@-codes are called such because they begin and end with the @ (ASCII 64) (“at”) character. The code names themselves (sandwiched between the @'s) must be entered using only UPPERCASE letters2). Some additional symbols and numbers may also be included in the @-code, but never a space.
Some of the @-codes supported in Synchronet have unusual names or aliases specifically for PCBoard and/or Wildcat! BBS Software compatibility. Although this compatibility with these other BBS packages is less of a concern these days, the unusual code names remain.
Synchronet also, optionally, supports some Color Codes which begin and/or end with the @ character (again, specifically for PCBoard and/or Wildcat! BBS Software compatibility). These PCBoard and Wildcat! color codes are not usually referred to as @-codes and do not fall under the usage/formatting guidelines given on this page.
Messages
@-codes contained in the text of messages sent as email or posted on sub-boards will not be expanded to the equivalent text unless the message was sent or posted locally by user #1 (the sysop).
If using smbutil to import a message with embedded @-codes, use the -e1 option to specify that the message is being sent from the local sysop (user #1) to enable expansion of the @-codes when the message is viewed by users.
Formatting
By default, @-codes are expanded to just the number of characters necessary to display the dynamic text with no padding, shortened (truncated) if necessary to fit the available terminal line. This default formatting can be modified by adding a format modifier.
Format Modifiers
Most @-codes support an optional format modifier. Modifiers are appended to the end of the @-code variable name and before the terminating @ character, separated from the code itself with either a hyphen (-) or a pipe (|) character.
When using the hyphen (-) modifier separator, only one format modifier may be used per @-code instance (you cannot combine format modifiers) and @-code parameters (separated from the code with a colon) are not supported.
When using the pipe (|) modifier separator, some modifiers may be combined with others (e.g. |TR) and @-code parameters(separated from the code with a colon) are supported.
| Modifier | Purpose |
|---|---|
L | Pad and left-justify an expanded @-code |
R | Pad and right-justify an expanded @-code |
C | Pad and center an expanded @-code (added in v3.17b) |
W | Displays double-wide using “fullwidth” Unicode code points if possible, spaces between the characters otherwise |
Z | Zero-pad and right-justify an expanded @-code (added in v3.17b) |
T | Thousands-separated (e.g. with a comma) numeric values, may be combined with other modifiers (added in v3.17c) |
U | Convert all alphabetic characters in string to uppercase (added in v3.18a) |
D | Convert all alphabetic characters in string to lowercase (added in v3.22) |
> | Allow the terminal to wrap (don't truncate) overly-long expanded @-codes (added in v3.17c) |
Width Specificity
A string width, specified as a positive decimal number, may immediately follow a format modifier.
Example: @NODE|L2@ for a left-justified 2 character (space padded) node number or @NODE|Z2@ for a right-justified 2 digit (zero-padded) node number.
Another method of specifying the width of an expanded @-code is to include non-numeric non-space characters between the modifier and the trailing @ character.
Example: @ALIAS|R###########@ for a right-justified 20 character user alias (any non-numeric non-space characters could have been used in place of the # characters).
Truncation
When a width is specified, expanded @-code strings which are longer than the specified width will be truncated (shortened) to adhere to the requested width. The left-most characters are preserved/displayed while the right-most characters are truncated (lost).
By default, most expanded @-codes that would reach the last column of the terminal screen are truncated (shortened) so as to not cause an automatic line-wrap of the user's terminal. If you wish for an expanded @-code to be displayed in the last terminal column, or beyond (possibly causing an automatic line-wrap of the terminal) use the > format modifier.
Exceptions
@-codes that accept a parameter value, preceded by a colon (:) character, cannot be used with format modifiers when using the hyphen (-) modifier separator; use the pipe (|) modifier separator instead.
Format Parameters
Some @-codes support a parameter to change the output format. This parameter is appended to the @-code separated with a colon (:) character.
Example: @SOMECODE:E@ would expand the SOMECODE @-code with the format parameter E.
Byte Count Format Parameter
| Parameter | Description | Example |
|---|---|---|
B | Bytes | 1572864 |
K | Kibibytes | 1536 |
M | Mebibytes | 1.5 |
G | Gibibytes | 0.01 |
V | Verbal | 1.5M |
@-codes that support a Byte Count Format Parameter are specified with a [:b] suffix. Byte Count Format parameters are always optional.
Time Duration Format Parameter
| Parameter | Description | Example: 0m | Example: 102s | Example: 90m | Example: 100h |
|---|---|---|---|---|---|
F | Full HH:MM:SS | 00:00:00 | 00:01:42 | 01:30:00 | 100:00:00 |
! | Truncated HH:MM:SS | 0:00:00 | 0:01:42 | 1:30:00 | 100:00:00 |
A | Minimal HH:MM:SS | 0 | 1:42 | 1:30:00 | 100:00:00 |
T | Full HH:MM | 00:00 | 00:01 | 01:30 | 100:00 |
B | Minimal HH:MM | 0 | 1 | 1:30 | 100:00 |
V | Full Verbal | 0m | 1m | 1h 30m | 4d 4h 0m |
C | Minimal Verbal | 0m | 1m | 1.5h | 4.2d |
W | Full Words | 0 minutes | 1 minute | 1 hour 30 minutes | 4 days 4 hours 0 minutes |
D | Minimal Words | 0 minutes | 1 minute | 1.5 hours | 4.2 days |
E | Exact Words (new in v3.22) | 0 seconds | 1 minute 42 seconds | 1 hour 30 minutes | 4 days 4 hours 0 minutes |
S | Seconds | 0 | 102 | 5400 | 360000 |
M | Minutes | 0 | 1 | 90 | 6000 |
@-codes that support a Time Duration Format Parameter are specified with a [:d] suffix. Time Duration Format Parameters are always optional.
The HH:MM, Verbal and Words formats (T, B, V, C, W, D) and M count whole minutes, dropping any remaining seconds. The Exact Words format (E) keeps them, e.g. 42 seconds or 1 hour 30 minutes 5 seconds.
In v3.21 and earlier, the Truncated HH:MM:SS format (the default for TLEFT and TUSED) dropped the first digit of the hours for durations of 10 hours or more (e.g. 14 hours 44 minutes was displayed as 4:44:00 and 100 hours as 00:00:00). This is fixed in v3.22.
Formatted-Time Parameter
Some Time and Date related @-codes support a format parameter string that can include strftime specifiers.
For example, the code @DATE:%Y-%m-%d\x20%H:%M:%S@ would produce output similar to:
2026-01-09 17:51:11
@-codes that support a Formatted-Time Parameter are specified with a :t suffix, and when optional, [:t].
System Information
The currently supported System Information @-codes are:
| Code | Aliases | Description |
|---|---|---|
| ANODES | AN, ANODE | Number of active nodes (including current node) |
| AUTODEL | Maximum days of user inactivity before auto-deletion or “unlimited” | |
| BBS | BOARDNAME | Name of BBS |
| BUILD_DATE | Date of Synchronet build | |
| BUILD_TIME | Time of Synchronet build | |
| CLOCK | System clock (usually in milliseconds) | |
| COMPILER | Compiler used to build Synchronet | |
| CONN | CARRIER, CONNECT | Connection description (modem type, “Telnet”, “RLogin”, etc.) |
| COPYRIGHT | Synchronet copyright details | |
| DATE[:t] | SYSDATE | Current system date (in “DD/MM/YY” or “MM/DD/YY” format) |
| DATE_UTC | Current 8-character date in Coordinated Universal Time (UTC) | |
| DATEFMT | Date display/input format: “DD/MM/YY” or “MM/DD/YY” | |
| DATETIME | Current system date and time (in 24-char long format) | |
| DATETIME_UTC | Current Coordinated Universal Time and Date (in 24-char long format) | |
| DATETIMEZONE | Current system date and time and time-zone | |
| EVENT | Date and time of next scheduled timed event | |
| FIDOADDR | System's primary FidoNet address | |
| FULL_VER | Synchronet full version number (e.g. “3.15a”) | |
| GIT_BRANCH | Synchronet Git repository branch name (e.g. “master”) | |
| GIT_HASH | Synchronet Git repository commit hash (most significant Git-SHA hex-digits) | |
| HOSTNAME | Server's hostname | |
| INETADDR | System's Internet Address (as configured in SCFG) | |
| JS_VER | JavaScript Library Version | |
| LASTCALL[:t] | Date/time of last logout of the terminal server | |
| LASTCALLERNODE | PREVON, LASTCALLERSYSTEM | Name of user last user to logout of the terminal server |
| LOCAL-IP | System's IP address | |
| LOCATION | System location (e.g. “city, state”) | |
| MSGREPLY | Command key to reply to last message ('A' or 'R') | |
| MSGREREAD | Command key used to re-read last message ('R' or 'A') | |
| MSG_LIB | Synchronet Message Base Library version information | |
| NOACCESS | Why user was denied access (last failed ARS check) | |
| NODE | NN | Number of current node |
| NODEn | Status of node number n | |
| NUMDIR | Number of current library and directory | |
| ONODES | ONODE, ON | Number of other active nodes (not counting current node) |
| OS_VER | Operating system type and version information | |
| OS_CPU | Processor architecture name according to the operating system (e.g. “x86”, new in v3.20) | |
| PLATFORM | Platform or operating system name (e.g. “win32”, “linux”) | |
| PWDAYS | Maximum age (in days) of user's password before forced-change or “unlimited” | |
| QUESTION | Current Yes/No question being asked of the user | |
| QWKID | ID | System's QWK BBS-ID |
| REV | Synchronet revision (single letter) | |
| SERVED | Total clients served by the Terminal Server during this uptime | |
| SOCKET_LIB | Socket Library type and version information | |
| STATS.LOGONS | NUMCALLS, TCALLS | Total logons during history of system |
| STATS.LTODAY | Total logons today | |
| STATS.TIMEON[:d] | Total time used during history of system (in minutes) | |
| STATS.TTODAY[:d] | Total time used today (in minutes) | |
| STATS.ULS | Total uploads today | |
| STATS.ULB[:b] | Total bytes uploaded today | |
| STATS.DLS | Total download today | |
| STATS.DLB[:b] | Total bytes downloaded today | |
| STATS.PTODAY | Total posts today | |
| STATS.ETODAY | Total e-mails sent today | |
| STATS.FTODAY | Total feedbacks sent today | |
| STATS.NUSERS | Total number of new users today | |
| SYSOP | Name of System Operator | |
| SYSAVAIL | Sysop availability for chat (e.g. “Available” or “Not Available”) | |
| SYSAVAILYN | Sysop availability for chat (e.g. “Yes” or “No”) | |
| TIME | SYSTIME | Current system (wall clock) time |
| TIMER | High resolution system clock, real number, fractions of a second | |
| TIME_UTC | Current Coordinated Universal Time (UTC) | |
| TIMEZONE | Current system time zone abbreviation or UTC offset | |
| TNODES | TNODE,TN | Total number of Terminal Server nodes |
| TUSER | Total number of currently active registered users | |
| UPTIME[:d] | Synchronet uptime duration | |
| UTC:t | Current date/time at Coordinated Universal Time (UTC) in specified strftime format | |
| VER | BBS version number (e.g. “3.15”) | |
| VER_NOTICE | BBS version information (e.g. “Synchronet BBS for Win32 Version 3.15”) | |
| WHO | Display status of all active nodes |
Message Area Information
The context-sensitive Message Area Information @-codes are:
| Code | Description |
|---|---|
| CONF | Name of current Group and Sub-board (PCBoard alias: CONFNAME) |
| CONFNUM | Number of current Group and Sub-board (separated by a space) |
| FIDOAREA | FidoNet Area Tag for current/open sub-board |
| FIDOORIGIN | FidoNet Origin Line for current/open sub-board |
| GRP | Current/open message group name |
| GRPL | Current/open message group description |
| GN | Number of current message group |
| GL | “ ” padded and left justified (4 chars wide) |
| GR | “ ” padded and right justified (4 chars wide) |
| SUB | Current/open message sub-board name |
| SUBL | Current/open message sub-board description |
| SN | Number of current message sub-board |
| SL | “ ” padded and left justified (4 chars wide) |
| SR | “ ” padded and right justified (4 chars wide) |
| SMB_AREA | Current message group and sub-board (names) or Email for mail base |
| SMB_AREA_DESC | Current message group and sub-board (descriptions) or Personal Email for mail base |
| SMB_GROUP | Current message group name |
| SMB_GROUP_DESC | Current message group description |
| SMB_GROUP_NUM | Current message group number |
| SMB_SUB | Current message sub-board name (or Mail for the mail base) |
| SMB_SUB_DESC | Current message sub-board description (or Mail for the mail base) |
| SMB_SUB_CODE | Current message sub-board internal code (or MAIL for the mail base) |
| SMB_SUB_NUM | Current message sub-board number |
| SMB_MSGS | Total number of messages visible to current user in the current message sub-board |
| SMB_CURMSG | Currently viewed message (index) into current message sub-board |
| SMB_LAST_MSG | Number of last message stored in current message sub-board |
| SMB_MAX_MSGS | Maximum number of messages to store in current message sub-board |
| SMB_MAX_CRCS | Number of history message body hashes to store for current message sub-board |
| SMB_MAX_AGE | Maximum age (in days) of messages stored in current message sub-board |
| SMB_TOTAL_MSGS | Total number of message stored in the current message sub-board |
| MAXMSGS | Maximum number of messages retained in current/open sub-board |
| MSGS | Total number of messages in the current sub-board (added in v3.20e) |
| NEWMSGS | Total number of new messages in the current sub-board (added in v3.21a) |
| NEWSGROUP | Newsgroup name for current/open sub-board |
| QWKNAME | QWK conference name for current/open sub-board |
| QWKTAG | QWKnet tagline for current/open sub-board |
| TMSG | Total number of messages on system |
Message Information
The context-sensitive currently-inspected Message Information @-codes are:
| Code | Description |
|---|---|
| MSG_NUM | Current message number (PCBoard alias: CURMSGNUM) |
| MSG_ID | Current message ID |
| MSG_REPLY_ID | Current Message Reply-ID |
| MSG_TO | Current message to-user name/number/address |
| MSG_TO_NAME | Current message to-user name |
| MSG_TO_FIRST | Current message to-user “first” name |
| MSG_TO_EXT | Current message to-user extension (number) |
| MSG_TO_NET | Current message to-user network address |
| MSG_TO_NETTYPE | Current message to-user network address type (e.g. “QWKnet”, “FidoNet”, or “Internet”) |
| MSG_CC | Current message carbon-copy list (usually blank) |
| MSG_FROM | Current message from-user name/number/address |
| MSG_FROM_NAME | Current message from-user name |
| MSG_FROM_FIRST | Current message from-user “first” name |
| MSG_FROM_EXT | Current message from-user extension (number) |
| MSG_FROM_NET | Current message from-user network address |
| MSG_FROM_NETTYPE | Current message from-user network address type (e.g. “QWKnet”, “FidoNet”, or “Internet”) |
| MSG_SUBJECT | Current message subject |
| MSG_SUMMARY | Current message summary (usually blank) |
| MSG_TAGS | Current message tags (space-separated, optional) |
| MSG_DATE | Current message date/time written |
| MSG_DATE_UTC | Current message date/time written, at Coordinated Universal Time (UTC) |
| MSG_IMP_DATE | Current message date/time imported |
| MSG_AGE | Current message age (e.g. in seconds, minutes, hours, etc.) |
| MSG_TIMEZONE | Current message timezone written |
| MSG_IMP_TIMEZONE | Current message timezone imported |
| MSG_ATTR | Current message attributes |
| MSG_AUXATTR | Current message auxiliary attributes |
| MSG_NETATTR | Current message network attributes |
| MSG_UPVOTES | Current message total number of 'up-votes' (new in v3.17) |
| MSG_DOWNVOTES | Current message total number of 'down-votes' (new in v3.17) |
| MSG_SCORE | Current message vote score (down-votes subtracted from up-votes) |
| MSG_VOTED | Current user voted status for current message (checkmark) |
| MSG_UPVOTED | Current user up-voted status for current message (checkmark) |
| MSG_DOWNVOTED | Current user down-voted status for current message (checkmark) |
| MSG_THREAD_ID | Current message thread's thread-id (message number) |
| MSG_THREAD_NEXT | Current message thread's next message number |
| MSG_THREAD_BACK | Current message thread's previous message number |
| MSG_THREAD_FIRST | Current message's first reply message number |
File Area Information
The current File Area @-codes are:
| Code | Description |
|---|---|
| LIB | Current file library name |
| LIBL | Current file library description |
| LN | Number of current file library |
| LL | “ ” padded and left justified (4 chars wide) |
| LR | “ ” padded and right justified (4 chars wide) |
| DIR | Current file directory name |
| DIRL | Current file directory description |
| DIRV | Current file directory virtual name |
| DIRVPATH | Current file directory virtual path (e.g. for FTP and Web servers) |
| DN | Number of current file directory |
| DL | “ ” padded and left justified (4 chars wide) |
| DR | “ ” padded and right justified (4 chars wide) |
| FILES | Number of files in the user's currently selected file transfer directory |
| MAXFILES | Maximum number of files allowed in the current file directory or “unlimited” |
| NEWFILES | Number of new files in the user's currently selected file transfer directory (added in v3.21a) |
| FILES:code | Number of files in the file transfer directory specified by internal-code |
| FILES:path | Number of files in the directory specified by path |
| FILEBYTES | Total size (in bytes) of all files in the user's currently selected file transfer directory |
| FILEBYTES:code | Total size (in bytes) of all files in the file transfer directory specified by internal-code |
| FILEBYTES:path | Total size (in bytes) of all files matching the path/filespec specified in path |
| FILEKB | Total size (in kibibytes) of all files in the user's currently selected file transfer directory |
| FILEKB:code | Total size (in kibibytes) of all files in the file transfer directory specified by internal-code |
| FILEKB:path | Total size (in kibibytes) of all files matching the path/filespec specified in path |
| FILEMB | Total size (in mebibytes) of all files in the user's currently selected file transfer directory |
| FILEMB:code | Total size (in mebibytes) of all files in the file transfer directory specified by internal-code |
| FILEMB:path | Total size (in mebibytes) of all files matching the path/filespec specified in path |
| FILEGB | Total size (in gibibytes) of all files in the user's currently selected file transfer directory |
| FILEGB:code | Total size (in gibibytes) of all files in the file transfer directory specified by internal-code |
| FILEGB:path | Total size (in gibibytes) of all files matching the path/filespec specified in path |
| FILESIZE | Total size estimate (in KB/MB/GB) of all files in the user's currently selected file transfer directory |
| FILESIZE:code | Total size estimate (in KB/MB/GB) of all files in the file transfer directory specified by internal-code |
| FILESIZE:path | Total size estimate (in KB/MB/GB) of all files matching the path/filespec specified in path |
| FILETYPES | List of file types/extensions allowed to be uploaded to the current file directory or “All” |
| FREESPACE[:b] | Free disk space available for uploads (in bytes; format parameter new in v3.22) |
| FREESPACEK | Free disk space available for uploads (in kibibytes) |
| MINSPACE | Minimum required free disk space to allow uploads |
| TFILE | Total number of files on system |
| UCP | Percent of file size awarded uploader in credits upon file upload |
| DCP | Percent of file size awarded uploader in credits upon subsequent downloads |
File Information
The context-sensitive currently-inspected File Information @-codes are:
| Code | Description |
|---|---|
| FILE_AREA | Current file area (lib and directory) names |
| FILE_AREA_DESC | Current file area (lib and directory) descriptions |
| FILE_LIB | Current file library name |
| FILE_LIB_DESC | Current file library description |
| FILE_LIB_NUM | Current file library name |
| FILE_DIR | Current file directory name |
| FILE_DIR_DESC | Current file directory description |
| FILE_DIR_CODE | Current file directory internal code |
| FILE_DIR_NUM | Current file directory number |
| FILE_NAME | Current file name |
| FILE_DESC | Current file description |
| FILE_TAGS | Current file tags (space-separated) |
| FILE_UPLOADER | Current file uploader (e.g. user name) |
| FILE_AUTHOR | Current file's author (e.g. from FILE_ID.DIZ SAUCE record) |
| FILE_GROUP | Current file's author's group (e.g. from FILE_ID.DIZ SAUCE record) |
| FILE_SIZE | Current file size estimate in KB, MB, GB, etc. |
| FILE_BYTES[:b] | Current file size (in bytes) |
| FILE_COST | Current file credit value or “FREE” when applicable |
| FILE_CREDITS[:b] | Current file credit value |
| FILE_TIME | Current file modification time and date |
| FILE_TIME_ULED | Current file upload time and date |
| FILE_TIME_DLED | Current file last download time and date |
| FILE_TIME_TO_DL[:b] | Current file transfer time estimate (“HH:MM:SS”) at current CPS |
| FILE_DATE | Current file modification date |
| FILE_DATE_ULED | Current file upload date |
| FILE_DATE_DLED | Current file last download date |
| FILE_TIMES_DLED | Current file download count |
| FILE_FTP_PATH | Current file virtual path on FTP server |
| FILE_WEB_PATH | Current file virtual path on Web server |
| FILE_CRC32 | Current file 32-bit CRC as 8 hex digits |
| FILE_MD5 | Current file 128-bit MD5 hash as 32 hex digits |
| FILE_SHA1 | Current file 160-bit SHA-1 hash as 40 hex digits |
User Information
The currently supported User Information @-codes are:
| Code | Aliases | Description |
|---|---|---|
| ADDR1 | User's street address | |
| ADDR2 | FROM | User's location (e.g. city, state) |
| AGE | User's age (in years since birth date) | |
| ALERTS | Node activity alerts enabled status (e.g. “On” or “Off”) | |
| ALIAS | NAME, USER | User's alias |
| ANFSCAN | Automatically scan for new files after new messages (e.g. “On” or “Off”) | |
| ASKNSCAN | Prompt for new message scan during logon (e.g. “On” or “Off”) | |
| ASKSSCAN | Prompt for your personal message scan during logon (e.g. “On” or “Off”) | |
| AUTOHANG | Automatically hang-up after file transfers (e.g. “On” or “Off”) | |
| AUTOLOGON | Automatically login via IP address (e.g. “On” or “Off”) | |
| BDATE[:t] | User's birth date | |
| BDATEFMT | BIRTHFMT | User birthdate input format (i.e. either “MM/DD/YYYY” or “DD/MM/YYYY”) |
| BIRTH | User's birth date (in “MM/DD/YYYY” or “DD/MM/YYYY” format) | |
| BTODAY[:b] | Bytes downloaded (in files) today, in estimated KiB, MiB, etc. quantities (e.g. “1.2M”) | |
| BYTELIMIT | User's free credits per day | |
| BYTESLEFT | User's total credits | |
| CALLS | NUMTIMESON | Total number of logons for user |
| CDTLEFT[:b] | Estimated total credits (including free credits) that the user has currently | |
| CDTPERD[:b] | Estimated number of free credits awarded the user per day based on their security level | |
| CDTUSED[:b] | Estimated number of free credits used by the user thus far today, see USEDCDT | |
| CITY | User's city | |
| CREDITS[:b] | ACCBAL | Total unspent credits the user has earned |
| DAYBYTES | Bytes downloaded (in files) today | |
| DLB[:b] | Total bytes (estimated KiB, MiB, etc.) downloaded by user | |
| DLBYTES | Total bytes downloaded by user | |
| DLFILES | DOWNS | Total files downloaded by user |
| DLKLIMIT | User's total credits (in kibibytes) | |
| DOWNK | Total kibibytes downloaded by user | |
| DTODAY | Files downloaded by user today | |
| EDITOR | User's selected external editor name or “None” | |
| EMAILADDR | User's Internet e-mail address on your system | |
| EMAILS | Total number of emails sent by user | |
| ETODAY | Number of emails sent today by user | |
| EXPDATE[:t] | EXDATE | User's expiration date |
| EXPDAYS | Days left before user expires | |
| EXPERT | Expert menu mode enabled ('On' or 'Off') | |
| FBACKS | Number of feedback messages sent by user | |
| FILEDESC | Display extended file descriptions in file listings ('On' or 'Off') | |
| FILEFLAG | Display file flagging prompt in file listings ('On' or 'Off') | |
| FIRST | First word of user's alias | |
| FIRSTON[:t] | Date and time of user's first logon | |
| FIRSTDATEON | SINCE | Date of user's first logon (in “MM/DD/YY” or “DD/MM/YY” format) |
| FIRSTTIMEON | Time of user's first logon (in “HH:MM am” or “HH:MM:SS” format) | |
| FIRSTREAL | REAL | First word of user's real name |
| FROM | ADDR2 | User's location (e.g. “City, State”) |
| FREECDT[:b] | User's remaining freely-awarded (unearned) credits for today (see USEDCDT) | |
| FWD | User's netmail forward status (e.g. “On” or “Off”) (new in v3.18c) | |
| GENDER | SEX | User's gender or sex as a single letter |
| HANDLE | User's chat handle | |
| HOTKEYS | Hot-key user input mode enabled ('On' or 'Off') | |
| HOST | CPU | Client's hostname |
| IP | CID, CALLID | Client's IP address or Caller-ID information |
| KBLEFT | User's total credits (in kibibytes) | |
| KBLIMIT | DLKLIMIT, MAXDK | User's free credits per day (in kibibytes) |
| KTODAY | Kibibytes downloaded (in files) today | |
| LAST | Last word of user's alias | |
| LASTDATEON | Date of user's last logon (in “MM/DD/YY” or “DD/MM/YY” format) | |
| LASTIP | IP address of user's last logoff (new in v3.18c) | |
| LASTNEW[:t] | Date of user's last new file scan | |
| LASTON[:t] | Date and time of user's last logon | |
| LASTREAL | Last word of user's real name | |
| LASTTIMEON | Time of user's last logon (in “HH:MM am” or “HH:MM:SS” format) | |
| LTODAY | Number of times user has logged on today | |
| MAILR | Number of read mail messages waiting for current user | |
| MAILR:x | MAILR#x | Number of read mail messages waiting for user number x (x=0 for all users) |
| MAILU | Number of unread mail messages waiting for current user | |
| MAILU:x | MAILU#x | Number of unread mail messages waiting for user number x (x=0 for all users) |
| MAILW | Total number of mail messages waiting for current user (includes SPAM) | |
| MAILW:x | MAILW#x | Total number of mail messages waiting for user number x (x=0 for all users) |
| MAILP | Number of pending mail messages sent by current user | |
| MAILP:x | MAILP#x | Number of pending mail messages sent by user number x |
| MAXCALLS | Maximum number of calls/logons per day allowed per user's security level | |
| MAXDL | Maximum number of files to download per day (or “unlimited”) per user's security level | |
| MAXLINES | Maximum number of lines per message allowed per user's security level | |
| MAXMAILS | Maximum number of sent emails per day allowed per user's security level | |
| MAXPOSTS | Maximum number of posted messages per day allowed per user's security level | |
| MBANKED[:d] | Minutes banked by user, see also TBANKED | |
| MEXTRA[:d] | Extra time earned today, in minutes, see also TEXTRA | |
| MPERC[:d] | TIMELIMIT | Minutes allowed per call/logon, see also HPERC |
| MPERD[:d] | Minutes allowed per day, see also HPERD | |
| MSGCLS | Clear screen before each message ('On' or 'Off') | |
| MSGLEFT | MSGSLEFT | Total number of messages posted by user |
| MSGREAD | Number of messages read by user this call | |
| MTODAY | Total minutes used during previous logons today | |
| MTOTAL | Total minutes used during all previous logons | |
| NEWFILETIME | Date and time of user's last new file scan (see LASTNEW) | |
| NETMAIL | User's personal email or netmail address (new in v3.18c) | |
| NODE_USER | User's alias or “UNKNOWN USER” if the current node is in anonymous mode (new in v3.20) | |
| NOTE | MEMO1 | User's note (new in v3.18c) |
| ONOFF:ars | The text string for “On” or “Off” based on the comparison of the specified Access Requirements String (without spaces). | |
| PAGER | Chat pager enabled status (e.g. “On” or “Off”) | |
| PAUSESPIN | Spinning cursor at pause prompts ('On' or 'Off') | |
| PCR | User's post/call ratio, as a percentage (not capped at 100) | |
| PHONE | HOMEPHONE, DATA, DATAPHONE | User's phone number |
| PROP:[section:]key | The value of a user property from the specified (or root) section of the data/user/####.ini file |
|
| PROT | PROLTR | User's default file transfer protocol (key/character) |
| PROTNAME | PROTOCOL, PRODESC | Full name of user's default file transfer protocol |
| PTODAY | Number of messages posted by user today | |
| PWAGE | Age (in days) of the current user's password | |
| PWDATE[:t] | MEMO | Date of user's last password modification |
| QUIET | Quiet logon mode enabled (e.g. “On” or “Off”) | |
| REALNAME | COMPANY, MEMO2 | User's real name |
| REMSUBS | Remember current sub-board and file director between logins ('On' or 'Off') | |
| SEC | SECURITY | User's security level (0-99) |
| SHELL | User's selected command shell name | |
| SPAMW | Number of SPAM messages waiting | |
| SPAMW:x | SPAMW#x | Number of SPAM messages waiting for user number x |
| SPIN | Spinning cursor enabled ('On' or 'Off') | |
| SPLITP | Split-screen private chat enabled status (e.g. “On” or “Off”) | |
| STATE | User's state (from location) | |
| TBANKED[:d] | Banked time in HH:MM format, see also MBANKED | |
| TEXTRA[:d] | Extra time earned by user, in H:MM format | |
| TIMELEFT | MINLEFT | User's time left in minutes |
| TIMEON[:d] | Time since user logged on | |
| TIMEUSED | Time used this call in minutes (see also TUSED) | |
| TLAST[:d] | Time used by user during last logon | |
| TLEFT[:d] | Time left (in “H:MM:SS” format) | |
| TMP | Temporary file type chosen by user (e.g. “ZIP”) (new in v3.18c) | |
| TPERC[:d] | Time allowed per call (in “H:MM:SS” format) | |
| TPERD[:d] | Time allowed per day (in “H:MM:SS” format) | |
| TTODAY[:d] | Time used by user today (in “H:MM format) | |
| TTOTAL[:d] | Total time used by user for all previous calls/logons (in “HH:MM” format) | |
| TUSED[:d] | Time used this call (in “H:MM:SS” format) | |
| UDR | BYTERATIO | User's upload/download byte ratio, as a percentage (not capped at 100) |
| UDFR | User's upload/download file ratio, as a percentage (not capped at 100) | |
| UPAUSE | Automatic screen-pausing ('Hit a key' prompting) ('On' or 'Off') | |
| UPB[:b] | Total bytes (estimated KiB, MiB, etc.) uploaded by user | |
| UPBYTES | Total bytes uploaded by user | |
| UPFILES | UPS | Total files uploaded by user |
| UPK | Total kibibytes uploaded by user | |
| USEDCDT | Number of free credits used today by user (see FREECDT and CDTUSED) | |
| USERNUM | UN, USERID | User's number (1-based index into user database) |
| YESNO:ars | The text string for “Yes” or “No” based on the comparison of the specified Access Requirements String (without spaces). | |
| ZIP | User's zip/postal code |
Terminal Information / Control
The currently supported Terminal Control @-codes:
| Code | Aliases | Description |
|---|---|---|
| BPS | BAUD | Current emulated modem (DCE) bit-rate, in bps |
| BPS:n | Set the current emulated rate to 0 (unlimited), or 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800, or 115200 bps | |
| BEEP | BELL | Generate a beep sound on the user's terminal (unless the user has turned sound off) |
| SOUND | BBS-initiated sound enabled for the current user ('On' or 'Off') (new in v3.22) | |
| SOUND:file | Play a sound file from the text/sound directory once in the user's terminal (new in v3.22, see Terminal Audio) |
|
| SOUND:file:vol | Play a sound file once, at the specified volume | |
| MUSIC:file | Play a sound file from the text/sound directory repeatedly (looped) as background music; music already playing stops at the end of its current pass (new in v3.22) |
|
| MUSIC:file:vol | Play looped background music at the specified volume | |
| MUSICVOL:vol | Change the volume of the background music (new in v3.22) | |
| MUSICOFF | Stop the background music (new in v3.22) | |
| MUSICOFF:ms | Stop the background music, fading out over ms milliseconds | |
| SOUNDOFF | Stop all sound effects and background music (new in v3.22) | |
| CACHE_AUDIO:file | Send a sound file from the text/sound directory to the user's terminal ahead of time, without playing it (new in v3.22) |
|
| CLS | Clear the screen | |
| CLEAR | Clear the screen, all existing mouse hot-spots and eat the next newline sequence | |
| CLEAR_HOT | Clear all existing mouse hot-spots | |
| CPS[:b] | The user's file download rate, in bytes per second: the rate of their most recent download, saved with their user account and used to estimate download times (new in v3.20; format parameter new in v3.22). For the rate of the transfer that just finished, upload or download, use XFER_CPS |
|
| XFER_TIME[:d] | Duration of the most recent file transfer (default format !, e.g. 0:01:42); empty when the duration isn't known, as for batch and SFTP transfers (new in v3.22) |
|
| XFER_CPS[:b] | Rate of the most recent file transfer, in bytes per second; empty when the duration isn't known (new in v3.22) | |
| XFER_PROT | Name of the protocol used for the most recent file transfer (e.g. ZMODEM or SFTP), as configured in SCFG->File Options->Transfer Protocols (new in v3.22) |
|
| HOT | Define a new mouse hot-spot color (the color of the @-code defines the hot-spot attributes). Text displayed in that color becomes a hot-spot; as of v3.22 that includes the text displayed by another @-code (e.g. @QUITCHAR@) when it contains no spaces |
|
| HOT:HUNGRY | Define a new mouse hot-spot color for defining hungry hot-spots (hungry hot-spots are the default type) | |
| HOT:STRICT | Define a new mouse hot-spot color for defining strict hot-spots | |
| HOT:OFF | Disable hot-spot by color/attribute definitions for the remainder of the file (or until re-enabled) | |
| ~ctext | Define a single hungry hot-spot (where the displayed text and command keys are the same) and ctext may contain C-escape sequences | |
| ~ctext~cmd | Define a single hungry hot-spot with an alternate command to stuff in the keyboard input buffer and ctext may contain C-escape sequences | |
| `ctext | Define a single strict hot-spot (where the displayed text and command keys are the same) ctext may contain C-escape sequences | |
| `ctext`cmd | Define a single strict hot-spot with an alternate command to stuff in the keyboard input buffer and ctext may contain C-escape sequences | |
| BAR:cmd | Begin a lightbar menu item: everything displayed from here to the next @BAR@ code, on the same row, is a selectable item that returns cmd (new in v3.22, see Lightbars) |
|
| BAR | End the lightbar menu item begun with @BAR:cmd@ |
|
| [text]cmd | Display text (its underscores shown as spaces) as a lightbar menu item that returns cmd (new in v3.22) | |
| BARATTR:attr | Set the color of the selected lightbar menu item, using attr.ini syntax (new in v3.22) |
|
| BARATTR:attr:key-attr | Set the color of the selected lightbar menu item and the foreground color of each item's command key | |
| BARATTR | Set the color of the selected lightbar menu item to the color in effect where this code is placed | |
| BARDEFAULT:cmd | Name the lightbar menu item that is highlighted first: the one that returns cmd (new in v3.22) | |
| CRLF | Send a carriage return/line-feed pair | |
| CHECKMARK | Send a check mark symbol appropriate for the user's terminal | |
| COPY | Send a copyright symbol appropriate for the user's terminal, e.g. ”©“ | |
| SOUNDCOPY | Send a sound-copyright symbol appropriate for the user's terminal, e.g. ”(P)“ | |
| REGISTERED | Send a registered mark appropriate for the user's terminal, e.g. ”®“ | |
| TRADEMARK | Send a trademark symbol appropriate for the user's terminal, e.g. ”™“ | |
| ELLIPSIS | Send a ellipsis (...) appropriate for the user's terminal | |
| DEGREE_C | Send a degree Celsius symbol appropriate for the user's terminal | |
| DEGREE_F | Send a degree Fahrenheit symbol appropriate for the user's terminal | |
| YESCHAR | Print the character that corresponds with an affirmative “Yes” answer key (e.g. Y) |
|
| NOCHAR | Print the character that corresponds with an negative “No” answer key (e.g. N) |
|
| QUITCHAR | Print the character that corresponds with a “quit” command key (e.g. Q) |
|
| UPLOADCHAR | Print the character that corresponds with an “upload” command key (e.g. U): the first letter of the Upload text string (added in v3.22) |
|
| DOWNLOADCHAR | Print the character that corresponds with a “download” command key (e.g. D): the first letter of the Download text string (added in v3.22) |
|
| CONFIGURECHAR | Print the character that corresponds with a “configure” command key (e.g. C): the first letter of the Configure text string (added in v3.22) |
|
| SELECTCHAR | Print the character that corresponds with a “select” command key (e.g. S): the first letter of the Select text string (added in v3.22) |
|
| POINTERSCHAR | Print the character that corresponds with a (message) “pointers” command key (e.g. P): the first letter of the Pointers text string (added in v3.22) |
|
| EOF | End-of-file (stop parsing/displaying) | |
| PAUSE | MORE, ENTER | Force a screen pause and a [Hit a key] prompt, if 'N' or 'Q' are typed, the displayed message/file is aborted |
| POFF | NOPAUSE | Toggle automatic screen pause off |
| PON | AUTOMORE | Toggle automatic screen pause on |
| PSTAT | Screen pause enabled status: ('On' or 'Off') | |
| QOFF | NOSTOP | Toggle display abort-ability off |
| QON | STOP | Toggle display abort-ability on |
| RESETPAUSE | Reset the automatic screen pause line counter | |
| RAWIO | Raw input/output mode status: ('On' or 'Off') | |
| GETDIM | Request current (ANSI) terminal dimensions (rows and columns), only when set to auto-detect | |
| GETKEY | Wait indefinitely for any key press before continuing | |
| CONTINUE | Wait indefinitely for any key press before continuing and abort the message/file display if 'N' or 'Q' are typed | |
| WAIT:n | Wait up to n 10ths of a second for a key press before continuing | |
| DELAY:n | Wait n 10ths of a second before continuing | |
| LINEDELAY | Wait 1/10th of a second before sending each newline character (new in v3.20) | |
| LINEDELAY:n | Wait n 100ths of a second before sending each newline character, 0 to disable (new in v3.20) | |
| UP:n | Move cursor up n rows | |
| DOWN:n | Move cursor down n rows | |
| RIGHT:n | Move cursor right n columns | |
| LEFT:n | Move cursor left n columns | |
| GOTOXY:x,y | Move cursor to x/y coordinate (1-based) | |
| POS:x | Advance the cursor to column x (1-based) by printing spaces; has no effect when the cursor is already at or past that column (it never moves the cursor left). Useful for placing what follows at a fixed column after text of varying length | |
| HOME | Home cursor (to upper left), don't clear the screen | |
| CLRLINE | Clear the current line (cursor to first column) | |
| CLR2EOL | Clear to end of line (cursor doesn't move) | |
| CLR2EOS | Clear to end of screen (cursor doesn't move) | |
| PUSHXY | Save current cursor position | |
| POPXY | Restore saved cursor position | |
| HANGUP | Disconnect the user | |
| LOGOFF | Log-off and disconnect the user (displaying log-off screens and such) | |
| COLS | Number of terminal columns | |
| ROWS | Number of terminal rows | |
| TERM | Terminal-type name (i.e. 'ANSI', 'RIP', 'PETSCII', or 'DUMB') | |
| TERMTYPE | Verbose terminal type configuration | |
| TERMCOLS | Verbose terminal column configuration | |
| TERMROWS | Verbose terminal row/lines configuration | |
| CHARSET | Terminal character set supported (i.e. 'UTF-8', 'CP437', 'PETSCII', or 'US-ASCII') | |
| AUTOTERM | Automatic terminal type detection ('On' or 'Off') | |
| ANSI | ANSI-BBS terminal emulation ('On' or 'Off') | |
| ASCII | ASCII terminal character set ('On' or 'Off') | |
| PETSCII | CBM/PETSCII terminal emulation ('On' or 'Off') | |
| PETGRFX | Send special character (142) to enter UPPER/GRAPHICS character set mode on PETSCII terminals | |
| UTF8 | UTF-8 terminal character set ('On' or 'Off') | |
| COLOR | Color terminal support ('On' or 'Off') | |
| ICE | Bright-background (ICE color) support ('On' or 'Off') | |
| RIP | RIPscrip terminal emulation ('On' or 'Off') | |
| SWAPDEL | Reverse the traditional DEL and Backspace input key codes ('On' or 'Off') | |
| MOUSE | Mouse support ('On' or 'Off') | |
| TRUNCATE | Truncate long lines in the following text | |
| TRUNCOFF | Mark the end of a truncated text block (turn off long-line truncation) | |
| WORDWRAP | Word-wrap long lines in the following text | |
| WRAP | Ungracefully-wrap long lines in the following text | |
| WRAPOFF | Mark the end of a word-wrapped / ungracefully-wrapped text block | |
| CENTER | Middle-align the remaining text on the line | |
| SYSONLY | Toggle off/on visibility for non-sysops | |
| SHOW:ars | Turn off the display of the following text for users not meeting the specified Access Requirements String (without spaces). | |
| SHOW | Turn on the display of following text for all users | |
| IFSEC=ars | IFSEC:ars | Begin a Wildcat!-style conditional block: display the following text only to users meeting the specified Access Requirements String (without spaces). Ends at the matching @ELSE@ or @ENDIF@. |
| ELSE | Within an @IFSEC@ block, display the following text only to users not meeting the condition |
|
| ENDIF | End an @IFSEC@ conditional block; resume display for all users |
|
| NOCODE | Turn off @-code expansion for the remainder of the message/file | |
| XON | Turn on PCBoard style color code interpretation (for the remainder of this message/file only or until turned off) | |
| XOFF | Turn off PCBoard style color code interpretation (for the remainder of this message/file only or until turned on) | |
| FILL:ctext | Repeat the specified ctext (may contain C-escape sequences), filling the current line (to terminal columns - 1) | |
| WIDE:text | Display specified text double-wide, using Unicode “fullwidth” characters if possible | |
| U+code | Send a Unicode character code point (in hexadecimal) to UTF-8 terminal or an automatic fallback character, if supported3) | |
| U+code:text | Send a Unicode character code point, specifying fallback string | |
| U+code,char | Send a Unicode character code point, specifying fallback character value in hexadecimal (or 0 for none) |
|
| U+code!char | Send a Unicode character code point, specifying fallback character only to used when no automatic fallback is available | |
| !x | Execute the terminal/attribute control sequences for one or more Ctrl-A Codes (operands) represented by x | |
| AT | Literal @ character (new in v3.20d) |
|
| MNE:low | Set Mnemonic string “low” attribute (color) using attr.ini syntax for “low” attribute code; the “high” attribute is set to the same color with the “high intensity” bit flipped |
|
| MNE:low:high | Set Mnemonic string “low” and “high” attributes (colors) | |
| MNE:low:high:cmd | Set Mnemonic string “low”, “high” and “command” attributes (colors) | |
| RAINBOW | RAINBOW:ON | Enable rainbow mode output starting at rainbow attribute index 0 |
| RAINBOW:OFF | Turn off rainbow mode output | |
| RAINBOW:RAND | Enable rainbow mode output starting at a randomly chosen rainbow attribute | |
| RAINBOW:index-num | Enable rainbow mode output starting at the specified (zero-based) rainbow attribute index | |
| RAINBOW:attr-list | Set the rainbow attribute pattern with colon-separated attributes, using attr.ini syntax (e.g. RAINBOW:R:RH:B:BH:G:GH:C:CH) |
|
| RAINBOW:DEFAULT | Restore the rainbow attribute pattern to the configured default (the rainbow setting in attr.ini), e.g. after setting a custom pattern with the attr-list form above (added in v3.22) |
|
| 80COLS | Specify that the remainder of the message/file should be formatted (e.g. truncated, word-wrapped, centered) based on an 80 column maximum terminal width |
Conditional Display (@IFSEC@)
The @IFSEC@ / @ELSE@ / @ENDIF@ codes display blocks of text conditionally, based on whether the user meets an Access Requirements String (ARS). They are modeled on the Wildcat! BBS construct of the same name, but the argument is a Synchronet ARS (e.g. SYSOP, LEVEL40, FLAG1A), not a Wildcat! security-profile name.
@IFSEC=LEVEL90@ This text is shown only to users at security level 90 or higher. @ELSE@ This text is shown to everyone else. @ENDIF@ This text is shown to all users.
Notes:
- Both
@IFSEC=ars@and@IFSEC:ars@are accepted. - The
@ELSE@section is optional. - Unlike Wildcat!, these codes do not have to start in the left-most column and may share a line with other text or @-codes.
- Conditional blocks cannot be nested. For a single-sided conditional (no
@ELSE@),@SHOW://ars//@is an equivalent alternative.
Terminal Audio
The @SOUND:, @MUSIC:, @MUSICVOL:, @MUSICOFF@, @SOUNDOFF@ and @CACHE_AUDIO: codes play sound effects and background music in the user's terminal (e.g. SyncTERM), from files placed in the text/sound directory. Each takes a bare filename in that directory. Example uses:
| @-code | Effect |
|---|---|
@SOUND:beep.wav@ | Play once |
@SOUND:beep.wav:50@ | Play once at 50 percent volume |
@SOUND:beep.wav:-6dB@ | Play once at -6 dB |
@MUSIC:theme.ogg@ | Play looped |
@MUSICVOL:30@ | Change the looping music volume |
@MUSICOFF:500@ | Stop the music, fading out over 500 milliseconds |
@SOUNDOFF@ | Stop everything |
@CACHE_AUDIO:theme.ogg@ | Send the file ahead of time, without playing it |
Volume: a bare number is a percentage, where 100 is the file's own volume and 0 is silent. A number followed by dB is a gain in decibels, from -60dB (silent) up to +20dB. An invalid volume plays the file at its own volume.
Who hears it: whether the user's terminal can play sound files is detected when the user connects, and a terminal that cannot is sent nothing. Users can also turn BBS-initiated sound off for themselves, under Terminal Settings in the user defaults menu; that setting silences @BEEP@ too, and @SOUND@ reports it. @MUSICOFF@ and @SOUNDOFF@ work regardless of the setting. The SOUND ARS keyword is true only for users who will hear the sound, so a display file can limit content to them, e.g. a logoff file that plays a clip and then waits for it to finish before disconnecting only when the user can hear it: @SOUND:clip.ogg@@SHOW:SOUND@@WAIT:100@@SHOW@. SOUND is false until the terminal's sound support has been detected, so it is not reliable in display files shown before that detection completes.
Formats: the user's terminal decodes the file, not the BBS. WAV, VOC, OGG and FLAC work wherever the terminal supports sound files; MP3 needs a terminal built with libsndfile 1.1.0 or later. The format is detected from the file contents, so the file extension does not matter.
Size: each file is sent to the user's terminal, which keeps it in a cache on the user's computer, so a file is sent only on a user's first visit, not every session. Two settings in SCFG->System->Advanced Options bound what a display file can send:
| Setting | Default | Limits |
|---|---|---|
| Max Sound File Size | 256K | @SOUND: and @MUSIC: |
| Max Cached File Size | 4M | @CACHE_AUDIO: |
@SOUND: and @MUSIC: send the file while a display file is being drawn, where a delay is noticeable, while @CACHE_AUDIO: can be placed where a pause is expected, such as in the logon sequence. A file larger than Max Sound File Size plays only once it has been sent with @CACHE_AUDIO:; the matching @MUSIC: or @SOUND: then starts instantly.
Lightbars
The @BAR:cmd@, @BAR@, @[text]cmd@, @BARATTR@ and @BARDEFAULT:cmd@ codes (new in v3.22) mark the selectable items of a menu file. A module that displays the file can then let the user move a highlight bar from item to item with the arrow keys and choose one with Enter, as well as with the item's usual command key. In a menu whose items are all in one column, the Right arrow key chooses the highlighted item too. Because the items' positions come from the menu file, a lightbar menu can be redrawn or rearranged without changing the module that displays it.
| @-code | Effect |
|---|---|
@BAR:M@ Multi-player @BAR@ | The text between the two codes is an item that returns M |
@[_Multi-player_]M@ | The same item, written as a single code |
@BARATTR:WH1@ | The selected item is displayed in bright white on red |
@BARATTR:B3E@ | The selected item is displayed in blue on bright yellow |
@BARATTR:WH1:R@ | As WH1 above, and the command key of each of the other items is displayed in red |
@BARDEFAULT:S@ | The item that returns S is the one highlighted when the menu is first displayed |
Two ways to mark an item: the @BAR:cmd@ ... @BAR@ pair can surround anything that is displayed on one row, including Ctrl-A codes and other @-codes, which makes it the form to use in a menu converted from ANSI art. The single-code form is more convenient in a hand-written menu, but an @-code cannot contain a space, so its text uses underscores where spaces are to be displayed.
Rows: an item occupies one row of the screen. For an item that is more than one row tall, mark each of its rows with the same cmd; the rows are highlighted and chosen together.
Command: cmd is what the module receives when the item is chosen: normally the item's command key, though it may be more than one character and may contain C-Text escape sequences.
Selected color: @BARATTR:attr@ may be placed anywhere in the file and applies to all of its items. Without it, a selected item is displayed in its own colors, reversed. A bright background (the E attribute) is only displayed for users who have iCE colors enabled in their terminal settings.
Command key color: a second attribute, @BARATTR:attr:key-attr@, names a foreground color for the command key of each item, so that an item written as a whole word in one color (e.g. MULTI-PLAYER) still shows which of its letters is the key. The key is the first place the item's cmd appears in its text; it is displayed in the key-attr color over the item's own background. The selected item is displayed entirely in the selected color. Use @BARATTR::key-attr@ to set the key color alone. Only single-character commands are colored, and like the highlight bar itself, the key color is drawn by the module (it is part of load/menubar.js), not when the file is merely displayed.
First item highlighted: the highlight bar normally starts on the first item in the file. @BARDEFAULT:cmd@ starts it on the item that returns cmd instead. Like @BARATTR@, the code displays nothing and may be placed anywhere in the file. A module may choose its own starting item, which then takes precedence, and when a menu is redisplayed the bar returns to the item the user last selected.
Mouse: each item is also a strict mouse hot-spot for its cmd, when mouse hot-spots are enabled and supported by the user's terminal.
Where: the menu files that replace the lists of the External Programs Section and the Text File Section are lightbar menus when they contain these codes. In other menu files the codes mark hot-spots only, unless the module displaying the file supports lightbars.
Module support: these codes only mark the items; the highlight bar itself is drawn by the module that displays the menu file. In a menu displayed by a module without lightbar support the codes display the item text and nothing more, so the menu still works by command key. The SyncDuke and SyncDOOM lobbies (xtrn/syncduke/lobby.msg and xtrn/syncdoom/lobby.msg) are stock examples. A JavaScript module adds lightbar navigation to a menu file it displays with the load/menubar.js library:
var bar = new (load({}, "menubar.js").MenuBar)(); console.clear(); console.printfile(system.text_dir + "menu/mymenu.msg", P_NOPAUSE); bar.refresh(); // find the items and highlight the first (or the file's default) one var key = bar.getkey("MSQ"); // arrow keys move the bar; returns M, S or Q
The marked items of the most recently displayed file(s) are also available to scripts as the console.bars array, the two @BARATTR colors as console.bar_attr and console.bar_hot_attr, and the @BARDEFAULT command as console.bar_default. They are forgotten when the screen is cleared.
Older versions: a Terminal Server older than v3.22 displays these codes as literal text.
C-Text
Some @-code parameters (e.g. ctext and strftime-formatted [:t]) support escape sequences similar to Escape sequences in C, e.g.:
| Sequence | Expands to |
|---|---|
\a | Alarm (BEL, Ctrl-G) |
\b | Backspace (Ctrl-H) |
\e | Escape (Ctrl-[) |
\f | Form-feed (Ctrl-L) |
\n | Line-feed (Ctrl-J) |
\r | Carriage-return (Ctrl-M) |
\t | Horizontal tab (Ctrl-I) |
\\ | \ |
\x03 | Cancel / End of text (Ctrl-C) |
\x20 | Space |
\x2D | - |
\x3A | : |
\x40 | @ |
\x7C | | |
Unicode
Only UTF-8 terminals support Unicode. For other terminals (TTY/ASCII, CP437, and PETSCII), an equivalent “fallback” character may be automatically available or when using the U+ @-codes, explicitly specified in the @-code itself.
The 'U+' @-code supports additional syntax to allow the sysop to specify the CP437 fallback character:
@U+<code>:<text>@: Send a Unicode character with specified fallback character sequence (string)@U+<code>,<char>@: Send a Unicode character with specified fallback character, in hexadecimal (specify0to send no character to non-UTF-8 terminals)@U+<code>!<char>@: Send a Unicode character with specified fallback character to be used only when no automatic fallback character is supported
Examples
| @-code | UTF-8 | CP437 | US-ASCII |
|---|---|---|---|
| WIDE:Test | Test | T e s t | T e s t |
| CHECKMARK | ✓ | √ | + |
| COPY | © | (C) | (C) |
| TRADEMARK | ™ | (TM) | (TM) |
| ELLIPSIS | … | ... | ... |
| U+20AC | € | ||
| U+20AC,24 | € | $ | $ |
| U+2265 | ≥ | ≥ | > |
| U+2265!a8 | ≥ | ≥ | > |
| U+2265,a8 | ≥ | ¿ | ? |
| U+1F609 | 😉 | ||
| U+1F609:;-) | 😉 | ;-) | ;-) |
External Content
The currently supported External Content @-codes:
| Code | Description |
|---|---|
| MENU:filename | Display a menu file from the text/menu directory |
| CONDMENU:filename | Display a menu file from the text/menu directory, only if it exists (conditionally) |
| TYPE:filename | Display a specific filename (may include specifiers) |
| INCLUDE:filename | Display a specific filename (may include specifiers) without a trailing CR/LF pair |
| EXEC:module | Execute an in-process module (Baja or JavaScript) from the exec directory. Parameters to be passed to the module may be specified by separating from module name and each other with '\x20'. |
| EXEC_XTRN:code | Execute an external online program (e.g. door) by specifying the internal code |
| SETSTR:str | Sets the current Baja/PCMS command string to str |
| STR | Display the current Baja/PCMS command string value (e.g. settable via bbs.command_str JavaScript property) |
| STRVAR:name | Display the contents of a Baja/PCMS command shell string variable, specify name in ALL-CAPS unless baja -c was used4) |
| OPTEXT | Display the value of the bbs.optext JavaScript property |
| JS:name | Display the value of a named JavaScript property in the global namespace or the JavaScript scope object passed to the console.printfile() or bbs.menu() JavaScript methods |
| TEXT:number | Display the specified string number from the ctrl/text.dat file. |
| Text-ID | Any text string ID (e.g. from the ctrl/text.dat file) can be specified via an @-code |
See Also
- SAUCE (source of FILE_AUTHOR and FILE_GROUP)