This is an old revision of the document!
Table of Contents
@-codes
Synchronet sysop-posted messages, text and menu files, and some lines in the ctrl/text.dat
file may contain special variables called @-codes (“at codes”, some BBS authors and sysops refer to these types of codes as “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
letters.
Some of the @-codes supported in Synchronet have unusual names or aliases specifically for PCBoard and/or Wildcat! BBS Software compatibility.
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. Only one format modifier may be used per @-code instance; you cannot combine format modifiers.
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) |
-> | 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 take an argument value, preceded by a colon (:
) character cannot be used with format modifiers.
System Information
The currently supported System Information @-codes are:
Code | Aliases | Description |
---|---|---|
BBS | BOARDNAME | Name of BBS |
COMPILER | Compiler used to build Synchronet | |
CONF | Name of current Group and Sub-board | |
CONFNUM | Number of current Group and Sub-board (separated by a space) | |
CONN | Connection description (modem type, “Telnet”, “RLogin”, etc.) | |
COPYRIGHT | Synchronet copyright details | |
DATE | SYSDATE | Current system date (in “DD/MM/YY” or “MM/DD/YY” format) |
DATEFMT | Date display/input format: “DD/MM/YY” or “MM/DD/YY” | |
DATETIME | Current system date and time (in 24-char long format) | |
DATETIMEZONE | Current system date and time and time-zone | |
DIR | Current file directory short description | |
DIRL | Current file directory long description | |
DN | Number of current file directory | |
DL | DN-L | “ ” padded and left justified (4 chars wide) |
DR | DN-R | “ ” padded and right justified (4 chars wide) |
EVENT | Date and time of next scheduled timed event | |
FIDOADDR | System's primary FidoNet address | |
FREESPACE | Free disk space available for uploads (in bytes) | |
FREESPACEK | Free disk space available for uploads (in kilobytes) | |
FULL_VER | Synchronet full version number (e.g. “3.15a”) | |
GRP | Current message group short description | |
GRPL | Current message group long description | |
GN | Number of current message group | |
GL | GN-L | “ ” padded and left justified (4 chars wide) |
GR | GN-R | “ ” padded and right justified (4 chars wide) |
HOSTNAME | Server's hostname | |
INETADDR | System's Internet Address (as configured in SCFG) | |
JS_VER | JavaScript Library Version | |
LASTCALLERNODE | PREVON, LASTCALLERSYSTEM | Name of user last user to use the terminal server |
LIB | Current file library short description | |
LIBL | Current file library long description | |
LN | Number of current file library | |
LL | LN-L | “ ” padded and left justified (4 chars wide) |
LR | LN-R | “ ” padded and right justified (4 chars wide) |
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 | Number of current node | |
NODE### | Status of node number ### | |
NUMDIR | Number of current library and directory | |
OS_VER | Operating system type and version information | |
PLATFORM | Platform or operating system name (e.g. “win32”, “linux”) | |
QUESTION | Current Yes/No question being asked of the user | |
QWKID | 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 | |
SMB_AREA | Current message group and sub-board (short names) or Email for mail base |
|
SMB_AREA_DESC | Current message group and sub-board (long names) or Personal Email for mail base |
|
SMB_GROUP | Current message group name | |
SMB_GROUP_DESC | Current message group description (long name) | |
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 | |
MSG_NUM | Current message number | |
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_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_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_AGE | Current message age (e.g. in seconds, minutes, hours, etc.) | |
MSG_TIMEZONE | Current message time zone | |
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 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) | |
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_UPLOADER | Current file uploader (e.g. user name) | |
FILE_SIZE | Current file size (in bytes) | |
FILE_CREDITS | 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_DATE | Current file modification date | |
FILE_DATE_ULED | Current file upload date | |
FILE_DAT_DLED | Current file last download date | |
FILE_TIMES_DLED | Current file download count | |
STATS.LOGONS | NUMCALLS, TCALLS | Total logons during history of system |
STATS.LTODAY | Total logons today | |
STATS.TIMEON | Total time used during history of system (in minutes) | |
STATS.TTODAY | Total time used today (in minutes) | |
STATS.ULS | Total uploads today | |
STATS.ULB | Total bytes uploaded today | |
STATS.DLS | Total download today | |
STATS.DLB | 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 | |
SUB | Current message sub-board short description | |
SUBL | Current message sub-board long description | |
SN | Number of current message sub-board | |
SL | SN-L | “ ” padded and left justified (4 chars wide) |
SR | SN-R | “ ” padded and right justified (4 chars wide) |
SYSOP | Name of System Operator | |
TFILE | Total number of files on system | |
TIME | SYSTIME | Current system time |
TIMEZONE | Current system time zone abbreviation or UTC offset | |
TMSG | Total number of messages on system | |
TNODE | Total number of Terminal Server nodes | |
TUSER | Total number of currently active registered users | |
UPTIME | Synchronet uptime details | |
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 |
User Information
The currently supported User Information @-codes are:
Code | Aliases | Description |
---|---|---|
ADDR1 | User's street address | |
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 |
BDATE | User's birth date (in “MM/DD/YY” or “DD/MM/YY” format) | |
BYTELIMIT | User's free credits per day | |
BYTESLEFT | User's total credits | |
CALLS | NUMTIMESON | Total number of logons for user |
CITY | User's city | |
COMPANY | MEMO2 | User's company name or real name |
DAYBYTES | Number of free credits used today by user | |
DLBYTES | Total bytes downloaded by user | |
DLFILES | DOWNS | Total files downloaded by user |
DLKLIMIT | User's total credits (in kilobytes) | |
DOWNK | Total kilobytes downloaded by user | |
EMAILADDR | User's Internet e-mail address on your system | |
EXPDATE | EXDATE | User's expiration date (in “MM/DD/YY” or “DD/MM/YY” format) |
EXPDAYS | Days left before user expires | |
FIRST | First word of user's alias | |
FIRSTREAL | REAL | First word of user's real name |
FROM | User's location (e.g. “City, State”) | |
HANDLE | User's chat handle | |
HOST | CPU | Client's hostname |
IP | CID, MEMO1 | Client's IP address or Caller-ID information |
LAST | Last word of user's alias | |
LASTDATEON | Date of user's last logon (in “MM/DD/YY” or “DD/MM/YY” format) | |
LASTNEW | Date of user's last new file scan (in “MM/DD/YY” or “DD/MM/YY” format) | |
LASTON | Date and time of user's last logon | |
LASTTIMEON | Time of user's last logon (in “HH:MM am” format) | |
LASTREAL | Last word of user's real name | |
KBLEFT | User's total credits (in kilobytes) | |
KBLIMIT | DLKLIMIT, MAXDK | User's free credits per day (in kilobytes) |
MAILW | Number of mail messages waiting for current user (includes SPAM) | |
MAILW:x | MAILW#x | Number of mail messages waiting for current 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 current user number x |
MEMO | Date of user's last password modification | |
MSGLEFT | MSGSLEFT | Total number of messages posted by user |
MSGREAD | Number of messages read by user this call | |
NEWFILETIME | Date and time of user's last new file scan (see LASTNEW) | |
PAGER | Chat pager enabled status (e.g. “On” or “Off”) | |
PHONE | HOMEPHONE, DATA, DATAPHONE | Users's phone number |
SEC | SECURITY | User's security level (0-99) |
SINCE | Date of user's first call (in “MM/DD/YY” or “DD/MM/YY” format) | |
SPAMW | Number of SPAM messages waiting | |
SPAMW:x | SPAMW#x | Number of SPAM messages waiting for user number x |
SPLITP | Split-screen private chat enabled status (e.g. “On” or “Off”) | |
STATE | User's state (from location) | |
TIMELEFT | MINLEFT | User's time left in minutes |
TIMELIMIT | Maximum time per call in minutes | |
TIMEON | TIMEUSED | Time used this call in minutes |
TLEFT | Time left (in “H:MM:SS” format) | |
TPERC | Time allowed per call (in “H:MM:SS” format) | |
TPERD | Time allowed per day (in “H:MM:SS” format) | |
TUSED | Time used this call (in “H:MM:SS” format) | |
UPBYTES | Total bytes uploaded by user | |
UPFILES | UPS | Total files uploaded by user |
UPK | Total kilobytes uploaded by user | |
USERNUM | User's number (1-based index into user database) | |
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 |
CLS | Clear the screen | |
CLEAR | Clear the screen and eat the next newline sequence | |
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 ) |
|
EOF | End-of-file (stop parsing/displaying) | |
PAUSE | MORE | Force a screen pause (hit a key) prompt |
PON | AUTOMORE | Toggle automatic screen pause on |
POFF | NOPAUSE | Toggle automatic screen pause off |
RESETPAUSE | Reset the automatic screen pause line counter | |
DELAY:n | Wait n 10ths of a second before continuing | |
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 | Move cursor to column x (1-based) | |
HOME | Home cursor (to upper left), don't clear | |
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 | |
COLS | Number of terminal columns | |
ROWS | Number of terminal rows | |
TERM | Terminal-type name (i.e. 'ANSI', 'RIP', 'PETSCII', or 'DUMB') | |
CHARSET | Terminal character set supported (i.e. 'UTF-8', 'CP437', 'PETSCII', or 'US-ASCII') | |
WORDWRAP | Word-wrap the the following text | |
WRAPOFF | Mark the end of a word-wrapped text block | |
CENTER | Middle-align the remaining text on the line | |
SYSONLY | Toggle off/on visibility for non-sysops | |
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 supported2) | |
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 |
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 (specify0
to 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 |
EXEC_XTRN:code | Execute an external online program (e.g. door) by specifying the internal code |
SETSTR:str | Sets the current Baja command string to str |