Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
custom:atcodes [2019/09/20 01:47] – Added FILESIZE, FILEBYTES, FILEKB, FILEMB, and FILEGB digital mancustom:atcodes [2020/05/29 00:14] – [See Also] Added ctrl-a codes link nelgin
Line 1: Line 1:
-====== @-codes ======+====== Message Variables (@-codes======
  
-Synchronet sysop-posted messages, text and menu files, and some lines in the ''[[dir: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"((and not because of the defunct phone company))). @-codes may also be displayed using the ''bbs.atcode()'' JavaScript method.+Synchronet sysop-posted messages, text and menu files, and some lines in the ''[[dir: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 "MCI codes"((and not because of the defunct phone company))). @-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.+@-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 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.+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 [[custom:colors|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. Synchronet also, optionally, supports some [[custom:colors|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.
Line 20: Line 20:
 ==== Format Modifiers ==== ==== 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 instanceyou cannot combine 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 arguments (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 arguments (separated from the code with a colon) **are** supported.
  
 ^ Modifier ^ Purpose ^ ^ Modifier ^ Purpose ^
-| ''-L''   | Pad and left-justify an expanded @-code | +| ''L''   | Pad and left-justify an expanded @-code | 
-| ''-R''   | Pad and right-justify an expanded @-code | +| ''R''   | Pad and right-justify an expanded @-code | 
-| ''-C''   | Pad and center an expanded @-code (added in v3.17b) | +| ''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 | +| ''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) | +| ''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) |+| ''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) | 
 +| ''>''   | Allow the terminal to wrap (don't truncate) overly-long expanded @-codes (added in v3.17c) |
  
 === Width Specificity === === Width Specificity ===
Line 34: Line 40:
 A string //width//, specified as a positive decimal number, may immediately follow a format modifier. 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.+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.  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).+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 === === Truncation ===
Line 44: Line 50:
 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). 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.+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 === === Exceptions ===
-@-codes that take an argument value, preceded by a colon ('':'') character cannot be used with format modifiers.+@-codes that take an argument value, preceded by a colon ('':'') charactercannot be used with format modifiers when using the hyphen (-) modifier separator; use the pipe (|) modifier separator instead.
 ===== System Information ===== ===== System Information =====
  
Line 232: Line 238:
 |CALLS        |NUMTIMESON      |Total number of logons for user | |CALLS        |NUMTIMESON      |Total number of logons for user |
 |CITY                        |User's city |                                      |CITY                        |User's city |                                     
-|COMPANY      |MEMO2           |User's company name or real name |+|CREDITS                     |Total unspent credits the user has earned |
 |DAYBYTES                    |Number of free credits used today by user | |DAYBYTES                    |Number of free credits used today by user |
 |DLBYTES      |                |Total bytes downloaded by user | |DLBYTES      |                |Total bytes downloaded by user |
Line 239: Line 245:
 |DOWNK        |                |Total kibibytes downloaded by user | |DOWNK        |                |Total kibibytes downloaded by user |
 |EMAILADDR    |                |User's Internet e-mail address on your system | |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      |EXDATE          |User's expiration date (in "MM/DD/YY" or "DD/MM/YY" format) | |EXPDATE      |EXDATE          |User's expiration date (in "MM/DD/YY" or "DD/MM/YY" format) |
 |EXPDAYS      |                |Days left before user expires | |EXPDAYS      |                |Days left before user expires |
 +|FBACKS                      |Number of feedback messages sent by user |
 |FIRST        |                |First word of user's alias                     | |FIRST        |                |First word of user's alias                     |
 +|FIRSTON      |                |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                 | |FIRSTREAL    |REAL            |First word of user's real name                 |
 |FROM                        |User's location (e.g. "City, State"                | |FROM                        |User's location (e.g. "City, State"                |
 +|FREECDT        |                |User's remaining freely-awarded (unearned) credits for today         |
 |HANDLE                        |User's chat handle                              | |HANDLE                        |User's chat handle                              |
 |HOST           |CPU             |Client's hostname | |HOST           |CPU             |Client's hostname |
Line 251: Line 264:
 |LASTNEW        |                |Date of user's last new file scan (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              | |LASTON                        |Date and time of user's last logon              |
-|LASTTIMEON                    |Time of user's last logon (in "HH:MM am" format) |+|LASTTIMEON                    |Time of user's last logon (in "HH:MM am" or "HH:MM:SS" format) |
 |LASTREAL                      |Last word of user's real name                   | |LASTREAL                      |Last word of user's real name                   |
 +|LTODAY                        |Number of times user has logged on today |
 |KBLEFT                        |User's total credits (in kibibytes)             | |KBLEFT                        |User's total credits (in kibibytes)             |
 |KBLIMIT        |DLKLIMIT, MAXDK |User's free credits per day (in kibibytes)      | |KBLIMIT        |DLKLIMIT, MAXDK |User's free credits per day (in kibibytes)      |
Line 259: Line 273:
 |MAILP        |                |Number of pending mail messages sent by current user| |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// | |MAILP://x//  |MAILP#//x//         |Number of pending mail messages sent by current user number //x// |
 +|MAXCALLS                    |Maximum number of calls/logons per day allowed 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      |                |Minutes banked by user |
 +|MEXTRA                      |Extra time earned today, in minutes |
 +|MPERC        |TIMELIMIT       |Minutes allowed per call/logon |
 +|MPERD        |                |Minutes allowed per day |
 |MSGLEFT      |MSGSLEFT        |Total number of messages posted by user | |MSGLEFT      |MSGSLEFT        |Total number of messages posted by user |
 |MSGREAD      |                |Number of messages read by user this call | |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) | |NEWFILETIME  |                |Date and time of user's last new file scan (see LASTNEW) |
 |PAGER        |                |Chat pager enabled status (e.g. "On" or "Off")| |PAGER        |                |Chat pager enabled status (e.g. "On" or "Off")|
 +|PCR          |                |User's post/call ratio (0-100) |
 |PHONE        |HOMEPHONE, DATA, DATAPHONE |Users's phone number | |PHONE        |HOMEPHONE, DATA, DATAPHONE |Users's phone number |
 +|PTODAY                      |Number of messages posted by user today |
 |PWAGE        |                |Age (in days) of the current user's password | |PWAGE        |                |Age (in days) of the current user's password |
 |PWDATE       |MEMO            |Date of user's last password modification (in "MM/DD/YY" or "DD/MM/YY" format) | |PWDATE       |MEMO            |Date of user's last password modification (in "MM/DD/YY" or "DD/MM/YY" format) |
 +|REALNAME     |COMPANY, MEMO2  |User's real name |
 |SEC          |SECURITY        |User's security level (0-99) |                           |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        |         |Number of SPAM messages waiting |
 |SPAMW://x//  |SPAMW#//x//  |Number of SPAM messages waiting for user number //x// | |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")| |SPLITP               |Split-screen private chat enabled status (e.g. "On" or "Off")|
 |STATE        |         |User's state (from location)| |STATE        |         |User's state (from location)|
 +|TBANKED      |         |Banked time in HH:MM format |
 +|TEXTRA               |Extra time earned by user, in H:MM format |
 +|TLAST        |         |Time used by user during last logon |
 |TIMELEFT     |MINLEFT  |User's time left in minutes | |TIMELEFT     |MINLEFT  |User's time left in minutes |
-|TIMELIMIT    |         |Maximum time per call in minutes|  
 |TIMEON       |TIMEUSED |Time used this call in minutes| |TIMEON       |TIMEUSED |Time used this call in minutes|
 |TLEFT        |         |Time left (in "H:MM:SS" format)|  |TLEFT        |         |Time left (in "H:MM:SS" format)|
 |TPERC        |         |Time allowed per call (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) |  |TPERD        |         |Time allowed per day (in "H:MM:SS" format) |
 +|TTODAY               |Time used by user today (in "H:MM format) |
 +|TTOTAL               |Total time used by user for all previous calls/logons (in "HH:MM" format) |
 |TUSED        |         |Time used this call (in "H:MM:SS" format) |  |TUSED        |         |Time used this call (in "H:MM:SS" format) |
 |UPBYTES      |         |Total bytes uploaded by user | |UPBYTES      |         |Total bytes uploaded by user |
Line 294: Line 324:
 |BEEP            |BELL    |Generate a beep sound on the user's terminal | |BEEP            |BELL    |Generate a beep sound on the user's terminal |
 |CLS                    |Clear the screen  | |CLS                    |Clear the screen  |
-|CLEAR                  |Clear the screen and eat the next newline sequence |+|CLEAR                  |Clear the screen, all existing mouse hot-spots and eat the next newline sequence 
 +|CLEAR_HOT              |Clear all existing mouse hot-spots | 
 +|HOT                    |Define a new mouse hot-spot color (the color of the @-code defines the hot-spot attributes) | 
 +|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) | 
 +|~//text//              |Define a single hungry hot-spot (where the displayed text and command keys are the same) | 
 +|~//text//~//cmd// |      |Define a single hungry hot-spot with an alternate command to stuff in the keyboard input buffer | 
 +|`//text//              |Define a single strict hot-spot (where the displayed text and command keys are the same) | 
 +|`//text//`//cmd// |      |Define a single strict hot-spot with an alternate command to stuff in the keyboard input buffer |
 |CRLF            |        |Send a carriage return/line-feed pair   | |CRLF            |        |Send a carriage return/line-feed pair   |
 |CHECKMARK              |Send a check mark symbol appropriate for the user's terminal | |CHECKMARK              |Send a check mark symbol appropriate for the user's terminal |
Line 319: Line 358:
 |GOTOXY://x,y//  |        |Move cursor to //x/////y// coordinate (1-based) | |GOTOXY://x,y//  |        |Move cursor to //x/////y// coordinate (1-based) |
 |POS://x//              |Move cursor to column //x// (1-based) | |POS://x//              |Move cursor to column //x// (1-based) |
-|HOME            |        |Home cursor (to upper left), don't clear|+|HOME            |        |Home cursor (to upper left), don't clear the screen |
 |CLRLINE                |Clear the current line (cursor to first column)| |CLRLINE                |Clear the current line (cursor to first column)|
 |CLR2EOL                |Clear to end of line (cursor doesn't move)| |CLR2EOL                |Clear to end of line (cursor doesn't move)|
Line 377: Line 416:
 |EXEC:module      |Execute an in-process module (Baja or JavaScript) from the ''[[dir:exec]]'' directory| |EXEC:module      |Execute an in-process module (Baja or JavaScript) from the ''[[dir:exec]]'' directory|
 |EXEC_XTRN:code   |Execute an external online program (e.g. door) by specifying the internal code| |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//|+|SETSTR:str       |Sets the current Baja/PCMS command string to //str//
 +|STR              |Display the current Baja/PCMS command string value |\ 
 +|STRVAR:name      |Display the contents of a Baja/PCMS command shell string variable, specify //name// in ALL-CAPS unless ''baja -c'' was used((this feature only works for variables defined in command shells)) | 
 +|JS:name          |Display the value of a named JavaScript property |
  
 ===== See Also ===== ===== See Also =====
   * [[custom:menu_files|Menu Files]]   * [[custom:menu_files|Menu Files]]
   * [[custom:|Customization]]   * [[custom:|Customization]]
 +  * [[custom:ctrl-a_codes]]
   * [[http://synchro.net/docs/customization.html#MessageVariables|Old documentation of this feature (stale)]]   * [[http://synchro.net/docs/customization.html#MessageVariables|Old documentation of this feature (stale)]]
  
 {{tag>customization}} {{tag>customization}}
  
custom/atcodes.txt · Last modified: 2024/01/25 14:03 by digital man
Back to top
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0