/******************************************************************************
* This file is part of TinTin++ *
* *
* Copyright 2004-2020 Igor van den Hoven *
* *
* TinTin++ is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with TinTin++. If not, see https://www.gnu.org/licenses. *
******************************************************************************/
/******************************************************************************
* T I N T I N + + *
* *
* coded by Igor van den Hoven 2004 *
******************************************************************************/
#include "tintin.h"
struct help_type
{
char * name;
int type;
char * text;
char * also;
};
struct help_type help_table[];
size_t help_size();
int find_help(char *keyword)
{
unsigned int bot, mid, top;
bot = 0;
top = help_size();
while (top > 1)
{
mid = top / 2;
if (is_abbrev_cmp(keyword, help_table[bot + mid].name) >= 0)
{
bot += mid;
}
top -= mid;
}
if (!is_abbrev_cmp(keyword, help_table[bot].name))
{
return bot;
}
show_error(gtd->ses, LIST_COMMAND, "find_help: Could not find '%s' in help_table.", keyword);
return help_size();
}
char *help_related(struct session *ses, int index, int html)
{
char *arg, *tmp, *link;
static char buf[INPUT_SIZE];
int hlp;
push_call("help_related(%p,%d,%d)",ses,index,html);
tmp = str_alloc_stack(0);
link = str_alloc_stack(0);
arg = help_table[index].also;
buf[0] = 0;
while (*arg)
{
arg = get_arg_in_braces(ses, arg, tmp, GET_ONE);
if (html == 1)
{
sprintf(link, "\\c%s\\c", tmp, tmp);
}
else if (html == 2)
{
sprintf(link, "\\c%s\\c", capitalize(tmp), tmp);
}
else if (html == 3)
{
hlp = find_help(tmp);
if (hlp == help_size())
{
printf("error: unknown help entry: %s see also: %s\n", help_table[index].name, tmp);
}
if (help_table[hlp].type != TOKEN_TYPE_STRING)
{
sprintf(link, "\\c%s\\c", capitalize(tmp), tmp);
}
else
{
sprintf(link, "\\c%s\\c", capitalize(tmp), tmp);
}
}
else if (HAS_BIT(gtd->flags, TINTIN_FLAG_MOUSETRACKING))
{
sprintf(link, "\e]68;6;;%s\a\e[4m%s\e[24m", tmp, tmp);
}
else
{
strcpy(link, tmp);
}
if (*buf == 0)
{
sprintf(buf, "<178>Related<278>: %s", link);
}
else
{
if (*arg)
{
cat_sprintf(buf, ", %s", link);
}
else
{
cat_sprintf(buf, " and %s.", link);
}
}
}
pop_call();
return buf;
}
DO_COMMAND(do_help)
{
char buf[BUFFER_SIZE], color[COLOR_SIZE], tmp[INPUT_SIZE];
int cnt, tut, found, rows, cols, size, col, row;
arg = get_arg_in_braces(ses, arg, arg1, GET_ALL);
if (*arg1 == 0)
{
tintin_header(ses, 0, " %s ", "HELP");
*buf = 0;
size = help_size();
rows = UMAX(1, ses->wrap / 16);
cols = size / rows + (size % rows > 0);
for (cnt = col = 0 ; col < cols ; col++)
{
if (!HAS_BIT(ses->config_flags, CONFIG_FLAG_SCREENREADER))
{
cnt = col;
}
for (row = 0 ; row < rows ; row++)
{
switch (help_table[cnt].type)
{
case TOKEN_TYPE_STATEMENT:
// strcpy(color, COLOR_STATEMENT);
// break;
case TOKEN_TYPE_CONFIG:
// strcpy(color, COLOR_CONFIG);
// break;
case TOKEN_TYPE_COMMAND:
strcpy(color, COLOR_COMMAND);
break;
case TOKEN_TYPE_STRING:
strcpy(color, COLOR_STRING);
break;
default:
strcpy(color, "");
break;
}
if (HAS_BIT(gtd->flags, TINTIN_FLAG_MOUSETRACKING))
{
cat_sprintf(buf, "\e]68;6;;%s\a\e[4m%s%s\e[24m%.*s", help_table[cnt].name, color, help_table[cnt].name, 16 - (int) strlen(help_table[cnt].name), " ");
}
else
{
cat_sprintf(buf, "%s%-16s", color, help_table[cnt].name);
}
cnt += HAS_BIT(ses->config_flags, CONFIG_FLAG_SCREENREADER) ? 1 : cols;
if (row + 1 == rows || cnt >= size)
{
print_lines(ses, SUB_COL, "", "<088>%s<088>\n", buf);
*buf = 0;
break;
}
}
}
if (*buf)
{
print_lines(ses, SUB_COL, "", "<088>%s<088>\n", buf);
}
tintin_header(ses, 0, "");
}
else if (!strcasecmp(arg1, "dump"))
{
// help
FILE *logfile = fopen("../docs/help.html", "w");
script_driver(ses, LIST_COMMAND, "#config {log} {html}");
if (HAS_BIT(ses->log->mode, LOG_FLAG_HTML))
{
write_html_header(ses, logfile);
}
*buf = 0;
command(ses, do_function, "clink {#format result {%%+%%1h} {%%2};#replace result {#} { };#replace result {%%2} {\\c%%2\\c}}");
command(ses, do_line, "log {../docs/help.html} {<138> ╭──────────────────────────────────────────────────────────────────────╮}");
command(ses, do_line, "log {../docs/help.html} {<138> │@clink{70;Home;index.html}│}");
command(ses, do_line, "log {../docs/help.html} {<138> ╰──────────────────────────────────────────────────────────────────────╯\n}");
fseek(logfile, 0, SEEK_END);
size = help_size();
rows = 4;
cols = size / rows + (size % rows > 0);
for (cnt = col = 0 ; col < cols ; col++)
{
cnt = col;
for (row = 0 ; row < rows ; row++)
{
filename_string(help_table[cnt].name, tmp);
cat_sprintf(buf, " \\c%-16s\\c ", tmp, help_table[cnt].name);
cnt += cols;
if (row + 1 == rows || cnt >= size)
{
substitute(ses, buf, buf, SUB_ESC|SUB_COL);
logit(ses, " ", logfile, 0);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
*buf = 0;
break;
}
}
}
cat_sprintf(buf, "\n\n");
substitute(ses, buf, buf, SUB_ESC|SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
for (cnt = 0 ; *help_table[cnt].name != 0 ; cnt++)
{
filename_string(help_table[cnt].name, tmp);
sprintf(buf, "\\c\\c\n", tmp);
substitute(ses, buf, buf, SUB_ESC|SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
sprintf(buf, "<138> %s\n", help_table[cnt].name);
substitute(ses, buf, buf, SUB_ESC|SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
substitute(ses, help_table[cnt].text, buf, SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
if (*help_table[cnt].also)
{
substitute(ses, help_related(ses, cnt, 2), buf, SUB_ESC|SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
}
}
fclose(logfile);
// tutorial
int tutorial[size];
logfile = fopen("../docs/tutorial.html", "w");
if (HAS_BIT(ses->log->mode, LOG_FLAG_HTML))
{
write_html_header(ses, logfile);
}
command(ses, do_line, "log {../docs/tutorial.html} {<138> ╭──────────────────────────────────────────────────────────────────────╮}");
command(ses, do_line, "log {../docs/tutorial.html} {<138> │@clink{70;Home;index.html}│}");
command(ses, do_line, "log {../docs/tutorial.html} {<138> ╰──────────────────────────────────────────────────────────────────────╯\n}");
fseek(logfile, 0, SEEK_END);
tut = 2;
for (cnt = 0 ; cnt < size ; cnt++)
{
if (help_table[cnt].type != TOKEN_TYPE_STRING)
{
continue;
}
if (is_abbrev("INDEX", help_table[cnt].name))
{
tutorial[0] = cnt;
}
else if (is_abbrev("INTRODUCTION", help_table[cnt].name))
{
tutorial[1] = cnt;
}
else
{
tutorial[tut++] = cnt;
}
}
size = tut;
rows = 4;
cols = size / rows + (size % rows > 0);
*buf = 0;
for (cnt = col = 0 ; col < cols ; col++)
{
cnt = col;
for (row = 0 ; row < rows ; row++)
{
tut = tutorial[cnt];
filename_string(help_table[tut].name, tmp);
cat_sprintf(buf, " \\c%-16s\\c ", tmp, help_table[tut].name);
cnt += cols;
if (row + 1 == rows || cnt >= size)
{
substitute(ses, buf, buf, SUB_ESC|SUB_COL);
logit(ses, " ", logfile, 0);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
*buf = 0;
break;
}
}
}
cat_sprintf(buf, "\n\n");
substitute(ses, buf, buf, SUB_ESC|SUB_COL);
logit(ses, " ", logfile, 0);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
for (cnt = 0 ; cnt < size ; cnt++)
{
tut = tutorial[cnt];
filename_string(help_table[tut].name, tmp);
sprintf(buf, "\\c\\c\n", tmp);
substitute(ses, buf, buf, SUB_ESC|SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
sprintf(buf, "<138> %s\n", help_table[tut].name);
substitute(ses, buf, buf, SUB_ESC|SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
substitute(ses, help_table[tut].text, buf, SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
if (*help_table[tut].also)
{
substitute(ses, help_related(ses, tut, 3), buf, SUB_ESC|SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
}
}
fclose(logfile);
}
else if (!strcasecmp(arg1, "dump.php"))
{
FILE *logfile;
script_driver(ses, LIST_COMMAND, "#config {log} {html}");
*buf = 0;
for (cnt = 0 ; *help_table[cnt].name != 0 ; cnt++)
{
filename_string(help_table[cnt].name, arg1);
lowerstring(arg1);
sprintf(buf, "../../manual/%s.php", arg1);
logfile = fopen(buf, "w");
fprintf(logfile, " %s\n", help_table[cnt].name);
substitute(ses, buf, buf, SUB_ESC|SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
}
substitute(ses, help_table[cnt].text, buf, SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
if (*help_table[cnt].also)
{
substitute(ses, help_related(ses, cnt, 1), buf, SUB_ESC|SUB_COL);
logit(ses, buf, logfile, LOG_FLAG_LINEFEED);
}
fprintf(logfile, "\n\t\");\n\n");
fprintf(logfile, "\tshow_tail();\n?>\n");
fclose(logfile);
}
}
else
{
for (cnt = 0 ; *help_table[cnt].name != 0 ; cnt++)
{
if (is_abbrev(arg1, help_table[cnt].name))
{
if (!check_all_events(ses, EVENT_FLAG_CATCH, 1, 0, "CATCH HELP %s", help_table[cnt].name))
{
print_lines(ses, SUB_COL, "", /*COLOR_HELP_DIM,*/ "%s<088>\n", help_table[cnt].text);
}
if (*help_table[cnt].also)
{
print_lines(ses, SUB_COL, "", "%s<088>\n\n", help_related(ses, cnt, 0));
}
return ses;
}
}
found = FALSE;
for (cnt = 0 ; *help_table[cnt].name != 0 ; cnt++)
{
if (match(ses, help_table[cnt].name, arg1, SUB_VAR|SUB_FUN))
{
print_lines(ses, SUB_COL, "", /*COLOR_HELP_DIM,*/ "%s<088>\n", help_table[cnt].text);
if (*help_table[cnt].also)
{
print_lines(ses, SUB_COL, "", "%s<088>\n\n", help_related(ses, cnt, 0));
}
found = TRUE;
}
}
if (found == FALSE)
{
show_message(ses, LIST_COMMAND, "#HELP: NO MATCHES FOUND FOR {%s}.", arg1);
}
}
return ses;
}
struct help_type help_table[] =
{
{
"ACTION",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #action <178>{<278>message<178>} {<278>commands<178>} {<278>priority<178>}\n"
"\n"
"<278> The #action command can be used to respond with one or several\n"
"<278> commands to a specific message sent by the server. The %1-%99\n"
"<278> variables are substituted from the message and can be used in the\n"
"<278> command part of the action.\n"
"\n"
"<278> If the message starts with a ~ color codes must be matched. You can\n"
"<278> enable #config {convert meta} on to display meta characters.\n"
"\n"
"<278> For more information on pattern matching see the section on PCRE.\n"
"\n"
"<178>Example<278>: #action {%1 tells you '%2'} {tell %1 I'm afk.}\n"
"\n"
"<278> Actions can be triggered by the #show command. If you don't want a\n"
"<278> #show to get triggered use: #line ignore #show {text}\n"
"\n"
"<278> Actions are ordered alphabetically and only one action can trigger at\n"
"<278> a time. To change the order you can assign a priority, which defaults\n"
"<278> to 5, with a lower number indicating a higher priority. The priority\n"
"<278> can be a floating point number and should be between 1 and 9.\n"
"\n"
"<278> To remove an action with %* as the message, use #unaction {%%*} or\n"
"<278> #unaction {\\%*}. Alternatively you could wrap the action inside a\n"
"<278> class, and kill that class when you no longer need the action.\n"
"\n"
"<178>Comment<278>: You can remove an action with the #unaction command.\n"
,
"pcre gag highlight prompt substitute"
},
{
"ALIAS",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #alias <178>{<278>name<178>} {<278>commands<178>} {<278>priority<178>}\n"
"\n"
"<278> The #alias command can be used to shorten up long or oftenly used\n"
"<278> commands. The %1-99 variables are substituted from the arguments when\n"
"<278> using an alias and represent the 1st till 99th word which can be used\n"
"<278> in the commands part of the alias. If %0 is used it will contain all\n"
"<278> arguments. The priority part is optional and determines the priority\n"
"<278> of the alias, it defaults to 5.\n"
"\n"
"<278> If no % variable is used in the commands section any argument will be\n"
"<278> appended to the end as if %0 was used. This feature might be removed\n"
"<278> in the future, and shouldn't be used.\n"
"\n"
"<178>Example<278>: #alias {k} {kill %1;kick}\n"
"\n"
"<278> Typing 'k orc' would result in attacking the orc followed by a kick.\n"
"\n"
"<278> You can create multi-word aliases by using variables in the name\n"
"<278> section.\n"
"\n"
"<178>Example<278>: #alias {k %1 with %2} {draw %2;attack %1;slash %1 with %2;\n"
"<278> kick at %2;strike %1 with %2}\n"
"\n"
"<278> Using the above alias you could type k blue smurf with battle axe\n"
"\n"
"<278> To have an alias that matches all user input, use %* as the name.\n"
"\n"
"<178>Example<278>: #alias {%*} {#show You wrote: %0}\n"
"\n"
"<278> Aliases are ordered alphabetically and only one alias can trigger at\n"
"<278> a time. To change the order you can assign a priority, which defaults\n"
"<278> to 5, with a lower number indicating a higher priority. The priority\n"
"<278> can be a floating point number.\n"
"\n"
"<278> To remove an alias with %* as the name, use #unalias {%%*} or #unalias\n"
"<278> {\\%*}. Alternatively you can wrap the alias inside a class, and kill\n"
"<278> that class when you no longer need the alias.\n"
"\n"
"<278> For more information on pattern matching see the section on PCRE.\n"
"\n"
"<178>Comment<278>: You can remove an alias with the #unalias command.\n"
,
"cursor history keypad macro speedwalk tab"
},
{
"ALL",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #all <178>{<278>string<178>}\n"
"\n"
"<278> If you have multiple sessions in one terminal you can use #all to\n"
"<278> execute the command with all sessions, excluding the startup session.\n"
"\n"
"<178>Example<278>: #all quit\n"
"\n"
"<278> Sends 'quit' to all sessions.\n"
,
"port run session sessionname snoop ssl zap"
},
{
"BELL",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #bell <178>{<278>flash<178>|<278>focus<178>|<278>margin<178>|<278>ring<178>|<278>volume<178>} {<278>argument<178>}\n"
"\n"
"<278> The #bell command without an argument will ring the terminal bell.\n"
"\n"
"<178>Example<278>: #action {Bubba tells you} {#bell}\n"
"\n"
"<278> If you aren't watching the screen this could be useful if you don't\n"
"<278> want to miss out on a conversation with Bubba. Alternatively you can\n"
"<278> use #system to play a sound file.\n"
"\n"
"<278> Some terminals will allow you to use VT100 Operating System Commands\n"
"<278> to change the terminal's bell behavior which can be used to flash the\n"
"<278> taskbar icon and or focus the window on receival of a bell.\n"
"\n"
"<178>Example<278>: #action {Bubba tells you} {#screen save title;#screen set title Tell!;\n"
"<278> #bell ring;#delay 10 #screen load title}\n"
"\n"
"<278> The above example will save your window title, change the title to\n"
"<278> 'Tell!', ring the bell, next reset the window title after 10 seconds.\n"
"\n"
"<278> It's possible to set the terminal to pop to the foreground upon\n"
"<278> ringing of the alarm bell.\n"
"\n"
"<178>Example<278>: #bell focus on;#bell ring;#bell focus off\n"
"\n"
"<278> It's possible to adjust the alarm bell volume on some terminals.\n"
"\n"
"<178>Example<278>: #loop {1} {8} {cnt} {#line substitute variables\n"
"<278> #delay {$cnt} {#show Volume $cnt: #bell volume $cnt;#bell}\n"
,
"screen"
},
{
"BREAK",
TOKEN_TYPE_STATEMENT,
"<178>Command<278>: #break\n"
"\n"
"<278> The break command can be used inside the #else, #elseif, #if, #foreach,\n"
"<278> #loop, #parse, #switch, and #while statements. When #break is found,\n"
"<278> tintin will stop executing the statement it is currently in and move on\n"
"<278> to the next.\n"
"\n"
"<178>Example<278>: #while {1} {#math cnt $cnt + 1;#if {$cnt == 20} {#break}}\n",
"statements"
},
{
"BUFFER",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #buffer <178>{<278>option<178>} {<278>argument<178>}\n"
"\n"
"<278> The buffer command has various options to manipulate your scrollback\n"
"<278> buffer.\n"
"\n"
"<278> The size of the scrollback buffer can be configured using #config\n"
"<278> buffer_size . The size must be either 100, 1000, 10000, 100000\n"
"<278> or 1000000 lines.\n"
"\n"
"<278> While scrolling through the scrollback buffer incoming text is not\n"
"<278> displayed, this can be disabled using #config scroll_lock off. The\n"
"<278> scroll lock is automatically disabled when manual input is received,\n"
"<278> subsequently #buffer up and down only work properly when used in a\n"
"<278> macro or mouse event.\n"
"\n"
"<278> <178>#buffer {clear} {[lower bound]} {[upper bound]}\n"
"\n"
"<278> Without an argument this will clear the entire scrollback buffer.\n"
"<278> Otherwise it will clear the given range.\n"
"\n"
"<278> Positive numbers are measured from the start of the scrollback buffer,\n"
"<278> negative numbers from the end.\n"
"\n"
"<278> <178>#buffer {down} [lines]\n"
"\n"
"<278> Moves your scrollback buffer down one page and displays the page. If\n"
"<278> a line number is provided it will scroll down the given number of\n"
"<278> lines.\n"
"\n"
"<278> <178>#buffer {end}\n"
"\n"
"<278> Moves you to the end of your scrollback buffer and displays the page.\n"
"<278> Disables scroll lock mode. Most useful when used in a #macro.\n"
"\n"
"<278> <178>#buffer {find} {[number]} {} {[variable]}\n"
"\n"
"<278> Moves the buffer to the given string which can contain a regular\n"
"<278> expression. Optionally you can provide the number of matches to skip,\n"
"<278> allowing you to jump further back in the buffer.\n"
"\n"
"<278> A positive number searches from the start of the buffer, a negative\n"
"<278> number from the end. If you provide a variable the location will be\n"
"<278> stored and no jump takes place.\n"
"\n"
"<278> <178>#buffer {get} {} {} {[upper bound]}\n"
"\n"
"<278> Allows you to store one or several lines from your scrollback buffer\n"
"<278> (including color codes) into a variable. The lower and upper bound\n"
"<278> must be between 1 and the size of the buffer. If the upper bound is\n"
"<278> omitted the given line is stored as a standard variable. If an upper\n"
"<278> bound is given the lines between the two bounds are stored as a list.\n"
"\n"
"<278> Positive numbers are measured from the start of the scrollback buffer,\n"
"<278> negative numbers from the end.\n"
"\n"
"<278> <178>#buffer {home}\n"
"\n"
"<278> Moves you to the top of your scrollback buffer and displays the page.\n"
"<278> Enables scroll lock mode. Most useful when used in a #macro.\n"
"\n"
"<278> <178>#buffer {info} {[save]} {[variable]}\n"
"\n"
"<278> Display buffer info, optionally save the data to a variable.\n"
"\n"
"<278> <178>#buffer {jump} {}\n"
"\n"
"<278> Moves the buffer to the given location. A positive number jumps from\n"
"<278> the start of the buffer, a negative number from the end.\n"
"\n"
"<278> <178>#buffer {lock} {on|off}\n"
"\n"
"<278> Toggles the lock on the scrollback buffer. When locked, newly incoming\n"
"<278> text won't be displayed, any command will disable the lock, though\n"
"<278> several buffer commands will re-enable the lock. When unlocking it'll\n"
"<278> move you to the end of your scrollback buffer and display the page.\n"
"\n"
"<278> <178>#buffer {refresh}\n"
"\n"
"<278> Marks the buffer as needing to be refreshed, only useful while in\n"
"<278> vertical split mode.\n"
"\n"
"<278> <178>#buffer {up} [lines]\n"
"\n"
"<278> Moves your scrollback buffer up one page and displays the page.\n"
"<278> Enables scroll lock mode. Most useful when used in a #macro. You\n"
"<278> can use #buffer {up} {1} to move the scrollback buffer up 1 line.\n"
"\n"
"<278> <178>#buffer {write} {}\n"
"\n"
"<278> Writes the scrollback buffer to the given file.\n"
"\n"
"<178>Example<278>: #macro {\\e[F} {#buffer end}\n"
,
"echo grep macro showme screen"
},
{
"BUTTON",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #button <178>{<278>square<178>} {<278>commands<178>} {<278>priority<178>}\n"
"\n"
"<278> The #button command can be used to respond with one or several\n"
"<278> commands to a mouse click received within the specified square.\n"
"<278> The click coordinates are stored in %0-%3 and can be used in the\n"
"<278> command part of the button.\n"
"\n"
"<278> The square part should exists of two coordinates defining the\n"
"<278> upper left and bottom right corner using row, col, row, col syntax.\n"
"<278> The square arguments should be separated by spaces, semi-colons or\n"
"<278> braces.\n"
"\n"
"<278> By default the button is set to respond to a mouse button press, to\n"
"<278> respond to other button presses you must add a 5th argument to the\n"
"<278> square that defines the button press type. You can enable #info\n"
"<278> button on to see button events and their type as they happen.\n"
"\n"
"<278> The priority part is optional and determines the priority of the\n"
"<278> button, it defaults to 5.\n"
"\n"
"<278> You must enable #config {mouse tracking} on for buttons to work.\n"
"\n"
"<278> This command draws no visible button, you'll have to do so separately\n"
"<278> if needed.\n"
"\n"
"<178>Example<278>: #button {1;1;2;2} {#show You clicked the upper left corner.}\n"
"\n"
"<278> Buttons are ordered alphabetically and only one button can trigger at\n"
"<278> a time. To change the order you can assign a priority, which defaults\n"
"<278> to 5, with a lower number indicating a higher priority. The priority\n"
"<278> can be a floating point number.\n"
"\n"
"<178>Comment<278>: To see button clicks trigger use #info button on.\n"
"\n"
"<178>Comment<278>: You can remove a button with the #unbutton command.\n"
,
"delay event ticker"
},
{
"CASE",
TOKEN_TYPE_STATEMENT,
"<178>Command<278>: #case <178>{<278>conditional<178>} {<278>arguments<178>}\n"
"\n"
"<278> The case command must be used within the #switch command. When the\n"
"<278> conditional argument of the case command matches the conditional\n"
"<278> argument of the switch command the body of the case is executed.\n"
"\n"
"<278> When comparing strings both the switch and case arguments must be\n"
"<278> surrounded in quotes.\n"
"\n"
"<178>Example<278>:\n"
"\n"
"<278> #function {reverse_direction}\n"
"<278> {\n"
"<278> #switch {\"%1\"}\n"
"<278> {\n"
"<278> #case {\"north\"} {#return south};\n"
"<278> #case {\"east\"} {#return west};\n"
"<278> #case {\"south\"} {#return north};\n"
"<278> #case {\"west\"} {#return east};\n"
"<278> #case {\"up\"} {#return down};\n"
"<278> #case {\"down\"} {#return up}\n"
"<278> }\n"
"<278> }\n"
"\n"
"<278> This function returns the reverse direction. @reverse_direction{north}\n"
"<278> would return south.\n"
,
"default match statements switch"
},
{
"CAT",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #cat <178>{<278>variable<178>} {<278>argument<178>}\n"
"\n"
"<278> The cat command will concatenate the argument to the given variable.\n"
,
"format function local math replace script variable"
},
{
"CHARACTERS",
TOKEN_TYPE_STRING,
"\n"
"<278> The following special characters are defined:\n"
"\n"
"<178># <278>The hashtag is the default character for starting a command and is\n"
"<278> subsequently known as the command character or tintin character.\n"
"<278> When loading a command file the command character is set to the\n"
"<278> first character in the file. The character can also be redefined\n"
"<278> using #config.\n"
"\n"
"<178>; <278>The semi-colon is used as the command separator and can be used to\n"
"<278> separate two commands. Multiple commands can be strung together as\n"
"<278> well. Trailing semi-colons are ignored when reading a script file\n"
"<278> as this is a common error.\n"
"\n"
"<178>{ } <278>Curly brackets aka braces are used for separating multi word command\n"
"<278> arguments, nesting commands, and nesting variables. Braces cannot\n"
"<278> easily be escaped and must always be used in pairs.\n"
"\n"
"<178>\" \" <278>Quote characters are used for strings in the #math, #if, #switch,\n"
"<278> and #case commands. It is however suggested to use a set of braces\n"
"<278> { } to define strings instead, particularly when checking strings\n"
"<278> that may contain quotes.\n"
"\n"
"<178>! <278>The exclamation sign is used to repeat commands, see #help history.\n"
"<278> The character can be redefined using #config.\n"
"\n"
"<178>\\ <278>An input line starting with a backslash is sent verbatim if you are\n"
"<278> connected to a server. This character can be configured with\n"
"<278> #config, and is itself sent verbatim when the verbatim config mode\n"
"<278> is enabled.\n"
,
"colors escape_codes function mathematics pcre variable"
},
{
"CHAT",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #chat <178>{<278>option<178>} {<278>argument<178>}\n"
"\n"
"<278> The #chat command is used to create peer to peer connections to other\n"
"<278> clients, typically for the purpose of chatting and sending files.\n"
"<278> This is a decentralized chat system, meaning you have to exchange ip\n"
"<278> addresses and port numbers with other users in order to connect to\n"
"<278> them.\n"
"\n"
"<278> <178>#chat {init} {port}\n"
"<278> #chat initialize launches your chat server. The port number is\n"
"<278> optional, and by default 4050 is used as your port. After using\n"
"<278> this command other people can connect to your chat server using\n"
"<278> your ip address and port number, and in turn you can connect to\n"
"<278> other people.\n"
"<278> <178>#chat {name} {name}\n"
"<278> By default your name is set to TinTin, but most servers will\n"
"<278> reject you if there is already someone with the name TinTin\n"
"<278> connected, so one of the first things you'd want to do is\n"
"<278> change your chat name. Your name can include color codes. Some\n"
"<278> names aren't accepted by tt++ chat servers, like the name 'all'\n"
"<278> and names longer than 20 characters.\n"
"<278> <178>#chat {message} {buddy|all} {text}\n"
"<278> This is the main command used for communication. If you use\n"
"<278> #chat message all, the message is marked as public and sent to\n"
"<278> everyone you are connected to.\n"
"<278> <178>#chat {accept} {buddy} {boost}\n"
"<278> Accept a file transfer from a buddy. The boost is optional and\n"
"<278> must be a value between 1 and 1000.\n"
"<278> <178>#chat {call} {address} {port}\n"
"<278> #chat call is used to connect to another chat server. If you\n"
"<278> omit the port argument the default port (4050) is used.\n"
"<278> #chat {cancel} {buddy} Cancel a file transfer\n"
"<278> #chat {color} {color names} Set the default color\n"
"<278> #chat {decline} {buddy} Decline a file transfer\n"
"<278> #chat {dnd} Decline new connections\n"
"<278> #chat {download} {directory} Set your download directory\n"
"<278> #chat {emote} {buddy|all} {text} Send an emote message\n"
"<278> #chat {forward} {buddy} Forward all chat messages\n"
"<278> #chat {forwardall} {buddy} Forward all session output\n"
"<278> #chat {filestat} {buddy} Show file transfer data\n"
"<278> #chat {group} {buddy} {name} Assign a chat group\n"
"<278> #chat {ignore} {buddy} Ignores someone\n"
"<278> #chat {info} Displays your info\n"
"<278> #chat {ip} {address} Changes your IP address\n"
"<278> #chat {paste} {buddy|all} {text} Pastes a block of text\n"
"<278> #chat {peek} {buddy} Show one's public connections\n"
"<278> #chat {ping} {buddy} Display response time\n"
"<278> #chat {private} {buddy|all} Make a connection private\n"
"<278> #chat {public} {buddy|all} Make a connection public\n"
"<278> #chat {reply} {text} Reply to last private message\n"
"<278> #chat {request} {buddy} Request one's public connections\n"
"<278> #chat {send} {buddy|all} {text} Sends a raw data string\n"
"<278> #chat {sendfile} {buddy} {filename} Start a file transfer\n"
"<278> #chat {serve} {buddy} Forward all public chat messages\n"
"<278> #chat {uninitialize} Uninitialize the chat port.\n"
"<278> <178>#chat {who}\n"
"<278> #chat who shows all people you are connected to. The first\n"
"<278> column shows a reference number for the connection, which can be\n"
"<278> used instead of the connection's name when sending someone a message\n"
"<278> The second column shows the connection's name. The third column\n"
"<278> shows flags set for the connection, (P)rivate, (I)gnore, (S)erve,\n"
"<278> (F)orward to user, and (f)orward from user. The next columns show\n"
"<278> ip, port, and client name.\n"
"<278> <178>#chat {zap} {buddy} Close a connection\n",
"port"
},
{
"CLASS",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #class <178>{<278>name<178>} {<278>option<178>} {<278>arg<178>}\n"
"\n"
"<278> The class command is primarily used to assign groups of triggers and\n"
"<278> variables a label so they can be easily removed.\n"
"\n"
"<278> <178>#class {} {assign} {}\n"
"<278> Will open the class, execute argument, and close afterwards.\n"
"<278> <178>#class {} {clear}\n"
"<278> Will delete all triggers associated with the given class.\n"
"<278> <178>#class {} {close}\n"
"<278> Close the given class, opening the last open class, if any.\n"
"<278> <178>#class {} {kill}\n"
"<278> Will clear, close, and remove the class.\n"
"<278> <178>#class {} {list}\n"
"<278> List all triggers associated with the given class.\n"
"<278> <178>#class {} {load}\n"
"<278> Will load the saved copy of the class from memory.\n"
"<278> <178>#class {} {open}\n"
"<278> Open a class, closing a previously opened class. All triggers\n"
"<278> added afterwards are assigned to this class.\n"
"<278> <178>#class {} {read} {\n"
"<278> Will open the class, read the file, and close afterwards.\n"
"<278> <178>#class {} {save}\n"
"<278> Will save all triggers of the given class to memory.\n"
"<278> <178>#class {} {size} {}\n"
"<278> Will store the size of the class in a variable.\n"
"<278> <178>#class {} {write} {}\n"
"<278> Will write all triggers of the given class to file.\n"
"\n"
"<278> Keep in mind that you need to use #class save before using\n"
"<278> #class clear and #class load\n"
"\n"
"<178>Example<278>: #class rich kill;#class rich read poor.tin\n"
"<278> Deletes all triggers of 'rich' class if any. Read 'poor.tin' file,\n"
"<278> all triggers loaded will be assigned to the 'rich' class.\n",
"config debug ignore info kill line message"
},
{
"COLORS",
TOKEN_TYPE_STRING,
"<178>Syntax<278>: <<888>xyz> with x, y, z being parameters\n"
"\n"
"<278> Parameter 'x': VT100 code\n"
"\n"
"<278> 0 - Reset all colors and codes to default\n"
"<278> 1 - Bold\n"
"<278> 2 - Dim\n"
"<278> 3 - Italic\n"
"<278> 4 - Underscore\n"
"<278> 5 - Blink\n"
"<278> 7 - Reverse\n"
"<278> 8 - Skip (use previous code)\n"
"\n"
"<278> Parameter 'y': Foreground color\n"
"<278> Parameter 'z': Background color\n"
"\n"
"<278> 0 - Black 5 - Magenta\n"
"<278> 1 - Red 6 - Cyan\n"
"<278> 2 - Green 7 - White\n"
"<278> 3 - Yellow 8 - Skip\n"
"<278> 4 - Blue 9 - Default\n"
"\n"
"<178>Example<278>: #show <<888>125>Bold green on a magenta background.\n"
"\n"
"<278> For xterm 256 colors support use <<888>aaa> to <<888>fff> for RGB foreground\n"
"<278> colors and <<888>AAA> to <<888>FFF> for RGB background colors. For the grayscale\n"
"<278> foreground colors use <<888>g00> to <<888>g23>, for grayscale background colors\n"
"<278> use <<888>G00> to <<888>G23>.\n"
"\n"
"<278> The tertiary colors are as follows:\n"
"\n"
"<278> <<888>acf> - Azure <<888>afc> - Jade\n"
"<278> <<888>caf> - Violet <<888>cfa> - Lime\n"
"<278> <<888>fac> - Pink <<888>fca> - Orange\n"
"\n"
"<178>Example<278>: #show <<888>acf>Azure <<888>afc>Jade <<888>caf>Violet\n"
"<178>Example<278>: #show <<888>cfa>Lime <<888>fac>Pink <<888>fca>Orange\n"
"\n"
"<278> For 12 bit truecolor use <<888>F000> to <<888>FFFF> for foreground colors and\n"
"<278> <<888>B000> to <<888>BFFF> for background colors.\n"
"\n"
"<278> For 24 bit truecolor use <<888>F000000> to <<888>FFFFFFF> for foreground\n"
"<278> colors and <<888>B000000> to <<888>BFFFFFF> for background colors.\n"
"\n"
"<278> If the color code exceeds your configured color mode it will be\n"
"<278> downgraded to the closest match.\n"
,
"characters coordinates escape_codes mathematics pcre"
},
{
"COMMANDS",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #commands <178>{<278>abbreviation<178>}\n"
"\n"
"<278> Shows all commands, or all commands starting with the given\n"
"<278> abbreviation.\n"
,
"help info statements"
},
{
"CONFIG",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #config <178>{<278>option<178>} {<278>argument<178>}\n"
"\n"
"<278> This allows you to configure various settings, the settings can be\n"
"<278> written to file with the #write command.\n"
"\n"
"<278> If you configure the global session (the one you see as you start up\n"
"<278> tintin) all sessions started will inherite these settings.\n"
"\n"
"<278> It's advised to make a configuration file to read on startup if you\n"
"<278> do not like the default settings.\n"
"\n"
"<278> Use #config without an argument to see your current configuration as\n"
"<278> well as a brief explanation of each config option.\n"
"\n"
"<278> The following config options are not listed by default:\n"
"\n"
"<278> #CONFIG {AUTO TAB} {NUMBER} Buffer lines used for tab completion\n"
"<278> #CONFIG {CHILD LOCK} {ON|OFF} Enable or disable command input.\n"
"<278> #CONFIG {CONNECT RETRY} {NUMBER} Seconds to try to connect on failure.\n"
"<278> #CONFIG {CONVERT META} {ON|OFF} Shows color codes and key bindings.\n"
"<278> #CONFIG {DEBUG TELNET} {ON|OFF} Shows telnet negotiations y/n.\n"
"<278> #CONFIG {HIBERNATE} {ON|OFF} Enable or disable low CPU usage mode.\n"
"<278> #CONFIG {LOG LEVEL} {LOW|HIGH} LOW logs server output before triggers.\n"
"<278> #CONFIG {INHERITANCE} {ON|OFF} Session trigger inheritance y/n.\n"
"<278> #CONFIG {MCCP} {ON|OFF} Enable or disable MCCP support.\n"
"<278> #CONFIG {RANDOM SEED} {NUMBER} Seed value used for random numbers.\n"
"<278> #CONFIG {TAB WIDTH} {NUMBER} Number of spaces used for a tab\n"
"<278> #CONFIG {TINTIN CHAR} {SYMBOL} Character used for TinTin++ commands.\n"
,
"class line"
},
{
"CONTINUE",
TOKEN_TYPE_STATEMENT,
"<178>Command<278>: #continue\n"
"\n"
"<278> The continue command can be used inside the #FOREACH, #LOOP, #PARSE,\n"
"<278> #WHILE and #SWITCH commands. When #CONTINUE is found, tintin will go\n"
"<278> to the end of the command and proceed as normal, which may be to\n"
"<278> reiterate the command.\n"
"\n"
"<178>Example<278>: #loop 1 10 cnt {#if {$cnt % 2 == 0} {#continue} {say $cnt}}\n",
"break foreach list loop parse repeat return while"
},
{
"COORDINATES",
TOKEN_TYPE_STRING,
"\n"
"<278> When the 0,0 coordinate is in the upper left corner TinTin++ uses\n"
"<278> a y,x / row,col notation, starting at 1,1. Subsequently -1,-1\n"
"<278> will indicate the bottom right corner. This type of argument is\n"
"<278> used by the #showme command.\n"
"\n"
"<278> When the 0,0 coordinate is in the bottom left corner tintin uses\n"
"<278> a standard x,y notation. This type of argument is used by the\n"
"<278> #map jump command.\n"
"\n"
"<278> The vast majority of tintin commands use y,x / row,col notation,\n"
"<278> primarily because that is the notation used by the VT100 standard\n"
"<278> used for terminal emulation.\n"
"\n"
"<278> <128>Squares\n"
"\n"
"<278> A square argument takes 2 coordinates. The first coordinate defines\n"
"<278> the upper left corner, the last coordinate defines the bottom\n"
"<278> right corner. The upper left corner of the terminal is defined as\n"
"<278> 1,1 and the bottom right corner as -1,-1. This type of argument is\n"
"<278> used by #draw, #button and #map offset.\n"
"\n"
"<278> <128>Panes\n"
"\n"
"<278> A pane argument takes 4 size values, which are: top pane, bottom\n"
"<278> pane, left pane, right pane. When a negative value is provided the\n"
"<278> size is the maximum size, minus the value. This type of argument\n"
"<278> is used by the #split command.\n"
"\n"
"<278> <128>Ranges\n"
"\n"
"<278> A range argument takes 2 values known as the upper bound and lower\n"
"<278> bound. The upper bound (first value) defines the start of the\n"
"<278> range, the lower bound (second value) the end. The first index of\n"
"<278> a range is defined as 1. When a negative value is provides the last\n"
"<278> index is defined as -1. This type of argument is used by #buffer\n"
"<278> and #variable.\n"
,
"characters colors escape_codes mathematics pcre"
},
{
"CR",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #cr\n"
"\n"
"<278> Sends a carriage return to the session. Useful for aliases that need\n"
"<278> extra carriage returns.\n"
"\n"
"<278> This command is obsolete as you can accomplish the same using #send\n"
"<278> without an argument or #send {}.\n"
,
"forall"
},
{
"CURSOR",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #cursor <178>{<278>option<178>} {<278>argument<178>}\n"
"\n"
"<278> Typing #cursor without an option will show all available cursor\n"
"<278> options, their default binding, and an explanation of their function.\n"
"\n"
"<278> The cursor command's primarly goal is adding customizable input editing\n"
"<278> with macros. Subsequently many cursor commands only work properly when\n"
"<278> used within a macro or event.\n"
"\n"
"<278> <178>#cursor flag\n"
"\n"
"<278> EOL end of line character(s)\n"
"<278> ECHO local echo\n"
"<278> OVERTYPE overtype mode\n"
"\n"
"<278> <178>#cursor macro\n"
"\n"
"<278> PRESERVE do not erase the macro from the macro input buffer\n"
"<278> RESET erase the macro input buffer\n"
"\n"
"<278> <178>#cursor tab\n"
"\n"
"<278> CASELESS makes tab completion caseless\n"
"<278> COMPLETE makes tab completion work while editing\n"
"\n"
"<278> DICTIONARY performs tab completion on the dictionary\n"
"<278> LIST performs tab completion on the tab completion list\n"
"<278> SCROLLBACK performs tab completion on the scrollback buffer\n"
"\n"
"<278> BACKWARD specifies tab completion to go backward\n"
"<278> FORWARD specifies tab completion to go forward\n"
"\n"
"<278> Multiple options can/must be specified at once.\n"
,
"alias history keypad macro speedwalk tab"
},
{
"DAEMON",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #daemon <178>{<278>attach<178>|<278>detach<178>|<278>kill<178>|<278>list<178>} <178>[<278>name<178>]\n"
"\n"
"<278> #daemon provides functionality similar to that of the screen and tmux\n"
"<278> utilities.\n"
"\n"
"<278> <178>#daemon attach [name]\n"
"<278> The attach option will try to find a daemonized tintin instance and\n"
"<278> take over control. The name argument is optional.\n"
"\n"
"<278> <178>#daemon detach [name]\n"
"<278> The detach option will daemonize tintin, turning it into a background\n"
"<278> process. The name argument is optional and is useful if you have\n"
"<278> several daemonized tt++ instances running so you can keep them apart.\n"
"\n"
"<278> <178>#daemon kill [name]\n"
"<278> Kills all daemons or daemons with matching name.\n"
"\n"
"<278> <178>#daemon list [name]\n"
"<278> List all daemons or daemons with matching name.\n"
"\n"
"<278> You can launch tintin and attach the first daemonized instance using\n"
"<278> tt++ -R. To attach a named instance use tt++ -R.\n",
"script system run"
},
{
"DEBUG",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #debug <178>{<278>listname<178>} {<278>on<178>|<278>off<178>|<278>log<178>}\n"
"\n"
"<278> Toggles a list on or off. With no argument it shows your current\n"
"<278> settings, as well as the list names that you can debug.\n"
"\n"
"<278> If you for example set ACTIONS to ON you will get debug information\n"
"<278> whenever an action is triggered.\n"
"\n"
"<278> #debug {listname} {log} will silently write debugging information to\n"
"<278> the log file, you must be logging in order for this to work.\n"
"\n"
"<278> Not every list has debug support yet.\n",
"class ignore info kill message"
},
{
"DEFAULT",
TOKEN_TYPE_STATEMENT,
"<178>Command<278>: #default <178>{<278>commands<178>}\n"
"\n"
"<278> The default command can only be used within the switch command. When\n"
"<278> the conditional argument of non of the case commands matches the switch\n"
"<278> command's conditional statement the default command is executed.\n",
"case default else elseif if match switch regexp"
},
{
"DELAY",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #delay <178>{<278>seconds<178>} {<278>command<178>}\n"
"<178>Command<278>: #delay <178>{<278>name<178>} {<278>command<178>} {<278>seconds<178>}\n"
"\n"
"<278> Delay allows you to have tintin wait the given amount of seconds\n"
"<278> before executing the given command.\n"
"\n"
"<278> Nanosecond floating point precision is allowed. Delays will fire in\n"
"<278> 0.01 second intervals.\n"
"\n"
"<278> Named delays are treated as one-shot tickers, see #help tick.\n"
"\n"
"<178>Example<278>: #delay {1} {#show last};#show first\n"
"<278> This will print 'first', and 'last' around one second later.\n"
"\n"
"<178>Comment<278>: If you want to remove a delay with the #undelay command you can add\n"
"<278> a name as the first argument, be aware this changes the syntax. If\n"
"<278> the name is a number keep in mind that delays with the same numeric\n"
"<278> name will not be overwritten\n",
"event ticker"
},
{
"DRAW",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #draw <178>[<278>line color<178>] <178>[<278>options<178>] <178><<278>type<178>> <<278>square<178>> {<278>text<178>}\n"
"\n"
"<278> The draw commands allows you to draw various types of lines and shapes\n"
"<278> on the screen. The types with a brief description are provided when you\n"
"<278> type #draw without an argument.\n"
"\n"
"<278> The arguments should exists of two coordinates defining the\n"
"<278> upper left and bottom right corner using row, col, row, col syntax.\n"
"\n"
"<278> The square arguments can be negative, in which case the coordinates\n"
"<278> are calculated from the opposite side of the screen. In the case the\n"
"<278> screen is 80 columns wide using #draw box 1 60 10 70 will be the\n"
"<278> equivalent of #draw box 1 -21 10 -11, but with different screen\n"
"<278> widths the boxes would be drawn in different places.\n"
"\n"
"<278> You can prefix the option with a color code or color name to color the\n"
"<278> lines and shapes.\n"
"\n"
"<278> You can further prefix the option as following:\n"
"\n"
"<278> ASCII draw in ASCII mode.\n"
"<278> BALIGN bottom align text.\n"
"<278> BLANKED blank the lines and corners.\n"
"<278> BOTTOM draw on the bottom side if possible.\n"
"<278> BOXED draw a box along the square.\n"
"<278> BUMPED precede the draw with an enter.\n"
"<278> CALIGN both LALIGN and RALIGN to center text.\n"
"<278> CIRCLED circle the corners.\n"
"<278> CONVERT draw text with meta conversion.\n"
"<278> CROSSED cross the corners.\n"
"<278> CURSIVE draw text with cursive letters.\n"
"<278> FAT draw text with fat letters.\n"
"<278> FILLED fill circles and jewels.\n"
"<278> FOREGROUND draw even if session is not active.\n"
"<278> GRID draw TABLE as a grid.\n"
"<278> HORIZONTAL draw horizontal if possible.\n"
"<278> HUGE draw text in huge letters.\n"
"<278> JEWELED diamond the corners.\n"
"<278> JOINTED draw corners.\n"
"<278> LALIGN left align text.\n"
"<278> LEFT draw on the left side if possible.\n"
"<278> NUMBERED draw numbers instead of lines.\n"
"<278> PRUNED prune the corners.\n"
"<278> RALIGN right align text.\n"
"<278> RIGHT draw on the right side if possible.\n"
"<278> ROUNDED round the corners.\n"
"<278> SANSSERIF draw text with sansserif letters.\n"
"<278> SCALED fit the square to the text size.\n"
"<278> SCROLL draw in the scrolling region.\n"
"<278> SHADOWED shadow HUGE text.\n"
"<278> TALIGN top align text too large to fit.\n"
"<278> TEED tee the corners.\n"
"<278> TOP draw on the top side if possible.\n"
"<278> TRACED trace HUGE text.\n"
"<278> TUBED draw tubes instead of lines.\n"
"<278> UALIGN unwrap and rewrap text.\n"
"<278> UNICODE draw in unicode mode.\n"
"<278> VERTICAL draw vertical if possible.\n"
"\n"
"<278> The following types are available.\n"
"\n"
"<278> [HORIZONTAL] <178>BAR<278> {;;[COLOR]}\n"
"<278> will draw a bar, use two 256 color codes for a color gradient.\n"
"<278> [ASCII|UNICODE|HUGE] <178>BOX<278> {[TEXT1]} {[TEXT2]}\n"
"<278> will draw a box.\n"
"<278> [BOXED|FOREGROUND] <178>BUFFER\n"
"<278> will draw the scrollback buffer.\n"
"<278> [BLANKED|CIRCLED|CROSSED|JEWELED|ROUNDED|TEED|PRUNED] <178>CORNER\n"
"<278> will draw a corner.\n"
"<278> [BLANKED|HORIZONTAL|NUMBERED|TUBED|VERTICAL] <178>LINE<278> {[TEXT]}\n"
"<278> will draw a line.\n"
"<278> [BOXED] <178>MAP\n"
"<278> will draw the map\n"
"<278> <178>RAIN<278> {} {[SPAWN]} {[FADE]} {[LEGEND]}\n"
"<278> will draw digital rain.\n"
"<278> [JOINTED|TOP|LEFT|BOTTOM|RIGHT] <178>SIDE\n"
"<278> will draw one or more sides of a box.\n"
"<278> [GRID] <178>TABLE<278> {[LIST1]} {[LIST2]}\n"
"<278> will draw a table.\n"
"<278> [CURSIVE|FAT|HUGE|SANSSERIF] <178>TILE<278> {[TEXT1]} {[TEXT2]}\n"
"<278> will draw a tile\n"
"\n"
"<278> All draw types take an optional text argument as long as a valid\n"
"<278> square with enough space has been defined. Text is automatically\n"
"<278> word wrapped and text formatting can be customized with the\n"
"<278> BALIGN, TALIGN, LALIGN, RALIGN, and UALIGN options.\n"
"\n"
"<178>Example<278>: #draw Blue box 1 1 3 20 {Hello world!}\n"
,
"buffer echo grep showme"
},
{
"ECHO",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #echo <178>{<278>format<178>} {<278>argument1<178>} {<278>argument2<178>} {<278>etc<178>}\n"
"\n"
"<278> Echo command displays text on the screen with formatting options. See\n"
"<278> the help file for the format command for more information.\n"
"\n"
"<278> The echo command does not trigger actions.\n"
"\n"
"<278> As with the #show command you can split the {format} argument up into\n"
"<278> two braced arguments, in which case the 2nd argument is the row number.\n"
"\n"
"<178>Example<278>: #echo {The current date is %t.} {%Y-%m-%d %H:%M:%S}\n"
"<278> #echo {[%38s][%-38s]} {Hello World} {Hello World}\n"
"<278> #echo {{this is %s on the top row} {1}} {printed}\n",
"buffer format grep showme"
},
{
"EDIT",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #edit <178>{<278>option<178>} <178>[<278>argument<178>]\n"
"\n"
"<278> The edit command can be used to turn the default line editor into a\n"
"<278> text editor.\n"
"\n"
"<278> <178>#edit create [filename] [arguments]\n"
"<278> Create an editor, initialize using the provided arguments.\n"
"\n"
"<278> <178>#edit load \n"
"<278> Create an editor, initialize using the provided list variable.\n"
"\n"
"<278> <178>#edit read \n"
"<278> Create an editor, initialize using the provided file.\n"
"\n"
"<278> <178>#edit resume\n"
"<278> Resume editing after a suspension.\n"
"\n"
"<278> <178>#edit save \n"
"<278> Save the editor to the provided variable.\n"
"\n"
"<278> <178>#edit suspend\n"
"<278> Suspend editing, similar to pressing enter except that no\n"
"<278> events are triggered.\n"
"\n"
"<278> <178>#edit write [filename]\n"
"<278> Write the editor content to file.\n"
"\n"
"<178>Example<278>: #edit create {bla.txt} {line 1} {line 2}\n",
"cursor macro"
},
{
"EDITING",
TOKEN_TYPE_STRING,
"\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>alt b <268>││<178>cursor backward word <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>alt f <268>││<178>cursor forward word <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>ctrl a <268>││<178>cursor home <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl b <268>││<178>cursor backward <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl c <268>││<178>clear line <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl d <268>││<178>delete or exit <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl e <268>││<178>cursor end <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl f <268>││<178>cursor forward <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl g <268>││<178> <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl h <268>││<178>backspace <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl i <268>││<178>tab <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl j <268>││<178>enter <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl k <268>││<178>clear line right <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl l <268>││<178>redraw input <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl m <268>││<178>enter <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl n <268>││<178>input history next <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl o <268>││<178> <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl p <268>││<178>input history prev <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl q <268>││<178> <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl r <268>││<178>input history search <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl s <268>││<178> <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl t <268>││<178>scroll buffer lock <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl u <268>││<178>clear line left <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl v <268>││<178>convert meta characters <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl w <268>││<178>delete word left <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl x <268>││<178> <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl y <268>││<178>paste <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl z <268>││<178>suspend <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>arrow left <268>││<178>cursor left <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>arrow right <268>││<178>cursor right <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>arrow up <268>││<178>previous input line <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>arrow down <268>││<178>next input line <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>ctrl arrow left <268>││<178>cursor left word <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl arrow right <268>││<178>cursor right word <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>backspace <268>││<178>backspace <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>alt backspace <268>││<178>clear line left <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl backspace <268>││<178>clear line <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>delete <268>││<178>delete <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl delete <268>││<178>delete word right <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>end <268>││<178>cursor end <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl end <268>││<178>scroll buffer end <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>enter <268>││<178>enter <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>shift-enter <268>││<178>soft enter <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>home <268>││<178>cursor home <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>ctrl home <268>││<178>scroll buffer home <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>page up <268>││<178>scroll buffer up <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>page down <268>││<178>scroll buffer down <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
"<268>┌─────────────────────────┐┌────────────────────────────────────────────┐\n"
"<268>│<178>tab <268>││<178>complete word forward <268>│\n"
"<268>├─────────────────────────┤├────────────────────────────────────────────┤\n"
"<268>│<178>shift-tab <268>││<178>complete word backward <268>│\n"
"<268>└─────────────────────────┘└────────────────────────────────────────────┘\n"
,
"cursor edit macro"
},
{
"ELSE",
TOKEN_TYPE_STATEMENT,
"<178>Command<278>: #else <178>{<278>commands<178>}\n"
"\n"
"<278> The else statement should follow an #IF or #ELSEIF statement and is\n"
"<278> only called if the proceeding #IF or #ELSEIF is false.\n"
"\n"
"<178>Example<278>: #if {1d2 == 1} {smile};#else {grin}\n",
"case default elseif if switch regexp"
},
{
"ELSEIF",
TOKEN_TYPE_STATEMENT,
"<178>Command<278>: #elseif <178>{<278>conditional<178>} {<278>commands<178>}\n"
"\n"
"<278> The elseif statement should follow an #IF or #ELSEIF statement and is\n"
"<278> only called when the statement is true and the proceeding #IF and\n"
"<278> #ELSEIF statements are false.\n"
"\n"
"<178>Example<278>: #if {1d3 == 1} {smirk};#elseif {1d2 == 1} {snicker}\n",
"case default else if switch regexp"
},
{
"END",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #end {}\n"
"\n"
"<278> Terminates tintin and return to unix. On most systems, ctrl-c has\n"
"<278> the same result.\n"
"\n"
"<278> The message is optional and is printed before tintin exits. When\n"
"<278> using #end {\\} tintin will terminate silently.\n",
"zap"
},
{
"ESCAPE CODES",
TOKEN_TYPE_STRING,
"<278> You may use the escape character \\ for various special characters.\n"
"\n"
"<278> \\a beep the terminal.\n"
"<278> \\c send a control character, \\ca for ctrl-a.\n"
"<278> \\e start an escape sequence.\n"
"<278> \\f send a form feed.\n"
"<278> \\n send a line feed.\n"
"<278> \\r send a carriage return.\n"
"<278> \\t send a horizontal tab.\n"
"<278> \\x print an 8 bit character using hexadecimal, \\xFF for example.\n"
"<278> \\x7B send the '{' character.\n"
"<278> \\x7D send the '}' character.\n"
"<278> \\u print a 16 bit unicode character, \\uFFFD for example.\n"
"<278> \\u{} print a 8-21 bit unicode character, \\u{2AF21} for example.\n"
"<278> \\U print a 21 bit unicode character, \\U02AF21 for example.\n"
"<278> \\v send a vertical tab\n"
"\n"
"<278> Ending a line with \\ will stop tintin from appending a line feed.\n"
"<278> To escape arguments in an alias or action use %%0 %%1 %%2 etc.\n",
"characters colors coordinates mathematics pcre"
},
{
"EVENT",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #event <178>{<278>event type<178>}<278> <178>{<278>commands<178>}\n"
"\n"
"<278> Events allow you to create triggers for predetermined client events.\n"
"\n"
"<278> Use #event without an argument to see a list of possible events with\n"
"<278> a brief description. Use #event %* to see the current list of defined\n"
"<278> events. Use #info {events} {on} to see events get thrown.\n"
"\n"
"<278> Events, like triggers in general, are case sensitive and event names\n"
"<278> must be defined using all upper case letters. Only one event can be\n"
"<278> defined for each event type.\n"
"\n"
"<278> To enable mouse events use #config mouse_tracking on, to see mouse\n"
"<278> events use #config mouse_tracking info.\n"
"\n"
"<278> <128>CATCH EVENTS\n"
"\n"
"<278> <178>CATCH \n"
"<278> Some events can be prefixed with CATCH to interrupt default\n"
"<278> behavior.\n"
"\n"
"<278> <128>CLASS EVENTS\n"
"\n"
"<278> <178>CLASS ACTIVATED [CLASS], CLASS_CLEAR [CLASS], CLASS CREATED [CLASS],\n"
"<278> <178>CLASS DEACTIVATED [CLASS], CLASS DESTROYED [CLASS],\n"
"<278> <178>CLASS_LOAD [CLASS]\n"
"<278> %0 class name\n"
"\n"
"<278> <128>FORMAT EVENTS\n"
"\n"
"<278> <178>REFORMAT <278>Use #return to change MESSAGE\n"
"\n"
"<278> <128>GAG EVENTS\n"
"\n"
"<278> <178>GAG \n"
"<278> Some events can be prefixed with GAG to gag default system\n"
"<278> messages.\n"
"\n"
"<278> <128>INPUT EVENTS\n"
"\n"
"<278> <178>EDIT STARTED, EDIT FINISHED\n"
"<278> %0 name %1 lines %2 size %3 data\n"
"\n"
"<278> <178>HISTORY UPDATE\n"
"<278> %0 command\n"
"\n"
"<278> <178>RECEIVED KEYPRESS, PROCESSED KEYPRESS\n"
"<278> %0 character %1 unicode index %2 edit row %3 edit column\n"
"\n"
"<278> <178>RECEIVED INPUT [NAME]\n"
"<278> %0 raw text\n"
"\n"
"<278> <178>RECEIVED INPUT CHARACTER\n"
"<278> %0 character %1 unicode index %2 size %3 width\n"
"\n"
"<278> <178>NO SESSION ACTIVE<278> %0 raw text %1 size\n"
"<278> <178>SEND OUTPUT<278> %0 raw text %1 size\n"
"<278> <178>SENT OUTPUT<278> %0 raw text %1 size\n"
"\n"
"<278> <128>MAP EVENTS\n"
"\n"
"<278> <178>END OF PATH, END OF RUN, MAP UPDATED VTMAP\n"
"<278> These events have no additional arguments.\n"
"\n"
"<278> <178>MAP CREATE EXIT, MAP DELETE EXIT\n"
"<278> %0 vnum %1 exit name %2 exit cmd %3 exit vnum\n"
"\n"
"<278> <178>MAP CREATE ROOM, MAP DELETE ROOM\n"
"<278> %0 vnum %1 name\n"
"\n"
"<278> <178>MAP ENTER MAP, MAP EXIT MAP\n"
"<278> %0 vnum\n"
"\n"
"<278> <178>MAP ENTER ROOM [VNUM]\n"
"<278> %0 new vnum %1 old vnum %2 direction\n"
"\n"
"<278> <178>MAP EXIT ROOM [VNUM]\n"
"<278> %0 old vnum %1 new vnum %2 direction\n"
"\n"
"<278> <178>MAP FOLLOW MAP\n"
"<278> %0 old vnum %1 new vnum %2 exit name\n"
"\n"
"<278> <178>MAP REGION , MAP ROOM \n"
"<278> %0 row %1 col %2 -row %3 -col %4 vnum %5 info\n"
"\n"
"<278> <128>MOUSE EVENTS\n"
"\n"
"<278> <178>DOUBLE-CLICKED <278>%0 row %1 col %2 -row %3 -col %4 word %5 line\n"
"<278> <178>LONG-CLICKED <278>%0 row %1 col %2 -row %3 -col %4 word %5 line\n"
"<278> <178>MOVED <278>%0 row %1 col %2 -row %3 -col %4 word %5 line\n"
"<278> <178>PRESSED <278>%0 row %1 col %2 -row %3 -col %4 word %5 line\n"
"<278> <178>SHORT-CLICKED <278>%0 row %1 col %2 -row %3 -col %4 word %5 line\n"
"<278> <178>RELEASED <278>%0 row %1 col %2 -row %3 -col %4 word %5 line\n"
"<278> <178>SCROLLED <278>%0 row %1 col %2 -row %3 -col %4 word %5 line\n"
"<278> <178>TRIPLE-CLICKED <278>%0 row %1 col %2 -row %3 -col %4 word %5 line\n"
"\n"
"<278> <178>MAP \n"
"<278> Mouse events can be prefixed with MAP to only trigger when the mouse\n"
"<278> event occurs inside the VT100 map region.\n"
"\n"
"<278> <178>SWIPED [DIR]\n"
"<278> %0 dir %1 button %2 row %3 col %4 -row %5 -col\n"
"<278> %6 row %7 col %8 -row %9 -col %10 rows %11 cols\n"
"\n"
"<278> <128>OUTPUT EVENTS\n"
"\n"
"<278> <178>BUFFER UPDATE<278>, <178>DISPLAY UPDATE\n"
"<278> These events have no additional arguments.\n"
"\n"
"<278> <178>PROCESSED LINE <278>%0 raw text %1 plain text %2 prompt (0 or 1)\n"
"\n"
"<278> <178>RECEIVED LINE <278>%0 raw text %1 plain text\n"
"<278> <178>RECEIVED OUTPUT <278>%0 raw text %1 plain text\n"
"<278> <178>RECEIVED PROMPT <278>%0 raw text %1 plain text\n"
"\n"
"<278> <128>PORT EVENTS\n"
"\n"
"<278> <178>CHAT MESSAGE<278>, <178>PORT MESSAGE\n"
"<278> %0 raw text %1 plain text\n"
"\n"
"<278> <178>PORT CONNECTION <278>%0 name %1 ip %2 port\n"
"<278> <178>PORT DISCONNECTION <278>%0 name %1 ip %2 port\n"
"<278> <178>PORT LOG MESSAGE <278>%0 name %1 ip %2 port %3 data %4 plain data\n"
"<278> <178>PORT RECEIVED MESSAGE <278>%0 name %1 ip %2 port %3 data %4 plain data\n"
"<278> <178>PORT RECEIVED DATA <278>%0 name %1 ip %2 port %3 data %4 size\n"
"\n"
"<278> <128>SCAN EVENTS\n"
"\n"
"<278> <178>SCAN CSV HEADER <278>%0 all args %1 arg1 %2 arg2 .. %99 arg99\n"
"<278> <178>SCAN CSV LINE <278>%0 all args %1 arg1 %2 arg3 .. %99 arg99\n"
"<278> <178>SCAN TSV HEADER <278>%0 all args %1 arg1 %2 arg3 .. %99 arg99\n"
"<278> <178>SCAN TSV LINE <278>%0 all args %1 arg1 %2 arg3 .. %99 arg99\n"
"\n"
"<278> <128>SCREEN EVENTS\n"
"\n"
"<278> <178>SCREEN DIMENSIONS <278>%0 height %1 width\n"
"<278> <178>SCREEN FOCUS <278>%0 focus (0 or 1)\n"
"<278> <178>SCREEN LOCATION <278>%0 rows %1 cols %2 height %3 width\n"
"\n"
"<278> <178>SCREEN MOUSE LOCATION\n"
"<278> %0 row %1 col %2 -row %3 -col %4 pix row %5 pix col\n"
"<278> %6 -pix row %7 -pix col %8 location\n"
"\n"
"<278> <178>SCREEN RESIZE <278>%0 rows %1 cols %2 height %3 width\n"
"<278> <178>SCREEN SIZE <278>%0 rows %1 cols\n"
"<278> <178>SCREEN SPLIT <278>%0 top row %1 top col %2 bot row %3 bot col\n"
"<278> <178>SCREEN UNSPLIT <278>%0 top row %1 top col %2 bot row %3 bot col\n"
"\n"
"<278> <128>SESSION EVENTS\n"
"\n"
"<278> <178>SESSION ACTIVATED <278>%0 name\n"
"<278> <178>SESSION CONNECTED <278>%0 name %1 host %2 ip %3 port %4 file\n"
"<278> <178>SESSION CREATED <278>%0 name %1 host %2 ip %3 port %4 file\n"
"<278> <178>SESSION DEACTIVATED <278>%0 name\n"
"<278> <178>SESSION DISCONNECTED <278>%0 name %1 host %2 ip %3 port\n"
"<278> <178>SESSION TIMED OUT <278>%0 name %1 host %2 ip %3 port\n"
"\n"
"<278> <128>SYSTEM EVENTS\n"
"\n"
"<278> <178>CONFIG <278>%0 name %1 value\n"
"\n"
"<278> <178>DAEMON ATTACH TIMEOUT <278>%0 file %1 pid\n"
"<278> <178>DAEMON ATTACHED <278>%0 file %1 pid\n"
"<278> <178>DAEMON DETACHED <278>%0 file %1 pid\n"
"<278> <178>PROGRAM START <278>%0 startup arguments\n"
"<278> <178>PROGRAM TERMINATION <278>%0 goodbye message\n"
"\n"
"<278> <178>READ ERROR <278>%0 filename %1 error message\n"
"<278> <178>READ FILE <278>%0 filename\n"
"<278> <178>WRITE ERROR <278>%0 filename %1 error message\n"
"<278> <178>WRITE FILE <278>%0 filename\n"
"\n"
"<278> <178>SYSTEM CRASH <278>%0 message\n"
"<278> <178>SYSTEM ERROR <278>%0 name %1 system msg %2 error %3 error msg\n"
"<278> <178>UNKNOWN COMMAND <278>%0 raw text\n"
"<278> <178>SIGUSR <278>%0 signal\n"
"\n"
"<278> <128>TELNET EVENTS\n"
"\n"
"<278> <178>IAC \n"
"<278> IAC TELNET events are made visible using #config telnet info.\n"
"\n"
"<278> <178>IAC SB GMCP <278>%0 module %1 data %2 plain data\n"
"<278> <178>IAC SB GMCP <278> %1 data %2 plain data\n"
"<278> <178>IAC SB MSSP <278>%0 variable %1 data\n"
"<278> <178>IAC SB MSDP <278>%0 variable %1 data %2 plain data\n"
"<278> <178>IAC SB MSDP [VAR] <278>%0 variable %1 data %2 plain data\n"
"<278> <178>IAC SB NEW-ENVIRON <278>%0 variable %1 data %2 plain data\n"
"<278> <178>IAC SB ZMP <278>%0 variable %1 data\n"
"<278> <178>IAC SB <278>%0 variable %1 raw data %2 plain data\n"
"\n"
"<278> <128>TIME EVENTS\n"
"\n"
"<278> <178>DATE [HOUR:MINUTE], DAY [DAY OF MONTH],\n"
"<278> <178>HOUR [HOUR], MONTH [DAY OF MONTH], TIME [:SECOND],\n"
"<278> <178>WEEK [DAY OF WEEK], YEAR [YEAR]\n"
"<278> %0 year %1 month %2 day of week %3 day of month %4 hour\n"
"<278> %5 minute %6 second\n"
"\n"
"<278> <128>VARIABLE EVENTS\n"
"\n"
"<278> <178>VARIABLE UPDATE <278>%0 name %1 new value %2 path\n"
"<278> <178>VARIABLE UPDATED <278>%0 name %1 new value %2 path\n"
"\n"
"<278> <128>VT100 EVENTS\n"
"\n"
"<278> <178>VT100 SCROLL REGION <278>%0 top row %1 bot row %2 rows %3 cols %4 wrap\n"
"\n"
"<278> To see all events trigger use #info event on. Since this can get\n"
"<278> rather spammy it's possible to gag event info messages.\n"
"\n"
"<178>Example<278>: #event {SESSION CONNECTED} {#read mychar.tin}\n"
"\n"
"<178>Comment<278>: You can remove an event with the #unevent command.\n",
"button delay ticker"
},
{
"FOREACH",
TOKEN_TYPE_STATEMENT,
"<178>Command<278>: #foreach <178>{<278>list<178>} {<278>variable<178>} {<278>commands<178>}\n"
"\n"
"<278> For each item in the provided list the foreach statement will update\n"
"<278> the given variable and execute the command part of the statement. List\n"
"<278> elements must be separated by braces or semicolons.\n"
"\n"
"<178>Example<278>: #foreach {bob;tim;kim} {name} {tell $name Hello}\n"
"<178>Example<278>: #foreach {{bob}{tim}{kim}} {name} {tell $name Hello}\n",
"break continue list loop parse repeat return while"
},
{
"FORMAT",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #format <178>{<278>variable<178>} {<278>format<178>} {<278>argument1<178>} {<278>argument2<178>} {<278>etc<178>}\n"
"\n"
"<278> Allows you to store a string into a variable in the exact same way\n"
"<278> C's sprintf works with a few enhancements and limitations like a\n"
"<278> maximum of 30 arguments.\n"
"\n"
"<278> If you use #format inside an alias or action you must escape %1s as\n"
"<278> %+1s or %%1s or %\\1s so the %1 isn't substituted by the trigger.\n"
"\n"
"<278> #format {test} {%+9s} {string} pad string with up to 9 spaces\n"
"<278> #format {test} {%-9s} {string} post pad string with up to 9 spaces\n"
"<278> #format {test} {%.8s} {string} copy at most 8 characters\n"
"<278> #format {test} {%a} {number} print corresponding charset character\n"
"<278> #format {test} {%c} {string} use a highlight color name\n"
"<278> #format {test} {%d} {number} print a number with integer formatting\n"
"<278> #format {test} {%f} {string} perform floating point math\n"
"<278> #format {test} {%g} {number} perform thousand grouping on {number}\n"
"<278> #format {test} {%h} {string} turn text into a header line\n"
"<278> #format {test} {%l} {string} lowercase text\n"
"<278> #format {test} {%m} {string} perform mathematical calculation\n"
"<278> #format {test} {%n} {name} capitalize the first letter\n"
"<278> #format {test} {%p} {string} strip leading and trailing spaces\n"
"<278> #format {test} {%r} {string} reverse text, hiya = ayih\n"
"<278> #format {test} {%s} {string} print given string\n"
"<278> #format {test} {%t} {format} display time with strftime format\n"
"<278> optional {{format}{time}} syntax\n"
"<278> #format {test} {%u} {string} uppercase text\n"
"<278> #format {list} {%w} {string} store word wrapped text in {list}\n"
"<278> optional {{string}{width}} syntax\n"
"<278> #format {test} {%x} {hex} print corresponding charset character\n"
"<278> #format {test} {%A} {char} store corresponding character value\n"
"<278> #format {test} {%D} {hex} convert hex to decimal in {test}\n"
"<278> #format {hash} {%H} {string} store a 64 bit string hash in {hash}\n"
"<278> #format {test} {%L} {string} store the string length in {test}\n"
"<278> #format {test} {%M} {number} convert number to metric in {test}\n"
"<278> #format {test} {%P} {string} strip ESCAPE CODES and COLORs\n"
"<278> #format {test} {%S} {string} store the number of spelling errors\n"
"<278> #format {time} {%T} {} store the epoch time in {time}\n"
"<278> #format {time} {%U} {} store the micro epoch time in {time}\n"
"<278> #format {test} {%W} {string} get the screen width of string\n"
"<278> #format {test} {%X} {dec} convert dec to hexadecimal in {test}\n\n"
"<278> #format {test} {%%} a literal % character\n"
"\n"
"<178>Comment<278>: See #help TIME for help on the %t argument.\n",
"cat echo function local math replace script time variable"
},
{
"FUNCTION",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #function <178>{<278>name<178>} {<278>operation<178>}\n"
"\n"
"<278> Functions allow you to execute a script within a line of text, and\n"
"<278> replace the function call with the line of text generated by the\n"
"<278> function.\n"
"\n"
"<278> Be aware that each function should use the #return command at the\n"
"<278> end of the function with the result, or set the {result} variable.\n"
"\n"
"<278> To use a function use the @ character before the function name.\n"
"<278> The function arguments should be placed between braces behind the\n"
"<278> function name with argument separated by semicolons.\n"
"\n"
"<278> Functions can be escaped by adding additional @ signs.\n"
"\n"
"<178>Example<278>: #function test #return 42;#showme @@test{}\n"
"\n"
"<278> The function itself can use the provided arguments which are stored\n"
"<278> in %1 to %99, with %0 holding all arguments.\n"
"\n"
"<178>Example<278>: #function {rnd} {#math {result} {1 d (%2 - %1 + 1) + %1 - 1}}\n"
"<278> #show A random number between 100 and 200: @rnd{100;200}\n"
"\n"
"<178>Example<278>: #function gettime {#format result %t %H:%M}\n"
"<278> #show The current time is @gettime{}\n"
"\n"
"<178>Comment<278>: You can remove a function with the #unfunction command.\n",
"format local math replace script variable"
},
{
"GAG",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #gag <178>{<278>string<178>}\n"
"\n"
"<278> Removes any line that contains the string.\n"
"\n"
"<178>Comment<278>: See '#help action', for more information about triggers.\n"
"\n"
"<278> There are a system messages that can be gagged using gag events.\n"
"\n"
"<178>Comment<278>: You can remove a gag with the #ungag command.\n",
"action highlight prompt substitute"
},
{
"GREETING",
TOKEN_TYPE_STRING,
"<268> #<268>##################################################################<268>#\n"
"<268> #<278> <268>#\n"
"<268> #<278> T I N T I N + + "CLIENT_VERSION"<278> <268>#\n"
"<268> #<278> <268>#\n"
// "<268> #<278> <268>T<278>he K<268>i<278>cki<268>n<278> <268>T<278>ickin D<268>i<278>kuMUD Clie<268>n<278>t <268> #\n"
// "<268> #<278> <268>#\n"
"<268> #<278> Code by Peter Unold, Bill Reis, and Igor van den Hoven <268>#\n"
"<268> #<278> <268>#\n"
"<268> #<268>##################################################################<268>#<288>\n",
""
},
{
"GREP",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #grep <178>[<278>page<178>] {<278>search string<178>}\n"
"\n"
"<278> This command allows you to search for matching lines in your scroll\n"
"<278> back buffer. The amount of matches shown equals your screen size. If\n"
"<278> you want to search back further use the optional page number. You can\n"
"<278> use wildcards for better search results. Be aware the search string\n"
"<278> is case sensitive, which can be disabled by using %i.\n"
"\n"
"<278> By default grep searches from the end of the scrollback buffer to the\n"
"<278> beginning, this can be reversed by using a negative page number.\n"
"\n"
"<178>Example<278>: #grep Bubba tells you\n"
"<278> This will show all occasions where bubba tells you something.\n",
"buffer echo showme"
},
{
"HELP",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #help <178>{<278>subject<178>}\n"
"\n"
"<278> Without an argument #help will list all available help subjects.\n"
"\n"
"<278> Using #help %* will display all help entries.\n",
"commands debug ignore info message statements"
},
{
"HIGHLIGHT",
TOKEN_TYPE_CONFIG,
"<178>Command<278>: #highlight <178>{<278>string<178>} {<278>color names<178>} {<278>priority<178>}\n"
"\n"
"<278> The highlight command is used to change the color of incoming text.\n"
"\n"
"<278> Available color options are:\n"
"\n"
"<278> reset - resets the color state to default\n"
"<278> light - turns the color light.\n"
"<278> dark - turns the color dark.\n"
"<278> underscore - underscores the text.\n"
"<278> blink - makes the text blink.\n"
"<278> reverse - reverse foreground and background color.\n"
"<278> b - makes next color the background color.\n"
"\n"
"<278> Available color names are:\n"
"\n"
"<278> <<888>abd> - azure <<888>acf> - Azure\n"
"<278> <<888>aad> - blue <<888>aaf> - Blue\n"
"<278> <<888>add> - cyan <<888>aff> - Cyan\n"
"<278> <<888>aaa> - ebony <<888>bbb> - Ebony\n"
"<278> <<888>ada> - green <<888>afa> - Green\n"
"<278> <<888>adb> - jade <<888>afc> - Jade\n"
"<278> <<888>bda> - lime <<888>cfa> - Lime\n"
"<278> <<888>dad> - magenta <<888>faf> - Magenta\n"
"<278> <<888>dba> - orange <<888>fca> - Orange\n"
"<278> <<888>dab> - pink <<888>fac> - Pink\n"
"<278> <<888>daa> - red <<888>faa> - Red\n"
"<278> <<888>ccc> - silver <<888>eee> - Silver\n"
"<278> <<888>cba> - tan <<888>eda> - Tan\n"
"<278> <<888>bad> - violet <<888>caf> - Violet\n"
"<278> <<888>ddd> - white <<888>fff> - White\n"
"<278> <<888>dda> - yellow <<888>ffa> - Yellow\n"
"\n"
"<278> Colors can be provided as either a color code or one of the valid color\n"
"<278> names. If the color name is in all lower case a dark color is printed.\n"
"<278> If the first letter of the color name is capitalized a light color is\n"
"<278> printed.\n"
"\n"
"<278> The %1-99 variables can be used as 'wildcards' that will match with any\n"
"<278> text. They are useful for highlighting a complete line. The %0 variable\n"
"<278> should never be used in highlights.\n"
"\n"
"<278> You may start the string to highlight with a ^ to only highlight text\n"
"<278> if it begins the line.\n"
"\n"
"<278> Besides color names also <<888>abc> color codes can be used.\n"
"\n"
"<178>Example<278>: #high {Valgar} {reverse underscore Jade}\n"
"<278> Prints every occurrence of 'Valgar' in underscored reverse video Jade.\n"
"\n"
"<178>Example<278>: #high {^You{|r} %1} {light cyan}\n"
"<278> Prints every line that starts with 'You' in light cyan.\n"
"\n"
"<178>Example<278>: #high {Bubba} {red underscore b Green}\n"
"<278> Highlights the name Bubba as red underscored text on green background.\n"
"\n"
"<178>Comment<278>: See '#help action', for more information about triggers.\n"
"\n"
"<178>Comment<278>: See '#help substitute', for more advanced color substitution.\n"
"\n"
"<178>Comment<278>: This command only works with ANSI/VT100 terminals or emulators.\n"
"\n"
"<178>Comment<278>: You can remove a highlight with the #unhighlight command.\n",
"action gag prompt substitute"
},
{
"HISTORY",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #history <178>{<278>delete<178>}<278> Delete the last command.\n"
"<278> #history <178>{<278>get<178>} {<278>variable<178>} {<278>range<178>}<278> Store list in variable.\n"
"<278> #history <178>{<278>insert<178>} {<278>command<178>}<278> Insert a command.\n"
"<278> #history <178>{<278>list<178>} <278> Display the command history.\n"
"<278> #history <178>{<278>read<178>} {<278>filename<178>}<278> Read a command history from file.\n"
"<278> #history <178>{<278>write<178>} {<278>filename<178>}<278> Write a command history to file.\n"
"\n"
"<278> Without an argument all available options are shown.\n"
"\n"
"<278> By default all commands are saved to the history list and the history\n"
"<278> list is saved between sessions in the ~/.tintin/history.txt file.\n"
"\n"
"<278> You can set the character to repeat a command in the history with the\n"
"<278> #config {REPEAT CHAR} {} configuration option, by default\n"
"<278> this is set to the exclamation mark.\n"
"\n"
"<278> You can use ! by itself to repeat the last command, or ! to\n"
"<278> repeat the last command starting with the given text.\n"
"\n"
"<278> You can use #config {REPEAT ENTER} {ON} to repeat the last command\n"
"<278> when you press enter on an empty line.\n"
"\n"
"<278> You can press ctrl-r to enter an interactive regex enabled history\n"
"<278> search mode, or by issuing #cursor {history search}.\n"
"\n"
"<278> TinTin++ tries to bind the arrow up and down keys to scroll through\n"
"<278> the history list by default. You can bind these with a macro yourself\n"
"<278> using #cursor {history next} and #cursor {history prev}. Many #cursor\n"
"<278> commands only work properly when bound with a macro.\n",
"alias cursor keypad macro speedwalk tab"
},
{
"IF",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #if <178>{<278>conditional<178>} {<278>commands if true<178>} {<278>commands if false<178>}\n"
"\n"
"<278> The #if command works similar to an if statement in other languages,\n"
"<278> and is based on the way C handles its conditional statements.\n"
"<278> When an #if command is encountered, the conditional statement is\n"
"<278> evaluated, and if TRUE (any non-zero result) the commands are executed.\n"
"\n"
"<278> The conditional is evaluated exactly the same as in the #math command,\n"
"<278> if the conditional evaluates as anything except 0 the commands are\n"
"<278> executed. See the 'math' helpfile for more information.\n"
"\n"
"<278> To handle the case where an if statement is false it can be followed\n"
"<278> by the #else command. Alternatively, the else can be provided as the\n"
"<278> third argument.\n"
"\n"
"<178>Example<278>: #action {%0 gives you %1 gold coins.} {#if {%1 > 5000} {thank %0}}\n"
"<278> If someone gives you more than 5000 coins, thank them.\n"
"\n"
"<178>Example<278>: #alias {k} {#if {\"%0\" == \"\"} {kill $target};#else {kill %0}}\n"
"\n"
"<178>Example<278>: #if {\"%0\" == \"{bli|bla}\"} {#showme %0 is either bli or bla.}\n",
"case default else elseif math switch regexp"
},
{
"IGNORE",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #ignore <178>{<278>listname<178>} {<278>on<178>|<278>off<178>}\n"
"\n"
"<278> Toggles a list on or off. With no arguments it shows your current\n"
"<278> settings, as well as the list names that you can ignore.\n"
"\n"
"<278> If you for example use #IGNORE ACTIONS ON actions will no longer\n"
"<278> trigger. Not every list can be ignored.\n"
,
"class debug info kill message"
},
{
"INDEX",
TOKEN_TYPE_STRING,
""
" ████████┐██████┐███┐ ██┐████████┐██████┐███┐ ██┐\n"
" └──██┌──┘└─██┌─┘████┐ ██│└──██┌──┘└─██┌─┘████┐ ██│\n"
" ██│ ██│ ██┌██┐ ██│ ██│ ██│ ██┌██┐ ██│\n"
" ██│ ██│ ██│└██┐██│ ██│ ██│ ██│└██┐██│\n"
" ██│ ██████┐██│ └████│ ██│ ██████┐██│ └████│\n"
" └─┘ └─────┘└─┘ └───┘ └─┘ └─────┘└─┘ └───┘\n"
" ██┐ ██┐\n"
" ██│ ██│\n"
" ████████┐████████┐\n"
" └──██┌──┘└──██┌──┘\n"
" ██│ ██│\n"
" └─┘ └─┘\n"
"\n"
"<278> (T)he K(I)cki(N)(T)ickin D(I)kumud Clie(N)t\n"
"\n"
"\n"
"<278> <128>What is TinTin++?\n"
"\n"
"<278> TinTin++ is a client program specialized to help playing muds. This is\n"
"<278> a souped up version of TINTIN III with many new features.\n"
"\n"
"<278> <128>Giving Credit Where Credit is Due\n"
"\n"
"<278> None of this work would be possible, without the work done by Peter\n"
"<278> Unold. He was the author of TINTIN III, the base of TinTin++. Hats off\n"
"<278> to ya Peter. You started the ball rolling.\n"
"\n"
"<278> <128>Introduction\n"
"\n"
"<278> If you're new to TinTin++ a good place to start is the introduction,\n"
"<278> which should be linked below.\n"
,
"introduction"
},
{
"INFO",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #info <178>{<278>listname<178>} {<278>LIST<178>|<278>ON<178>|<278>OFF<178>|<278>SAVE<178>}\n"
"\n"
"<278> Without an argument info displays the settings of every tintin list.\n"
"\n"
"<278> By providing the name of a list and the LIST option it shows all\n"
"<278> triggers/variables associated with that list. With the SAVE option\n"
"<278> this data is written to the info variable.\n"
"\n"
"<278> #info arguments will show matched trigger arguments.\n"
"<278> #info big5toutf will show the big5 to utf8 translation table.\n"
"<278> #info cpu will show information about tintin's cpu usage.\n"
"<278> #info environ will show the environment variables.\n"
"<278> #info input will show information about the input line.\n"
"<278> #info matches will show matched command arguments.\n"
"<278> #info mccp will show information about data compression.\n"
"<278> #info memory will show information about the memory stack.\n"
"<278> #info output will show information about the mud output buffers.\n"
"<278> #info stack will show the low level debugging stack.\n"
"<278> #info session will show information on the session.\n"
"<278> #info sessions will show information on all sessions.\n"
"<278> #info system will show some system information.\n"
"<278> #info tokenizer will show information about the script stack.\n"
"<278> #info unicode will show information on the provided character.\n"
,
"class debug ignore kill message"
},
{
"INTRODUCTION",
TOKEN_TYPE_STRING,
"<278> On this page you'll find an introduction to using TinTin++. Additional\n"
"<278> information can be found in the individual help sections.\n"
"\n"
"<278> <128>Starting and Ending\n"
"\n"
"<278> The syntax for starting TinTin++ is: ./tt++ [command file]\n"
"\n"
"<278> Read more about the command file in the files section below. Remember\n"
"<278> one thing though. All actions, aliases, substitutions, etc, defined\n"
"<278> when starting up TinTin++ are inherited by all sessions.\n"
"\n"
"<278> If you want to exit TinTin++ type '#end' or press ctrl-d on an empty\n"
"<278> line.\n"
"\n"
"<278> For the WinTin++ users, if you want to paste text use shift-insert,\n"
"<278> text is automatically copied upon selection. This is typical Linux\n"
"<278> behavior, but it can take some getting used to.\n"
"\n"
"\n"
"<278> <128>Basic features\n"
"\n"
"<278> I'll start by explaining some of the very basic and important features:\n"
"\n"
"<278> All TinTin++ commands starts with a '#'.\n"
"\n"
"<178>Example<278>: #help -- #help is a client command, and isn't sent to the server.\n"
"\n"
"<278> All TinTin++ commands can be abbreviated when typed.\n"
"\n"
"<278> #he -- Typing #he is the same as typing #help though it's suggested to\n"
"<278> use at least 3 letter abbreviations just in case another command is\n"
"<278> added that starts with 'he'.\n"
"\n"
"<278> All commands can be separated with a ';'.\n"
"\n"
"<278> n;l dragon;s;say Dan Dare is back! -- do these 4 commands\n"
"<278> There are 3 ways ';'s can be overruled.\n"
"\n"
"<278> \\say Hello ;) -- Lines starting with a '\\' aren't parsed by TinTin++.\n"
"<278> say Hello \\;) -- The escape character can escape 1 letter.\n"
"<278> #config verbatim on -- Everything is sent as is except '#' commands.\n"
"\n"
"<278> <128>Connecting to a server\n"
"\n"
"<178>Command<278>: #session <178>{<278>session name<178>} {<278>server address<178>} {<278>port<178>}\n"
"\n"
"<178>Example<278>: #session someone tintin.sourceforge.net 4321\n"
"\n"
"<278> You can have more than one session, in which case you can switch\n"
"<278> between sessions typing #.\n"
"\n"
"<278> You can get a list of all sessions by typing: #session. The current\n"
"<278> active session is marked with (active). Snooped sessions with\n"
"<278> (snooped). MCCP sessions (compression) with (mccp 2) and (mccp 3).\n"
"\n"
"\n"
"<278> <128>Split\n"
"\n"
"<178>Command<278>: #split\n"
"\n"
"<278> The split command will create a separated input and output area.\n"
"\n"
"<278> Using the #prompt command you can capture the prompt and place it on\n"
"<278> the split line. To get rid of the split interface you can use #unsplit\n"
"<278> which will restore the terminal settings to default.\n"
"\n"
"\n"
"<278> <128>Alias\n"
"\n"
"<178>Command<278>: #alias <178>{<278>name<178>} {<278>commands<178>}\n"
"\n"
"<278> The syntax of the #alias command is almost like alias in csh.\n"
"<278> Use this command to define aliases. The variables %0, %1.. %9 contain\n"
"<278> the arguments to the aliased command as follows:\n"
"<278> the %0 variable contains all the arguments.\n"
"<278> the %1 variable contains the 1st argument\n"
"<278> ....\n"
"<278> the %9 variable contains the 9th argument\n"
"\n"
"<178>Example<278>: #alias greet say Greetings, most honorable %1\n"
"\n"
"<278> If you want an alias to execute more commands, you must use braces.\n"
"\n"
"<178>Example<278>: #alias ws <178>{<278>wake;stand<178>}\n"
"\n"
"<278> To delete an alias use the #unalias command.\n"
"\n"
"<278> WARNING! TinTin++ doesn't baby sit, and hence does not check for\n"
"<278> recursive aliases! You can avoid recursion by escaping the entire\n"
"<278> line.\n"
"\n"
"<178>Example<278>: #alias put \\put %1 in %2\n"
"\n"
"<278> Or by using the send command.\n"
"\n"
"<178>Example<278>: #alias put #send put %1 in %2\n"
"\n"
"\n"
"<128> Action\n"
"\n"
"<178>Command<278>: #action <178>{<278>action-text<178>} {<278>commands<178>}\n"
"\n"
"<278> Use this command to define an action to take place when a particular\n"
"<278> text appears on your screen. There are 99 variables you can use as\n"
"<278> wildcards in the action-text.\n"
"\n"
"<278> These variables are %1, %2, %3 .... %9, %10, %11 ... %97, %98, %99.\n"
"\n"
"<178>Example<278>: #action <178>{<278>You are hungry<178>} {<278>get bread bag;eat bread<178>}\n"
"\n"
"<178>Example<278>: #action <178>{<278>%1 has arrived.<178>}<278> shake %1 -- shake hands with people arriving.\n"
"\n"
"<178>Example<278>: #action <178>{<278>%1 tells you '%2'<178>}\n"
"<278> <178>{<278>tell bob %1 told me '%2'<178>}<278> -- forward tells.\n"
"\n"
"<178>Example<278>: #action <178>{<278>tells you<178>}<278> #bell -- beep on tell.\n"
"\n"
"<278> You can have TinTin++ ignore actions if you type '#ignore actions on'.\n"
"\n"
"<278> You can see what commands TinTin++ executes when an action triggers\n"
"<278> by typing '#debug actions on'.\n"
"\n"
"<278> You can remove actions with the #unaction command.\n"
"\n"
"\n"
"<278> <128>Command files\n"
"\n"
"<278> When you order TinTin++ to read a command file, it parses all the text\n"
"<278> in the file. You can use command files to keep aliases/actions in,\n"
"<278> login to a server (name, password etc..) and basically all kinds of\n"
"<278> commands.\n"
"\n"
"<278> You can make the command files with either a text editor (suggested),\n"
"<278> or use the #write command to write out a file.\n"
"\n"
"<278> Commands for files:\n"
"\n"
"<278> #read filename -- read and execute the file.\n"
"\n"
"<278> #write filename -- write all actions/aliases/substitutes/etc known for\n"
"<278> the current session to a file.\n"
"\n"
"<178>Example<278>:\n"
"<278> #session x mymud.com 1234\n"
"<278> myname\n"
"<278> mypassword\n"
"<278> #split\n"
"<278> #action {^You are hungry.} {eat bread}\n"
"\n"
"<278> If you save the above five lines to a file named 'mymud.tin' you can\n"
"<278> use 'tt++ mymud.tin' to start tintin and execute the file, connecting\n"
"<278> you to your mud, logging in, enabling split mode, and setting an action\n"
"<278> to eat a bread whenever you go hungry.\n"
"\n"
"<278> <128>Highlight\n"
"\n"
"<178>Command<278>: #highlight <178>{<278>text<178>} {<278>color<178>}\n"
"\n"
"<278> This command works a bit like #action. The purpose of this command is\n"
"<278> to substitute text from the server with color you provide. This command\n"
"<278> is a simplified version of the #substitute command.\n"
"\n"
"<178>Example<278>: #high <178>{<278>Snowy<178>} {<278>light yellow<178>}\n"
"\n"
"<178>Example<278>: #high <178>{<278>%*Snowy%*<178>} {<278>light yellow<178>}\n"
"\n"
"<278> Use #unhigh to delete highlights.\n"
"\n"
"\n"
"<128> Speedwalk\n"
"\n"
"<278> If you type a command consisting ONLY of letters and numbers n, e, s,\n"
"<278> w, u, d - then this command can be interpreted as a serie of movement\n"
"<278> commands.\n"
"\n"
"<178>Example<278>: ssw2n -- go south, south, west, north, north\n"
"\n"
"<278> If you have problems with typing some commands that actually ONLY\n"
"<278> consists of these letters, then type them in CAPS. For example when\n"
"<278> checking the NEWS or when asked to enter NEW as your name.\n"
"\n"
"<278> You must enable speedwalking with: #config speedwalk on.\n"
"\n"
"\n"
"<278> <128>Ticker\n"
"\n"
"<178>Command<278>: #ticker <178>{<278>name<178>} {<278>commands<178>} {<278>seconds<178>}\n"
"\n"
"<278> The name can be whatever you want it to be, and is only required for\n"
"<278> the unticker command. The commands will be executed every x amount of\n"
"<278> seconds, which is specified in the interval part.\n"
"\n"
"<178>Example<278>: #tick <178>{<278>tick<178>} {<278>#delay 50 #show 10 SECONDS TO TICK!;#show TICK!!!<178>} {<278>60<178>}\n"
"\n"
"<278> This creates a ticker with the name <178>{<278>tick<178>}<278> which will print TICK!!!,\n"
"<278> as well as print a warning when the next tick will occure.\n"
"\n"
"<278> You can remove tickers with #untick\n"
"\n"
"\n"
"<278> <128>Repeating Commands\n"
"\n"
"<278> You can repeat a command, the syntax is: #number command\n"
"\n"
"<178>Example<278>: #5 cackle -- if you just killed bob the wizard.\n"
"<178>Example<278>: #10 <178>{<278>buy bread;put bread bag<178>}<278> -- repeat these 2 commands 10 times.\n"
"<178>Example<278>: #100 ooc w00t w00t!!!!! -- nochannel yourself.\n"
"\n"
"\n"
"<278> <128>History\n"
"\n"
"<278> TinTin++ has a limited subset of the csh history features.\n"
"\n"
"<278> ! -- repeat the last command\n"
"<278> !cast -- repeat the last command starting with cast\n"
"<278> ctrl-r -- enter the reverse history search mode.\n"
"\n"
"\n"
"<278> <128>Map commands\n"
"\n"
"<278> TinTin++ has a powerful highly configurable automapper. Whenever\n"
"<278> you type n/ne/e/se/s/sw/w/nw/n/u/d tt++ tries to keep track of your\n"
"<278> movement.\n"
"\n"
"<278> Commands for map:\n"
"\n"
"<278> #map create -- create a map.\n"
"<278> #map goto 1 -- go to the first room in the map, created by default.\n"
"<278> #map map -- display the map.\n"
"<278> #map undo -- undo your last map alteration.\n"
"<278> #map write -- save the map to file.\n"
"<278> #map read -- load a map from file.\n"
"\n"
"<278> There are many other map options and it's beyond the scope of this\n"
"<278> help section to explain everything there is to know, but I'll give\n"
"<278> a set of commands that will get most people started.\n"
"\n"
"<278> #map create\n"
"<278> #split 12 1\n"
"<278> #map flag unicode on\n"
"<278> #map flag vt on\n"
"<278> #map goto 1\n"
"\n"
"<278> These commands will create a 12 row vt100 split section at the top of\n"
"<278> your screen where a map drawn using unicode characters is displayed.\n"
"\n"
"<178>Example<278>: #action <178>{<278>There is no exit in that direction.<178>} {<278>#map undo<178>}\n"
"\n"
"<278> The map will be automatically created as you move around.\n"
"\n"
"\n"
"<278> <128>Help\n"
"\n"
"<178>Command<278>: #help <178>{<278>subject<178>}\n"
"\n"
"<278> The help command is your friend and contains the same helpfiles\n"
"<278> inside TinTin++ as are available on the website. If you type #help\n"
"<278> without an argument you will see the various available help subjects\n"
"<278> which try to explain the TinTin++ commands and features in greater\n"
"<278> detail. Entries in cyan describe commands, while entries in white\n"
"<278> describe various features, often in greater detail.\n"
"\n"
"\n"
"<278> <128>That's all for the introduction, enjoy\n"
,
"characters colors coordinates editing escape_codes greeting keypad lists mapping mathematics screen_reader sessionname speedwalk statements suspend time"
},
{
"KEYPAD",
TOKEN_TYPE_STRING,
"<278> When TinTin++ starts up it sends \\e= to the terminal to enable the\n"
"<278> terminal's application keypad mode, which can be disabled using #show {\\e>}\n"
"\n"
"<178> Configuration A Configuration B Configuration C\n"
"<268> ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮\n"
"<268> │<178>num<268> │<178>/<268> │<178>*<268> │<178>-<268> │ │<178>num<268> │<178>/<268> │<178>*<268> │<178>-<268> │ │<178>Num<268> │<178>nkp/<268> │<178>nkp*<268> │<178>nkp-<268> │\n"
"<268> ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤\n"
"<268> │<178>7<268> │<178>8<268> │<178>9<268> │<178>+<268> │ │<178>Home<268> │<178>Up<268> │<178>PgUp<268> │<178>+<268> │ │<178>nkp7<268> │<178>nkp8<268> │<178>nkp9<268> │<178>nkp+<268> │\n"
"<268> ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │\n"
"<268> │<178>4<268> │<178>5<268> │<178>6<268> │ │ │<178>Left<268> │<178>Cntr<268> │<178>Right<268>│ │ │<178>nkp4<268> │<178>nkp5<268> │<178>nkp6<268> │ │\n"
"<268> ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤\n"
"<268> │<178>1<268> │<178>2<268> │<178>3<268> │<178>Enter<268>│ │<178>End<268> │<178>Down<268> │<178>PgDn<268> │<178>Enter<268>│ │<178>nkp1<268> │<178>nkp2<268> │<178>nkp3<268> │<178>nkpEn<268>│\n"
"<268> ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │\n"
"<268> │<178>0<268> │<178>.<268> │ │ │<178>Ins<268> │<178>Del<268><268> │ │ │<178>nkp0<268> │<178>nkp.<268> │ │\n"
"<268> ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯\n"
"\n"
"<278> With keypad mode disabled numlock on will give you configuration A,\n"
"<278> and numlock off will give you configuration B. With keypad mode\n"
"<278> enabled you'll get configuration C.\n"
"\n"
"<178> Terminals that support keypad mode\n"
"\n"
"<278> Linux Console, PuTTY, MinTTY, Eterm, aterm.\n"
"\n"
"<178> Terminals that do not support keypad mode\n"
"\n"
"<278> RXVT on Cygwin, Windows Console, Gnome Terminal, Konsole.\n"
"\n"
"<178> Peculiar Terminals\n"
"\n"
"<278> RXVT requires turning off numlock to enable configuration C.\n"
"\n"
"<278> Xterm may require disabling Alt/NumLock Modifiers (num-lock) in the\n"
"<278> ctrl left-click menu. Or edit ~/.Xresources and add\n"
"<278> XTerm*VT100.numLock:false\n"
"\n"
"<278> Mac OS X Terminal requires enabling 'strict vt100 keypad behavior' in\n"
"<278> Terminal -> Window Settings -> Emulation.\n"
,
"colors coordinates escape_codes mathematics pcre"
},
{
"KILL",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #kill <178>{<278>list<178><178>} {<278>pattern<178>}\n"
"\n"
"<278> Without an argument, the kill command clears all lists. Useful if\n"
"<278> you don't want to exit tintin to reload your command files.\n"
"\n"
"<278> With one argument a specific list can be cleared.\n"
"\n"
"<278> With two arguments the triggers in the chosen list that match the\n"
"<278> given pattern will be removed.\n"
"\n"
"<178>Example<278>: #kill alias %*test*\n"
,
"class debug ignore info message"
},
{
"LINE",
TOKEN_TYPE_COMMAND,
"<178>Command<278>: #line <178>{<278>option<178>} {<278>argument<178>}\n"
"\n"
"<278> <128>Line options that alter the argument.\n"
"\n"
"<278> <178>#line json \n"
"<278> The variable is translated to json and the argument is executed\n"
"<278> with &0 holding the json data.\n"
"\n"
"<278> <178>#line strip \n"
"<278> Argument is executed with all color codes stripped.\n"
"\n"
"<278> <178>#line substitute \n"
"<278> Argument is executed using the provided substitutions, available\n"
"<278> options are: arguments, braces, colors, escapes, functions, secure,\n"
"<278> and variables.\n"
"\n"
"<278> <128>Line options that alter how the line is executed.\n"
"\n"
"<278> <178>#line background \n"
"<278> Prevent new session activation.\n"
"\n"
"<278> <178>#line benchmark \n"
"<278> Argument is executed and the elapsed time is reported after.\n"
"\n"
"<278> <178>#line capture \n"
"<278> Argument is executed and output stored in .\n"
"\n"
"<278> <178>#line convert \n"
"<278> Argument is executed with escaped meta characters.\n"
"\n"
"<278> <178>#line debug \n"
"<278> Argument is executed in debug mode.\n"
"\n"
"<278> <178>#line gag [amount]\n"
"<278> Gag the next line, or given lines. Use + or - to increase\n"
"<278> or decrease the current amount.\n"
"\n"
"<278> <178>#line ignore {argument}\n"
"<278> Argument is executed without any triggers being checked.\n"
"\n"
"<278> <178>#line local {argument}\n"
"<278> Argument is executed with all newly and indirectly\n"
"<278> created variables being local.\n"
"\n"
"<278> <178>#line log [text]\n"
"<278> Log the next line to file unless the [text] argument is\n"
"<278> provided.\n"
"\n"
"<278> <178>#line logmode