From 833c0efa3ac9635f0bccb0529b066f97f6db4c15 Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Thu, 12 Feb 2026 16:28:02 -0500 Subject: [PATCH] Add a thorough tintin document --- docs/how/tintin.rst | 7719 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 7719 insertions(+) create mode 100644 docs/how/tintin.rst diff --git a/docs/how/tintin.rst b/docs/how/tintin.rst new file mode 100644 index 0000000..00508b8 --- /dev/null +++ b/docs/how/tintin.rst @@ -0,0 +1,7719 @@ +================== +TinTin++ Reference +================== + + +Comprehensive reference for TinTin++ (tt++) extracted from source code. +Generated from version 2.02.61, master branch. + +.. contents:: Table of Contents + :depth: 3 + :local: + + +Overview +======== + + +On this page you'll find an introduction to using TinTin++. Additional +information can be found in the individual help sections. + +Starting and Ending +------------------- + +The syntax for starting TinTin++ is: ./tt++ [command file] + +Read more about the command file in the files section below. Remember +one thing though. All actions, aliases, substitutions, etc, defined +when starting up TinTin++ are inherited by all sessions. + +If you want to exit TinTin++ type '#end' or press ctrl-d on an empty +line. + +For the WinTin++ users, if you want to paste text use shift-insert, +text is automatically copied upon selection. This is typical Linux +behavior, but it can take some getting used to. + + +Basic features +-------------- + +I'll start by explaining some of the very basic and important features: + +All TinTin++ commands starts with a '#'. + +Example: #help -- #help is a client command, and isn't sent to the server. + +All TinTin++ commands can be abbreviated when typed. + +#he -- Typing #he is the same as typing #help though it's suggested to +use at least 3 letter abbreviations just in case another command is +added that starts with 'he'. + +All commands can be separated with a ';'. + +n;l dragon;s;say Dan Dare is back! -- do these 4 commands +There are 3 ways ';'s can be overruled. + +\say Hello ;) -- Lines starting with a '\' aren't parsed by TinTin++. +say Hello \;) -- The escape character can escape 1 letter. +#config verbatim on -- Everything is sent as is except '#' commands. + +Connecting to a server +---------------------- + +Command: #session {session name} {server address} {port} + +Example: #session someone tintin.sourceforge.net 4321 + +You can have more than one session, in which case you can switch +between sessions typing #. + +You can get a list of all sessions by typing: #session. The current +active session is marked with (active). Snooped sessions with +(snooped). MCCP sessions (compression) with (mccp 2) and (mccp 3). + + +Split +----- + +Command: #split + +The split command will create a separated input and output area. + +Using the #prompt command you can capture the prompt and place it on +the split line. To get rid of the split interface you can use #unsplit +which will restore the terminal settings to default. + + +Alias +----- + +Command: #alias {name} {commands} + +The syntax of the #alias command is almost like alias in csh. +Use this command to define aliases. The variables %0, %1.. %9 contain +the arguments to the aliased command as follows: +the %0 variable contains all the arguments. +the %1 variable contains the 1st argument +.... +the %9 variable contains the 9th argument + +Example: #alias greet say Greetings, most honorable %1 + +If you want an alias to execute more commands, you must use braces. + +Example: #alias ws {wake;stand} + +To delete an alias use the #unalias command. + +WARNING! TinTin++ doesn't baby sit, and hence does not check for +recursive aliases! You can avoid recursion by escaping the entire +line. + +Example: #alias put \put %1 in %2 + +Or by using the send command. + +Example: #alias put #send put %1 in %2 + + +Action +------ + +Command: #action {action-text} {commands} + +Use this command to define an action to take place when a particular +text appears on your screen. There are 99 variables you can use as +wildcards in the action-text. + +These variables are %1, %2, %3 .... %9, %10, %11 ... %97, %98, %99. + +Example: #action {You are hungry} {get bread bag;eat bread} + +Example: #action {%1 has arrived.} shake %1 -- shake hands with people arriving. + +Example: #action {%1 tells you '%2'} + {tell bob %1 told me '%2'} -- forward tells. + +Example: #action {tells you} #bell -- beep on tell. + +You can have TinTin++ ignore actions if you type '#ignore actions on'. + +You can see what commands TinTin++ executes when an action triggers +by typing '#debug actions on'. + +You can remove actions with the #unaction command. + + +Command files +------------- + +When you order TinTin++ to read a command file, it parses all the text +in the file. You can use command files to keep aliases/actions in, +login to a server (name, password etc..) and basically all kinds of +commands. + +You can make the command files with either a text editor (suggested), +or use the #write command to write out a file. + +Commands for files: + +#read filename -- read and execute the file. + +#write filename -- write all actions/aliases/substitutes/etc known for +the current session to a file. + +Example: +#session x mymud.com 1234 +myname +mypassword +#split +#action {^You are hungry.} {eat bread} + +If you save the above five lines to a file named 'mymud.tin' you can +use 'tt++ mymud.tin' to start tintin and execute the file, connecting +you to your mud, logging in, enabling split mode, and setting an action +to eat a bread whenever you go hungry. + +Highlight +--------- + +Command: #highlight {text} {color} + +This command works a bit like #action. The purpose of this command is +to substitute text from the server with color you provide. This command +is a simplified version of the #substitute command. + +Example: #high {Snowy} {light yellow} + +Example: #high {%*Snowy%*} {light yellow} + +Use #unhigh to delete highlights. + + +Speedwalk +--------- + +If you type a command consisting ONLY of letters and numbers n, e, s, +w, u, d - then this command can be interpreted as a serie of movement +commands. + +Example: ssw2n -- go south, south, west, north, north + +If you have problems with typing some commands that actually ONLY +consists of these letters, then type them in CAPS. For example when +checking the NEWS or when asked to enter NEW as your name. + +You must enable speedwalking with: #config speedwalk on. + + +Ticker +------ + +Command: #ticker {name} {commands} {seconds} + +The name can be whatever you want it to be, and is only required for +the unticker command. The commands will be executed every x amount of +seconds, which is specified in the interval part. + +Example: #tick {tick} {#delay 50 #show 10 SECONDS TO TICK!;#show TICK!!!} {60} + +This creates a ticker with the name {tick} which will print TICK!!!, +as well as print a warning when the next tick will occure. + +You can remove tickers with #untick + + +Repeating Commands +------------------ + +You can repeat a command, the syntax is: #number command + +Example: #5 cackle -- if you just killed bob the wizard. +Example: #10 {buy bread;put bread bag} -- repeat these 2 commands 10 times. +Example: #100 ooc w00t w00t!!!!! -- nochannel yourself. + + +History +------- + +TinTin++ has a limited subset of the csh history features. + +! -- repeat the last command +!cast -- repeat the last command starting with cast +ctrl-r -- enter the reverse history search mode. + + +Map commands +------------ + +TinTin++ has a powerful highly configurable automapper. Whenever +you type n/ne/e/se/s/sw/w/nw/n/u/d tt++ tries to keep track of your +movement. + +Commands for map: + +#map create -- create a map. +#map goto 1 -- go to the first room in the map, created by default. +#map map -- display the map. +#map undo -- undo your last map alteration. +#map write -- save the map to file. +#map read -- load a map from file. + +There are many other map options and it's beyond the scope of this +help section to explain everything there is to know, but I'll give +a set of commands that will get most people started. + +#map create +#split 12 1 +#map flag unicode on +#map flag vt on +#map goto 1 + +These commands will create a 12 row vt100 split section at the top of +your screen where a map drawn using unicode characters is displayed. + +Example: #action {There is no exit in that direction.} {#map undo} + +The map will be automatically created as you move around. + + +Help +---- + +Command: #help {subject} + +The help command is your friend and contains the same helpfiles +inside TinTin++ as are available on the website. If you type #help +without an argument you will see the various available help subjects +which try to explain the TinTin++ commands and features in greater +detail. Entries in cyan describe commands, while entries in white +describe various features, often in greater detail. + + +That's all for the introduction, enjoy + + +Commands +======== + + +All TinTin++ commands. Commands start with the tintin character (default #). +Commands can be abbreviated: ``#he`` is the same as ``#help``. + +action +------ + + +Command: #action {message} {commands} {priority} + +The #action command can be used to respond with one or several +commands to a specific message sent by the server. The %1-%99 +variables are substituted from the message and can be used in the +command part of the action. + +If the message starts with a ~ color codes must be matched. You can +enable #config {convert meta} on to display meta characters. + +For more information on pattern matching see the section on PCRE. + +Example: #action {%1 tells you '%2'} {tell %1 I'm afk.} + +Actions can be triggered by the #show command. If you don't want a +#show to get triggered use: #line ignore #show {text} + +Actions are ordered alphabetically and only one action can trigger at +a time. To change the order you can assign a priority, which defaults +to 5, with a lower number indicating a higher priority. The priority +can be a floating point number and should be between 1 and 9. + +To remove an action with %* as the message, use #unaction {%%*} or +#unaction {\%*}. Alternatively you could wrap the action inside a +class, and kill that class when you no longer need the action. + +Comment: You can remove an action with the #unaction command. + +See also: pcre gag highlight prompt substitute + + +alias +----- + + +Command: #alias {name} {commands} {priority} + +The #alias command can be used to shorten up long or oftenly used +commands. The %1-99 variables are substituted from the arguments when +using an alias and represent the 1st till 99th word which can be used +in the commands part of the alias. If %0 is used it will contain all +arguments. The priority part is optional and determines the priority +of the alias, it defaults to 5. + +Example: #alias {k} {kill %1;kick} + +Typing 'k orc' would result in attacking the orc followed by a kick. + +You can create multi-word aliases by using variables in the name +section. + +Example: #alias {k %1 with %2} {draw %2;attack %1;slash %1 with %2; + kick at %2;strike %1 with %2} + +Using the above alias you could type k blue smurf with battle axe + +To have an alias that matches all user input, use %* as the name. + +Example: #alias {%*} {#show You wrote: %0} + +Aliases are ordered alphabetically and only one alias can trigger at +a time. To change the order you can assign a priority, which defaults +to 5, with a lower number indicating a higher priority. The priority +can be a floating point number. + +To remove an alias with %* as the name, use #unalias {%%*} or #unalias +{\%*}. Alternatively you can wrap the alias inside a class, and kill +that class when you no longer need the alias. + +For more information on pattern matching see the section on PCRE. + +Comment: You can remove an alias with the #unalias command. + +See also: cursor history keypad macro speedwalk tab + + +all +--- + + +Command: #all {string} + +If you have multiple sessions in one terminal you can use #all to +execute the command with all sessions, excluding the startup session. + +Example: #all quit + +Sends 'quit' to all sessions. + +See also: port run session sessionname snoop ssl zap + + +bell +---- + + +Command: #bell {flash|focus|margin|ring|volume} {argument} + +The #bell command without an argument will ring the terminal bell. + +Example: #action {Bubba tells you} {#bell} + +If you aren't watching the screen this could be useful if you don't +want to miss out on a conversation with Bubba. Alternatively you can +use #system to play a sound file. + +Some terminals will allow you to use VT100 Operating System Commands +to change the terminal's bell behavior which can be used to flash the +taskbar icon and or focus the window on receival of a bell. + +Example: #action {Bubba tells you} {#screen save title;#screen set title Tell!; + #bell ring;#delay 10 #screen load title} + +The above example will save your window title, change the title to +'Tell!', ring the bell, next reset the window title after 10 seconds. + +It's possible to set the terminal to pop to the foreground upon +ringing of the alarm bell. + +Example: #bell focus on;#bell ring;#bell focus off + +It's possible to adjust the alarm bell volume on some terminals. + +Example: #loop {1} {8} {cnt} {#line substitute variables + #delay {$cnt} {#show Volume $cnt: #bell volume $cnt;#bell} + +See also: screen + + +buffer +------ + + +Command: #buffer {option} {argument} + +The buffer command has various options to manipulate your scrollback +buffer. + +The size of the scrollback buffer can be configured using #config +buffer_size . The size must be either 100, 1000, 10000, 100000 +or 1000000 lines. + +While scrolling through the scrollback buffer incoming text is not +displayed, this can be disabled using #config scroll_lock off. The +scroll lock is automatically disabled when manual input is received, +subsequently #buffer up and down only work properly when used in a +macro or mouse event. + +#buffer {clear} {[lower bound]} {[upper bound]} + +Without an argument this will clear the entire scrollback buffer. +Otherwise it will clear the given range. + +Positive numbers are measured from the start of the scrollback buffer, +negative numbers from the end. + +#buffer {down} [lines] + +Moves your scrollback buffer down one page and displays the page. If +a line number is provided it will scroll down the given number of +lines. + +#buffer {end} + +Moves you to the end of your scrollback buffer and displays the page. +Disables scroll lock mode. Most useful when used in a #macro. + +#buffer {find} {[number]} {} {[variable]} + +Moves the buffer to the given string which can contain a regular +expression. Optionally you can provide the number of matches to skip, +allowing you to jump further back in the buffer. + +A positive number searches from the start of the buffer, a negative +number from the end. If you provide a variable the location will be +stored and no jump takes place. + +#buffer {get} {} {} {[upper bound]} + +Allows you to store one or several lines from your scrollback buffer +(including color codes) into a variable. The lower and upper bound +must be between 1 and the size of the buffer. If the upper bound is +omitted the given line is stored as a standard variable. If an upper +bound is given the lines between the two bounds are stored as a list. + +Positive numbers are measured from the start of the scrollback buffer, +negative numbers from the end. + +#buffer {home} + +Moves you to the top of your scrollback buffer and displays the page. +Enables scroll lock mode. Most useful when used in a #macro. + +#buffer {info} {[save]} {[variable]} + +Display buffer info, optionally save the data to a variable. + +#buffer {jump} {} + +Moves the buffer to the given location. A positive number jumps from +the start of the buffer, a negative number from the end. + +#buffer {lock} {on|off} + +Toggles the lock on the scrollback buffer. When locked, newly incoming +text won't be displayed, any command will disable the lock, though +several buffer commands will re-enable the lock. When unlocking it'll +move you to the end of your scrollback buffer and display the page. + +#buffer {refresh} + +Marks the buffer as needing to be refreshed, only useful while in +vertical split mode. + +#buffer {up} [lines] + +Moves your scrollback buffer up one page and displays the page. +Enables scroll lock mode. Most useful when used in a #macro. You +can use #buffer {up} {1} to move the scrollback buffer up 1 line. + +#buffer {write} {} + +Writes the scrollback buffer to the given file. + +Example: #macro {\e[F} {#buffer end} + +See also: echo grep macro showme screen + + +button +------ + + +Command: #button {square} {commands} {priority} + +The #button command can be used to respond with one or several +commands to a mouse click received within the specified square. +The click coordinates are stored in %0-%3 and can be used in the +command part of the button. + +The square part should exists of two coordinates defining the +upper left and bottom right corner using row, col, row, col syntax. +The square arguments should be separated by spaces, semi-colons or +braces. + +By default the button is set to respond to a mouse button press, to +respond to other button presses you must add a 5th argument to the +square that defines the button press type. You can enable #info +button on to see button events and their type as they happen. + +The priority part is optional and determines the priority of the +button, it defaults to 5. + +You must enable #config {mouse tracking} on for buttons to work. + +This command draws no visible button, you'll have to do so separately +if needed. + +Example: #button {1;1;2;2} {#show You clicked the upper left corner.} + +Buttons are ordered alphabetically and only one button can trigger at +a time. To change the order you can assign a priority, which defaults +to 5, with a lower number indicating a higher priority. The priority +can be a floating point number. + +Comment: To see button clicks trigger use #info button on. + +Comment: You can remove a button with the #unbutton command. + +See also: delay event ticker + + +cat +--- + + +Command: #cat {variable} {argument} + +The cat command will concatenate the argument to the given variable. + +See also: format function local math replace script variable + + +chat +---- + + +Command: #chat {option} {argument} + +The #chat command is used to create peer to peer connections to other +clients, typically for the purpose of chatting and sending files. +This is a decentralized chat system, meaning you have to exchange ip +addresses and port numbers with other users in order to connect to +them. Chat events are triggered in the startup session. + +:: + + #chat {init} {port} + #chat initialize launches your chat server. The port number is + optional, and by default 4050 is used as your port. After using + this command other people can connect to your chat server using + your ip address and port number, and in turn you can connect to + other people. + #chat {name} {name} + By default your name is set to TinTin, but most servers will + reject you if there is already someone with the name TinTin + connected, so one of the first things you'd want to do is + change your chat name. Your name can include color codes. Some + names aren't accepted by tt++ chat servers, like the name 'all' + and names longer than 20 characters. + #chat {message} {buddy|all} {text} + This is the main command used for communication. If you use + #chat message all, the message is marked as public and sent to + everyone you are connected to. + #chat {accept} {buddy} {boost} + Accept a file transfer from a buddy. The boost is optional and + must be a value between 1 and 1000. + #chat {call} {address} {port} + #chat call is used to connect to another chat server. If you + omit the port argument the default port (4050) is used. + #chat {cancel} {buddy} Cancel a file transfer + #chat {color} {color names} Set the default color + #chat {decline} {buddy} Decline a file transfer + #chat {dnd} Decline new connections + #chat {download} {directory} Set your download directory + #chat {emote} {buddy|all} {text} Send an emote message + #chat {forward} {buddy} Forward all chat messages + #chat {forwardall} {buddy} Forward all session output + #chat {filestat} {buddy} Show file transfer data + #chat {group} {buddy} {name} Assign a chat group + #chat {ignore} {buddy} Ignores someone + #chat {info} Displays your info + #chat {ip} {address} Changes your IP address + #chat {paste} {buddy|all} {text} Pastes a block of text + #chat {peek} {buddy} Show one's public connections + #chat {ping} {buddy} Display response time + #chat {private} {buddy|all} Make a connection private + #chat {public} {buddy|all} Make a connection public + #chat {reply} {text} Reply to last private message + #chat {request} {buddy} Request one's public connections + #chat {send} {buddy|all} {text} Sends a raw data string + #chat {sendfile} {buddy} {filename} Start a file transfer + #chat {serve} {buddy} Forward all public chat messages + #chat {uninitialize} Uninitialize the chat port. + #chat {who} + #chat who shows all people you are connected to. The first + column shows a reference number for the connection, which can be + used instead of the connection's name when sending someone a message + The second column shows the connection's name. The third column + shows flags set for the connection, (P)rivate, (I)gnore, (S)erve, + Forward(A)ll to user, (F)orward to user, and (f)orward from user. + The next columns show ip, port, and client name. + #chat {zap} {buddy} Close a connection + +See also: port + + +class +----- + + +Command: #class {name} {option} {arg} + +The class command is primarily used to assign groups of triggers and +variables a label so they can be easily removed. + +#class {} {assign} {} + Will open the class, execute argument, and close afterwards. +#class {} {clear} + Will delete all triggers associated with the given class. +#class {} {close} + Close the given class, opening the last open class, if any. +#class {} {debug} {on|off} + Toggle debug mode for given class. +#class {} {kill} + Will clear, close, and remove the class. +#class {} {list} + List all triggers associated with the given class. +#class {} {load} + Will load the saved copy of the class from memory. +#class {} {open} + Open a class, closing a previously opened class. All triggers + added afterwards are assigned to this class. +#class {} {read} { + Will open the class, read the file, and close afterwards. +#class {} {save} + Will save all triggers of the given class to memory. +#class {} {size} {} + Will store the size of the class in a variable. +#class {} {write} {} + Will write all triggers of the given class to file. + +Keep in mind that you need to use #class save before using +#class clear and #class load + +Example: #class rich kill;#class rich read poor.tin +Deletes all triggers of 'rich' class if any. Read 'poor.tin' file, +all triggers loaded will be assigned to the 'rich' class. + +See also: config debug ignore info kill line message + + +commands +-------- + + +Command: #commands {abbreviation} + +Shows all commands, or all commands starting with the given +abbreviation. + +See also: help info statements + + +config +------ + + +Command: #config {option} {argument} + +This allows you to configure various settings, the settings can be +written to file with the #write command. + +If you configure the global session (the one you see as you start up +tintin) all sessions started will inherite these settings. + +It's advised to make a configuration file to read on startup if you +do not like the default settings. + +Use #config without an argument to see your current configuration as +well as a brief explanation of each config option. + +The following config options are not listed by default: + +#CONFIG {AUTO TAB} {NUMBER} Buffer lines used for tab completion +#CONFIG {CHILD LOCK} {ON|OFF} Enable or disable command input. +#CONFIG {CONNECT RETRY} {NUMBER} Seconds to try to connect on failure. +#CONFIG {CONVERT META} {ON|OFF} Shows color codes and key bindings. +#CONFIG {DEBUG TELNET} {ON|OFF} Shows telnet negotiations y/n. +#CONFIG {HIBERNATE} {ON|OFF} Enable or disable low CPU usage mode. +#CONFIG {LOG LEVEL} {LOW|HIGH} LOW logs server output before triggers. +#CONFIG {INHERITANCE} {ON|OFF} Session trigger inheritance y/n. +#CONFIG {MCCP} {ON|OFF} Enable or disable MCCP support. +#CONFIG {RANDOM SEED} {NUMBER} Seed value used for random numbers. +#CONFIG {TAB WIDTH} {NUMBER} Number of spaces used for a tab +#CONFIG {TINTIN CHAR} {SYMBOL} Character used for TinTin++ commands. + +See also: class line + + +cr +-- + + +Command: #cr + +Sends a carriage return to the session. Useful for aliases that need +extra carriage returns. + +This command is obsolete as you can accomplish the same using #send +without an argument or #send {}. + +See also: forall + + +cursor +------ + + +Command: #cursor {option} {argument} + +Typing #cursor without an option will show all available cursor +options, their default binding, and an explanation of their function. + +The cursor command's primarly goal is adding customizable input editing +with macros. Subsequently many cursor commands only work properly when +used within a macro or event. + +#cursor flag + +EOL end of line character(s) +ECHO local echo +OVERTYPE overtype mode +KEYPAD keypad mode + +#cursor macro + +PRESERVE do not erase the macro from the macro input buffer +RESET erase the macro input buffer + +#cursor tab + +CASELESS makes tab completion caseless +COMPLETE makes tab completion work while editing + +DICTIONARY performs tab completion on the dictionary +INPUT performs tab completion on the input history +LIST performs tab completion on the tab completion list +SCROLLBACK performs tab completion on the scrollback buffer + +BACKWARD specifies tab completion to go backward +FORWARD specifies tab completion to go forward + +Multiple options can/must be specified at once. + +See also: alias history keypad macro speedwalk tab + + +daemon +------ + + +Command: #daemon {attach|detach|kill|list} [name] + +#daemon provides functionality similar to that of the screen and tmux +utilities. + +#daemon attach [name] + The attach option will try to find a daemonized tintin instance and + take over control. The name argument is optional. + +#daemon detach [name] + The detach option will daemonize tintin, turning it into a background + process. The name argument is optional and is useful if you have + several daemonized tt++ instances running so you can keep them apart. + +#daemon kill [name] + Kills all daemons or daemons with matching name. + +#daemon list [name] + List all daemons or daemons with matching name. + +You can launch tintin and attach the first daemonized instance using +tt++ -R. To attach a named instance use tt++ -R. + +See also: script system run + + +debug +----- + + +Command: #debug {listname} {on|off|log} + +Toggles a list on or off. With no argument it shows your current +settings, as well as the list names that you can debug. + +If you for example set ACTIONS to ON you will get debug information +whenever an action is triggered. + +#debug {listname} {log} will silently write debugging information to +the log file, you must be logging in order for this to work. + +Not every list has debug support yet. + +See also: class ignore info kill message + + +delay +----- + + +Command: #delay {seconds} {command} +Command: #delay {name} {command} {seconds} + +Delay allows you to have tintin wait the given amount of seconds +before executing the given command. + +Nanosecond floating point precision is allowed. Delays will fire in +0.01 second intervals. + +Named delays are treated as one-shot tickers, see #help tick. + +Example: #delay {1} {#show last};#show first +This will print 'first', and 'last' around one second later. + +Comment: If you want to remove a delay with the #undelay command you can add +a name as the first argument, be aware this changes the syntax. If +the name is a number keep in mind that delays with the same numeric +name will not be overwritten + +See also: event ticker + + +draw +---- + + +Command: #draw [line color] [options] {text} + +The draw commands allows you to draw various types of lines and shapes +on the screen. The types with a brief description are provided when you +type #draw without an argument. + +The arguments should exists of two coordinates defining the +upper left and bottom right corner using row, col, row, col syntax. + +The square arguments can be negative, in which case the coordinates +are calculated from the opposite side of the screen. In the case the +screen is 80 columns wide using #draw box 1 60 10 70 will be the +equivalent of #draw box 1 -21 10 -11, but with different screen +widths the boxes would be drawn in different places. + +You can prefix the option with a color code or color name to color the +lines and shapes. + +You can further prefix the option as following: + +ASCII draw in ASCII mode. +BALIGN bottom align text. +BLANKED blank the lines and corners. +BOTTOM draw on the bottom side if possible. +BOXED draw a box along the square. +BUMPED precede the draw with an enter. +CALIGN both LALIGN and RALIGN to center text. +CIRCLED circle the corners. +CONVERT draw text with meta conversion. +CROSSED cross the corners. +CURSIVE draw text with cursive letters. +FAT draw text with fat letters. +FILLED fill circles and jewels. +FOREGROUND draw even if session is not active. +GRID draw TABLE as a grid. +HORIZONTAL draw horizontal if possible. +HUGE draw text in huge letters. +JEWELED diamond the corners. +JOINTED draw corners. +LALIGN left align text. +LEFT draw on the left side if possible. +NUMBERED draw numbers instead of lines. +PRUNED prune the corners. +RALIGN right align text. +RIGHT draw on the right side if possible. +ROUNDED round the corners. +SANSSERIF draw text with sansserif letters. +SCALED fit the square to the text size. +SCROLL draw in the scrolling region. +SHADOWED shadow HUGE text. +TALIGN top align text too large to fit. +TEED tee the corners. +TOP draw on the top side if possible. +TRACED trace HUGE text. +TUBED draw tubes instead of lines. +UALIGN unwrap and rewrap text. +UNICODE draw in unicode mode. +VERTICAL draw vertical if possible. + +The following types are available. + +[HORIZONTAL] BAR {;;[COLOR]} + will draw a bar, use two 256 color codes for a color gradient. +[ASCII|UNICODE|HUGE] BOX {[TEXT1]} {[TEXT2]} + will draw a box. +[BOXED|FOREGROUND] BUFFER + will draw the scrollback buffer. +[BLANKED|CIRCLED|CROSSED|JEWELED|ROUNDED|TEED|PRUNED] CORNER + will draw a corner. +[BLANKED|HORIZONTAL|NUMBERED|TUBED|VERTICAL] LINE {[TEXT]} + will draw a line. +[BOXED] MAP + will draw the map +RAIN {} {[SPAWN]} {[FADE]} {[LEGEND]} + will draw digital rain SPAWN (0.01-100) FADE (1-100). +[JOINTED|TOP|LEFT|BOTTOM|RIGHT] SIDE + will draw one or more sides of a box. +[GRID] TABLE {[LIST1]} {[LIST2]} + will draw a table. +[CURSIVE|FAT|HUGE|SANSSERIF] TILE {[TEXT1]} {[TEXT2]} + will draw a tile + +All draw types take an optional text argument as long as a valid +square with enough space has been defined. Text is automatically +word wrapped and text formatting can be customized with the +BALIGN, TALIGN, LALIGN, RALIGN, and UALIGN options. + +Example: #draw Blue box 1 1 3 20 {Hello world!} + +See also: buffer echo grep showme + + +echo +---- + + +Command: #echo {format} {argument1} {argument2} {etc} + +Echo command displays text on the screen with formatting options. See +the help file for the format command for more information. + +The echo command does not trigger actions. + +As with the #show command you can split the {format} argument up into +two braced arguments, in which case the 2nd argument is the row number. + +Example: #echo {The current date is %t.} {%Y-%m-%d %H:%M:%S} +#echo {[%38s][%-38s]} {Hello World} {Hello World} +#echo {{this is %s on the top row} {1}} {printed} + +See also: buffer format grep showme + + +edit +---- + + +Command: #edit {option} [argument] + +The edit command can be used to turn the default line editor into a +text editor. + +#edit create [filename] [arguments] + Create an editor, initialize using the provided arguments. + +#edit load + Create an editor, initialize using the provided list variable. + +#edit read + Create an editor, initialize using the provided file. + +#edit resume + Resume editing after a suspension. + +#edit save + Save the editor to the provided variable. + +#edit suspend + Suspend editing, similar to pressing enter except that no + events are triggered. + +#edit write [filename] + Write the editor content to file. + +Example: #edit create {bla.txt} {line 1} {line 2} + +See also: cursor macro + + +end +--- + + +Command: #end {} + +Terminates tintin and return to unix. On most systems, ctrl-c has +the same result. + +The message is optional and is printed before tintin exits. When +using #end {\} tintin will terminate silently. + +See also: zap + + +event +----- + + +Command: #event {event type} {commands} + +Events allow you to create triggers for predetermined client events. + +Use #event without an argument to see a list of possible events with +a brief description. Use #event %* to see the current list of defined +events. Use #info {events} {on} to see events get thrown. + +Events, like triggers in general, are case sensitive and event names +must be defined using all upper case letters. Only one event can be +defined for each event type. + +To enable mouse events use #config mouse_tracking on, to see mouse +events use #config mouse_tracking info. + +CATCH EVENTS + +CATCH + Some events can be prefixed with CATCH to interrupt default + behavior. + +CLASS EVENTS + +CLASS ACTIVATED [CLASS], CLASS_CLEAR [CLASS], CLASS CREATED [CLASS], +CLASS DEACTIVATED [CLASS], CLASS DESTROYED [CLASS], +CLASS_LOAD [CLASS] + +| %0 class name + +FORMAT EVENTS + +REFORMAT Use #return to change MESSAGE + +GAG EVENTS + +GAG + Some events can be prefixed with GAG to gag default system + messages. + +INPUT EVENTS + +EDIT STARTED, EDIT FINISHED + %0 name %1 lines %2 size %3 data + +EDIT RESUMED, EDIT SUSPENDED + %0 name + +HISTORY UPDATE + %0 command + +RECEIVED KEYPRESS, PROCESSED KEYPRESS + %0 character %1 unicode index %2 edit row %3 edit column + +RECEIVED INPUT [NAME] + %0 raw text + +RECEIVED INPUT CHARACTER + %0 character %1 unicode index %2 size %3 width + +NO SESSION ACTIVE %0 raw text %1 size +SEND OUTPUT %0 raw text %1 size +SENT OUTPUT %0 raw text %1 size + +MAP EVENTS + +END OF PATH, END OF RUN, MAP UPDATED VTMAP + These events have no additional arguments. + +MAP CREATE EXIT, MAP DELETE EXIT + %0 vnum %1 exit name %2 exit cmd %3 exit vnum + +MAP CREATE ROOM, MAP DELETE ROOM + %0 vnum %1 name + +MAP ENTER MAP, MAP EXIT MAP + %0 vnum + +MAP ENTER ROOM [VNUM] + %0 new vnum %1 old vnum %2 direction + +MAP EXIT ROOM [VNUM] + %0 old vnum %1 new vnum %2 direction + +MAP FOLLOW MAP, MAP FOLLOW GLOBAL + %0 old vnum %1 new vnum %2 exit name + +MAP REGION , MAP ROOM + %0 row %1 col %2 -row %3 -col %4 vnum %5 info + +MOUSE EVENTS + +DOUBLE-CLICKED %0 row %1 col %2 -row %3 -col %4 word %5 line +LONG-CLICKED %0 row %1 col %2 -row %3 -col %4 word %5 line +MOVED %0 row %1 col %2 -row %3 -col %4 word %5 line +PRESSED %0 row %1 col %2 -row %3 -col %4 word %5 line +SHORT-CLICKED %0 row %1 col %2 -row %3 -col %4 word %5 line +RELEASED %0 row %1 col %2 -row %3 -col %4 word %5 line +SCROLLED %0 row %1 col %2 -row %3 -col %4 word %5 line +TRIPLE-CLICKED %0 row %1 col %2 -row %3 -col %4 word %5 line + +MAP + Mouse events can be prefixed with MAP to only trigger when the mouse + event occurs inside the VT100 map region. + +SWIPED [DIR] + %0 dir %1 button %2 row %3 col %4 -row %5 -col + %6 row %7 col %8 -row %9 -col %10 rows %11 cols + +OUTPUT EVENTS + +BUFFER UPDATE, DISPLAY UPDATE + These events have no additional arguments. + +PROCESSED LINE %0 raw text %1 plain text %2 prompt (0 or 1) + +RECEIVED LINE %0 raw text %1 plain text +RECEIVED OUTPUT %0 raw text %1 plain text +RECEIVED PROMPT %0 raw text %1 plain text + +PORT EVENTS + +CHAT MESSAGE %0 raw text %1 plain text +CHAT SNOOP REQUEST %0 name %1 ip %2 port + +PORT CONNECTION %0 name %1 ip %2 port +PORT DISCONNECTION %0 name %1 ip %2 port +PORT LOG MESSAGE %0 name %1 ip %2 port %3 data %4 plain data +PORT MESSAGE %0 raw text %1 plain text +PORT RECEIVED MESSAGE %0 name %1 ip %2 port %3 data %4 plain data +PORT RECEIVED DATA %0 name %1 ip %2 port %3 data %4 size + +SCAN EVENTS + +SCAN CSV HEADER %0 all args %1 arg1 %2 arg2 .. %99 arg99 +SCAN CSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99 +SCAN TSV HEADER %0 all args %1 arg1 %2 arg3 .. %99 arg99 +SCAN TSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99 + +SCREEN EVENTS + +SCREEN DIMENSIONS %0 height %1 width +SCREEN FOCUS %0 focus (0 or 1) +SCREEN LOCATION %0 rows %1 cols %2 height %3 width + +SCREEN MOUSE LOCATION + %0 row %1 col %2 -row %3 -col %4 pix row %5 pix col + %6 -pix row %7 -pix col %8 location + +SCREEN RESIZE %0 rows %1 cols %2 height %3 width +SCREEN SIZE %0 rows %1 cols +SCREEN SPLIT %0 top row %1 top col %2 bot row %3 bot col +SCREEN UNSPLIT %0 top row %1 top col %2 bot row %3 bot col + +SESSION EVENTS + +SESSION ACTIVATED %0 name +SESSION CONNECTED %0 name %1 host %2 ip %3 port %4 file +SESSION CREATED %0 name %1 host %2 ip %3 port %4 file +SESSION DEACTIVATED %0 name +SESSION DISCONNECTED %0 name %1 host %2 ip %3 port +SESSION TIMED OUT %0 name %1 host %2 ip %3 port + +SYSTEM EVENTS + +CONFIG %0 name %1 value + +DAEMON ATTACH TIMEOUT %0 file %1 pid +DAEMON ATTACHED %0 file %1 pid +DAEMON DETACHED %0 file %1 pid +PROGRAM START %0 startup arguments +PROGRAM TERMINATION %0 goodbye message + +READ ERROR %0 filename %1 error message +READ FILE %0 filename +WRITE ERROR %0 filename %1 error message +WRITE FILE %0 filename + +RECEIVED ERROR %0 message +SYSTEM CRASH %0 message +SYSTEM ERROR %0 name %1 system msg %2 error %3 error msg +UNKNOWN COMMAND %0 raw text +SIGUSR %0 signal + +TELNET EVENTS + +IAC + IAC TELNET events are made visible using #config telnet info. + +IAC SB GMCP %0 module %1 data %2 plain data +IAC SB GMCP %1 data %2 plain data +IAC SB MSSP %0 variable %1 data +IAC SB MSDP %0 variable %1 data %2 plain data +IAC SB MSDP [VAR] %0 variable %1 data %2 plain data +IAC SB NEW-ENVIRON %0 variable %1 data %2 plain data +IAC SB ZMP %0 variable %1 data +IAC SB %0 variable %1 raw data %2 plain data + +TIME EVENTS + +DATE [HOUR:MINUTE], DAY [DAY OF MONTH], +HOUR [HOUR], MONTH [DAY OF MONTH], TIME [:SECOND], +WEEK [DAY OF WEEK], YEAR [YEAR] + +| %0 year %1 month %2 day of week %3 day of month %4 hour +| %5 minute %6 second + +VARIABLE EVENTS + +VARIABLE UPDATE %0 name %1 new value %2 path +VARIABLE UPDATED %0 name %1 new value %2 path + +VT100 EVENTS + +VT100 SCROLL REGION %0 top row %1 bot row %2 rows %3 cols %4 wrap + +To see all events trigger use #info event on. Since this can get +rather spammy it's possible to gag event info messages. + +Example: #event {SESSION CONNECTED} {#read mychar.tin} + +Comment: You can remove an event with the #unevent command. + +See also: button delay ticker + + +format +------ + + +Command: #format {variable} {format} {argument1} {argument2} {etc} + +Allows you to store a string into a variable in the exact same way +C's sprintf works with a few enhancements and limitations like a +maximum of 30 arguments. + +If you use #format inside an alias or action you must escape %1s as +%+1s or %%1s or %\1s so the %1 isn't substituted by the trigger. + +:: + + #format {test} {%+9s} {string} pad string with up to 9 spaces + #format {test} {%-9s} {string} post pad string with up to 9 spaces + #format {test} {%.8s} {string} copy at most 8 characters + #format {test} {%a} {number} print corresponding charset character + #format {test} {%c} {string} use a highlight color name + #format {test} {%d} {number} print a number with integer formatting + #format {test} {%f} {string} perform floating point math + #format {test} {%g} {number} perform thousand grouping on {number} + #format {test} {%h} {string} turn text into a header line + #format {test} {%l} {string} lowercase text + #format {test} {%m} {string} perform mathematical calculation + #format {test} {%n} {name} capitalize the first letter + #format {test} {%p} {string} strip leading and trailing spaces + #format {test} {%r} {string} reverse text, hiya = ayih + #format {test} {%s} {string} print given string + #format {test} {%t} {format} display time with strftime format + optional {{format}{time}} syntax + #format {test} {%u} {string} uppercase text + #format {list} {%w} {string} store word wrapped text in {list} + optional {{string}{width}} syntax + #format {test} {%x} {hex} print corresponding charset character + #format {test} {%A} {char} store corresponding character value + #format {test} {%D} {hex} convert hex to decimal in {test} + #format {hash} {%H} {string} store a 64 bit string hash in {hash} + #format {test} {%L} {string} store the string length in {test} + #format {test} {%M} {number} convert number to metric in {test} + #format {test} {%S} {string} store the number of spelling errors + #format {time} {%T} {} store the epoch time in {time} + #format {time} {%U} {} store the micro epoch time in {time} + #format {test} {%X} {dec} convert dec to hexadecimal in {test} + +#format {test} {%%} a literal % character + +Comment: See #help TIME for help on the %t argument. + +See also: cat echo function local math replace script time variable + + +function +-------- + + +Command: #function {name} {operation} + +Functions allow you to execute a script within a line of text, and +replace the function call with the line of text generated by the +function. + +Be aware that each function should use the #return command at the +end of the function with the result, or set the {result} variable. + +To use a function use the @ character before the function name. +The function arguments should be placed between braces behind the +function name with argument separated by semicolons. + +Functions can be escaped by adding additional @ signs. + +Example: #function test #return 42;#showme @@test{} + +The function itself can use the provided arguments which are stored +in %1 to %99, with %0 holding all arguments. + +Example: #function {rnd} {#math {result} {1 d (%2 - %1 + 1) + %1 - 1}} +#show A random number between 100 and 200: @rnd{100;200} + +Example: #function gettime {#format result %t %H:%M} +#show The current time is @gettime{} + +Comment: You can remove a function with the #unfunction command. + +See also: format local math replace script variable + + +gag +--- + + +Command: #gag {string} + +Removes any line that contains the string. + +Comment: See '#help action', for more information about triggers. + +There are a system messages that can be gagged using gag events. + +Comment: You can remove a gag with the #ungag command. + +See also: action highlight prompt substitute + + +grep +---- + + +Command: #grep [page] {search string} + +This command allows you to search for matching lines in your scroll +back buffer. The amount of matches shown equals your screen size. If +you want to search back further use the optional page number. You can +use wildcards for better search results. Be aware the search string +is case sensitive, which can be disabled by using %i. + +By default grep searches from the end of the scrollback buffer to the +beginning, this can be reversed by using a negative page number. + +Example: #grep Bubba tells you +This will show all occasions where bubba tells you something. + +See also: buffer echo showme + + +help +---- + + +Command: #help {subject} + +Without an argument #help will list all available help subjects. + +Using #help %* will display all help entries. + +See also: commands debug ignore info message statements + + +highlight +--------- + + +Command: #highlight {string} {color names} {priority} + +The highlight command is used to change the color of incoming text. + +Available color options are: + +reset - resets the color state to default +light - turns the color light. +dark - turns the color dark. +underscore - underscores the text. +blink - makes the text blink. +reverse - reverse foreground and background color. +b - makes next color the background color. + +Available color names are: + + - azure - Azure + - blue - Blue + - cyan - Cyan + - ebony - Ebony + - green - Green + - jade - Jade + - lime - Lime + - magenta - Magenta + - orange - Orange + - pink - Pink + - red - Red + - silver - Silver + - tan - Tan + - violet - Violet + - white - White + - yellow - Yellow + +Colors can be provided as either a color code or one of the valid color +names. If the color name is in all lower case a dark color is printed. +If the first letter of the color name is capitalized a light color is +printed. + +The %1-99 variables can be used as 'wildcards' that will match with any +text. They are useful for highlighting a complete line. The %0 variable +should never be used in highlights. + +You may start the string to highlight with a ^ to only highlight text +if it begins the line. + +Besides color names also color codes can be used. + +Example: #high {Valgar} {reverse underscore Jade} +Prints every occurrence of 'Valgar' in underscored reverse video Jade. + +Example: #high {^You{\|r} %1} {light cyan} +Prints every line that starts with 'You' in light cyan. + +Example: #high {Bubba} {red underscore b Green} +Highlights the name Bubba as red underscored text on green background. + +Comment: See '#help action', for more information about triggers. + +Comment: See '#help substitute', for more advanced color substitution. + +Comment: This command only works with ANSI/VT100 terminals or emulators. + +Comment: You can remove a highlight with the #unhighlight command. + +See also: action gag prompt substitute + + +history +------- + + +Command: #history {delete} Delete the last command. +#history {get} {variable} {range} Store list in variable. +#history {insert} {command} Insert a command. +#history {list} Display the command history. +#history {read} {filename} Read a command history from file. +#history {write} {filename} Write a command history to file. + +Without an argument all available options are shown. + +By default all commands are saved to the history list and the history +list is saved between sessions in the ~/.tintin/history.txt file. + +You can set the character to repeat a command in the history with the +#config {REPEAT CHAR} {} configuration option, by default +this is set to the exclamation mark. + +You can use ! by itself to repeat the last command, or ! to +repeat the last command starting with the given text. + +You can use #config {REPEAT ENTER} {ON} to repeat the last command +when you press enter on an empty line. + +You can press ctrl-r to enter an interactive regex enabled history +search mode, or by issuing #cursor {history search}. + +TinTin++ tries to bind the arrow up and down keys to scroll through +the history list by default. You can bind these with a macro yourself +using #cursor {history next} and #cursor {history prev}. Many #cursor +commands only work properly when bound with a macro. + +See also: alias cursor keypad macro speedwalk tab + + +if +-- + + +Command: #if {conditional} {commands if true} {commands if false} + +The #if command works similar to an if statement in other languages, +and is based on the way C handles its conditional statements. +When an #if command is encountered, the conditional statement is +evaluated, and if TRUE (any non-zero result) the commands are executed. + +The conditional is evaluated exactly the same as in the #math command, +if the conditional evaluates as anything except 0 the commands are +executed. See the 'math' helpfile for more information. + +To handle the case where an if statement is false it can be followed +by the #else command. Alternatively, the else can be provided as the +third argument. + +Example: #action {%0 gives you %1 gold coins.} {#if {%1 > 5000} {thank %0}} +If someone gives you more than 5000 coins, thank them. + +Example: #alias {k} {#if {"%0" == ""} {kill $target};#else {kill %0}} + +Example: #if {"%0" == "{bli|bla}"} {#showme %0 is either bli or bla.} + +See also: case default else elseif math switch regexp + + +ignore +------ + + +Command: #ignore {listname} {on|off} + +Toggles a list on or off. With no arguments it shows your current +settings, as well as the list names that you can ignore. + +If you for example use #IGNORE ACTIONS ON actions will no longer +trigger. Not every list can be ignored. + +See also: class debug info kill message + + +info +---- + + +Command: #info {listname} {LIST|ON|OFF|SAVE} + +Without an argument info displays the settings of every tintin list. + +By providing the name of a list and the LIST option it shows all +triggers/variables associated with that list. With the SAVE option +this data is written to the info variable. + +#info arguments will show matched trigger arguments. +#info big5toutf will show the big5 to utf8 translation table. +#info cpu will show information about tintin's cpu usage. +#info environ will show the environment variables. +#info input will show information about the input line. +#info matches will show matched command arguments. +#info mccp will show information about data compression. +#info memory will show information about the memory stack. +#info output will show information about the mud output buffers. +#info stack will show the low level debugging stack. +#info session will show information on the session. +#info sessions will show information on all sessions. +#info system will show some system information. +#info tokenizer will show information about the script stack. +#info unicode will show information on the provided character. + +See also: class debug ignore kill message + + +kill +---- + + +Command: #kill {list} {pattern} + +Without an argument, the kill command clears all lists. Useful if +you don't want to exit tintin to reload your command files. + +With one argument a specific list can be cleared. + +With two arguments the triggers in the chosen list that match the +given pattern will be removed. + +Example: #kill alias %*test* + +See also: class debug ignore info message + + +line +---- + + +Command: #line {option} {argument} + +Line options that alter the argument. + +#line json + The variable is translated to json and the argument is executed + with &0 holding the json data. + +#line strip + Argument is executed with all color codes stripped. + +#line substitute + Argument is executed using the provided substitutions, available + options are: arguments, braces, colors, escapes, functions, secure, + and variables. + +Line options that alter how the line is executed. + +#line background + Prevent new session activation. + +#line benchmark + Argument is executed and the elapsed time is reported after. + +#line capture + Argument is executed and output stored in . + +#line convert + Argument is executed with escaped meta characters. + +#line debug + Argument is executed in debug mode. + +#line gag [amount] + Gag the next line, or given lines. Use + or - to increase + or decrease the current amount. + +#line ignore {argument} + Argument is executed without any triggers being checked. + +#line local {argument} + Argument is executed with all newly and indirectly + created variables being local. + +#line log [text] + Log the next line to file unless the [text] argument is + provided. + +#line logmode