[Home] [Downloads] [Search] [Help/forum]

Release notes for MUSHclient version 2.16.00

Version 2.16.00

Released on 23 May 2000


Spell checker - can check on request or automatically
Custom colours - 16 extra colours for triggers, and other uses
Perl-compatible regular expressions in triggers, aliases, find screens
Improved trigger-handling - can match on multiple lines
Triggers that match on multi lines pass all lines to scripts
Triggers can now be used to colour individual words, not just the whole line
Fixed bug re command area increasing in size
Option to omit alias from output
Button to swap normal and bold colours
Double-click to send word to world
Double-clicking to select words now selects wider range of characters
Tab-completion now selects underscore and hyphens as well as alpha characters
Spin button control problems corrected (re. entering 1,000)
Recall feature recalls text into a separate window
Find now searches for paragraphs
Configuration screens layout improvements
Configuration screens "highlighting" and "strings" removed
More scripting properties
Support for PerlScript

The new features are described in detail below.

BTW - "colour" is the Australian spelling of the word "color". :)


MUSHclient now incorporates a spell checker supplied by Wintertree Software Inc.

You can spell-check on request (CTRL+J) or automatically every time you send a line to the MUD.

First, you must enable spell-checking in the File -> Preferences -> Connection/Spell Checker screen. Check the "enable spell check" checkbox, and click on "Spell Check Options" to set options, such as whether the checker should ignore capitalised words, or check for repeated words (like "the the").

Then, you can enable automatic spell checking from World Configuration -> Input -> Commands -> Spell Check On Send.

Alternatively, just spell-check when you want to by pressing Ctrl+J (or use Edit -> Spell Check).

Special words (MUD words) can be added to your user dictionary.

If you want British (Australian) spelling then please also download british_dict.zip which contains British dictionaries, and unzip it into the "spell" subdirectory. Then select "British English" from the Spell Check Options dialog box.

If you want to spell-check other languages then please email me and we will discuss it.

If anyone thinks a spell-checker is so useless they would prefer it to not appear in the main download, I would be interested to hear from you.


A major enhancement to this version is the addition of 16 custom colours for use in triggers (and for echoing commands). Unlike the earlier versions the custom colours are independent of the 8 normal and 8 bold ANSI colours, and *also* allow the background to be set.

In other words, you can have a trigger highlight a word in blue-on-green if you want.

The colour swatches in the colour window have been implemented differently. You now click on the colour itself to change it.

For backwards compatibility your existing *bold* colours have been migrated to the first 8 custom colours, so that triggers will initially look the same.

There is also an option to swap the bold/normal colours, as requested by a MUSHclient user.

You can change the colours from a script - see further on in this document for details.


The configuration screens are now presented as a "tree-view" on the left, with the different screens appearing as you navigate through the tree view.

Press CTRL+PAGE_DOWN or CTRL+PAGE_UP to change screens via the keyboard.

The program remembers which screen you last had open, so pressing CTRL+G (or ALT+ENTER) is a quick way of returning to the last thing you were configuring.

The previous keyboard equivalents for displaying configuration screens (eg. ALT+5 for the Output screen) still work, however they now display the full configuration view, with the appropriate screen selected.

Triggers, aliases and timers have been moved from their own (rather confusingly-named) section "triggers" into more relevant sections.

Triggers now appears under "Appearance" section.
Aliases now appears under "Input" section".
Timers now appears under "General" section.


Regular expression handling has been upgraded to the "Perl-compatible" routines supplied by Philip Hazel of The University of Cambridge. These are basically more powerful than the previous routines.

Read about Perl Compatible Regular Expressions (PCRE) in the file "RegularExpressions.txt".

The idea of doing this arose from a query from a player, who wanted to congratulate other players when they rose a level, but *not* congratulate himself. There was no easy way of doing that with the earlier regular expressions (short of writing a script routine), however with PCRE you can do something like this:

^(?!Nick )(\w*) has risen to .*$

This matches on a word of any length (\w*) however it asserts that the word is not "Nick".

Thanks to Alan Schwartz for suggesting PCRE to solve this problem. :)

There are various new "special" characters in PCRE, such as:

\d any decimal digit
\D any character that is not a decimal digit
\s any whitespace character
\S any character that is not a whitespace character
\w any "word" character
\W any "non-word" character

PCRE also supports the POSIX notation for character classes, which uses names enclosed by [: and :] within the enclosing square brackets. PCRE supports this notation. For example,


matches "0", "1", any alphabetic character, or "%". The supported class names are

alnum letters and digits
alpha letters
ascii character codes 0 - 127
cntrl control characters
digit decimal digits (same as \d)
graph printing characters, excluding space
lower lower case letters
print printing characters, including space
punct printing characters, excluding letters and digits
space white space (same as \s)
upper upper case letters
word "word" characters (same as \w)
xdigit hexadecimal digits

The names "ascii" and "word" are Perl extensions. Another Perl extension is negation, which is indicated by a ^ character after the colon. For example,


matches "1", "2", or any non-digit.

PCRE also supports repetition quantifiers. For example:


matches "zz", "zzz", or "zzzz". A closing brace on its own is not a special character. If the second number is omitted, but the comma is present, there is no upper limit; if the second number and the comma are both omitted, the quantifier specifies an exact number of required matches. Thus


matches at least 3 successive vowels, but may match many more, while


matches exactly 8 digits.

There is even more, which I won't bore you with right now. Read the RegularExpressions.txt file for more details.

I have *not* attempted to convert existing regular expressions to the new format automatically. There is a possibility that some complex ones may not behave exactly as expected. Please let me know if this is a big worry.


The way that triggers are matched has basically been rewritten (ie. expect bugs).

If you usually connect to a MUD that sends a newline at the end of every line you may not notice much difference (eg. a Diku-style MUD), however MUDs that normally send *paragraphs* which consist of lots of lines which are wrapped by the client (eg. MUSH, MUCK) then you *should* notice a difference.

The old way was to match on the first line of a paragraph, like this:

1. AAAAAAAAAAAA <-- trigger matching done here
4. DDDDDDDDDDDD <newline>
5. EEEEEEEEEEEE <-- trigger matching done here
7. GGGGGGGGGGGG <newline>

MUSHclient normally indents subsequent lines of a paragraph to give you a visual cue that what you are seeing is a paragraph and not individual lines.

Version 2.15 (and earlier) matched triggers when the first line arrived (eg. lines 1 and 5 in the example above).

Then, if a match was found a flag was set and subsequent lines coloured in the trigger colour, omitted from output, logged or not logged, as the case may be.

There were a number of problems with this approach...

1. The matching was only done on what was on the first line. For example, if the trigger was matching "BBBBBBBBBBBB" then it would not fire, even though "BBBBBBBBBBBB" was part of the paragraph.
2. Matching would not take part over line boundaries, For example, matching on "AA BB" would fail.
3. Only the first line was passed to a script routine (if any). Thus in this example, only "AAAAAAAAAAAA" would be passed to the script.
4. You could only colour the whole line that matched, not individual words.
5. Matching lengthy things (like "AAAAAAAAAAAA * DDDDDDDDDDDD") would fail because the whole paragraph was not tested.
6. Wildcards (%1, %2 etc.) had to be matched on the first line
7. Matching depended on the line width.

Version 2.16 now matches at the end of the paragraph, like this:

4. DDDDDDDDDDDD <newline> <-- trigger matching done here
7. GGGGGGGGGGGG <newline> <-- trigger matching done here

1. This means you can now test for *anything* in the paragraph (eg. matching on "CCC" will work).
2. The whole paragraph is passed to the script routine, if any.
3. Wildcards can be anywhere in the paragraph.


Another enhancement is the ability to colour individual words in a trigger. For this to work, the trigger must be a *regular expression*, as the regular expression routine returns word positions. Despite the mumbo-jumbo above about regular expressions, this isn't as bad as it looks.

A simple regular expression is just one or more words, like this:

Match on: science fiction
Colour: Custom 4
Regular expression: checked
Ignore case: checked (if wanted)
Repeat on same line: checked (if wanted)

This would simply match on the words "science fiction" anywhere in the line, and colour it in custom colour 4.

A new option, "repeat on same line" allows you to colour the same word (regular expression) even it appears more than once in the paragraph.

Combine this with "keep evaluating" and you can check for multiple, different, words in a particular paragraph, and colour them different colours.

Since the "omit from output" flag will now only be processed when the whole *paragraph* has been received, you might experience a slight flicker on a slow connection, as the paragraph is drawn, then the trigger evaluated, and then the paragraph removed (undrawn).

BTW - if you want to get a little fancier, the regular expression "science|fiction" (note the vertical bar) matches on "science" *or* "fiction" and thus will colour either of those words, regardless of the order they appear in.

Q. How can I colour a whole line?
A. Either don't use regular expressions, or make the expression match the whole line.

For example, the regular expression "star trek" will just colour the words "star trek", however the expression "^.*star trek.*$" will colour the whole line (because the wildcards ".*" will "absorb" the leading and trailing characters).

Q. How do I pass wildcards into a trigger response or script, using regular expressions.
A. Put the required wildcard inside brackets.

For example, to make something like: * pages *
... using regular expressions, say: ^(.*) pages (.*)$

The brackets around the ".*" wildcard expressions tell the regular expression to "output" the results (as %1, %2, %3 and so on).


I have had numerous reports of the "command" window gradually increasing in size. Careful measurement here seems to indicate that it did, in fact, grow by 7 pixels each time (ie. each time you saved a world and loaded it again).

The window size calculation has been adjusted to remove the 7-pixel growth, but I am not entirely happy with the solution. Conceivably someone with large fonts or some different screen configuration may still experience command area creep or shrinkage. Please let me know if this is a problem.


You can now optionally set a word double-click to immediately send the word, rather than put it in the command buffer. This would be helpful for clicking on directions (eg. north) and have that sent, without affecting what you are currently typing.


When double-clicking, words are now considered to *end* on:

a space
single quote
double quote
One of the following: .()[]

If this is not satisfactory please let me know.


You can set aliases to omit from output (ie. not be echoed), if that is desirable.


Pressing <tab> to complete a word now accepts "-" or "_" as part of a word.

If this is not satisfactory please let me know.


A much-requested feature, "recall" has been implemented.

This is sort-of like a "batch find". The keyboard equivalent CTRL+U can be used.

When you do a Display -> Recall Text (CTRL+U) you will be offered a dialog box similar to the "Find" dialog. Fill in something to search for (it can be a regular expression) and press "Find".

Provided at least once instance is found, a new window will be opened, with all *paragraphs* that match the find string (or regular expression) inserted in it.

This window is modeless, which means you can leave it open as long as you want. Press <esc> to get rid of it. You can use the "system" menu (press ALT+SPACE) to find a "save as text" menu item, which allows you to save the found text to disk as a text file.

You can also specify how many lines to go back, in case you have thousands of lines, and only want to recall over the last 200 (say).


The "find" (in output buffer) has been amended to work similarly to "recall". In essence, the difference is that the buffer is reassembled into paragraphs, which are then tested. What this means is:

1. Phrases that span a line boundary will now be correctly located.
2. Regular expressions that test a whole paragraph will work properly.
3. It will only find the *first* word in a paragraph. In other words, a "find next" starts at the next *paragraph*, thus possibly skipping repetitions of that word in the same paragraph.
4. You can highlight a phrase that spans multiple lines in a paragraph. For example, finding the regular expression "The.*castle" would highlight a sentence beginning with "The" and ending with "castle" even if it spanned many lines.


The configuration screens "highlighting" and "strings" have been removed. Their functionality was a throw-back to early versions of MUSHclient that did not have triggers. Since the same effect can be achieved by using triggers having another way of matching on incoming text is just confusing.

If you had highlighting strings set up (eg. "pages", "whispers", "From afar,") and those strings were set to display a different colour (ie. any colour except "no change"), then they will be automatically (automagically?) migrated to triggers. You can examine these triggers in the normal way, and delete them if you don't want them.

The migration to triggers should be consistent to how these strings used to work, however you may want to change them a bit to make them more reliable.

For instance, the string "From afar," will be changed to a trigger "^.*From afar, .*$".

This is a regular expression matching on "From afar," *anywhere* on the line. However it would make more sense to match on the start of line only, like this: "^From afar, .*$"


New script properties:

world.notecolour - you can get or set this to change the colour (number) that the *next* world.note will be displayed in. The valid range is 0 to 16, where 0 is "no change", 1 is custom colour 1, through to 16 for custom colour 16.


world.notecolour = 15 ' set note colour to use custom colour 15
world.note "This will be in custom colour 15"

NB - if you want to change the colour itself, use world.customcolourtext or world.customcolourbackground.

world.normalcolour - you can use this property to get or set the RGB colours used for the 8 ANSI normal colours. You must specify *which* colour you want to get/set, in the range 1 to 8, as follows:

black = 1
red = 2
green = 3
yellow = 4
blue = 5
magenta = 6
cyan = 7
white = 8

If you are setting the colour you must specify an RGB value. Some pre-defined values are available, see below.

Constant Value Description
vbBlack &h00 Black
vbRed &hFF Red
vbGreen &hFF00 Green
vbYellow &hFFFF Yellow
vbBlue &hFF0000 Blue
vbMagenta &hFF00FF Magenta
vbCyan &hFFFF00 Cyan
vbWhite &hFFFFFF White


world.normalcolour (3) = vbGreen ' set "green" colour to green
world.normalcolour (8) = &h303030 ' set "white" to a dark grey colour

You should be cautious doing frequent colour changes, because what happens is that you are changing the *palette* colour. What this means in practice is that if you change (say) the white colour (colour 8) then when new text appears on the screen it will be drawn in the new colour, however existing text will stay the old colour *until* it is redrawn (eg. is covered by a dialog box). This may lead to patchy bits of different colour on the screen.

You can have different colours on the screen (at the same time) by using the 16 custom colours, but only 16 different colours can be visible at once.

You can force a redraw of the whole world's window(s) by using the "Redraw" method.


world.normalcolour (3) = vbMagenta ' set "green" colour to magenta

world.boldcolour - you can use this property to get or set the RGB colours used for the 8 ANSI bold colours. You must specify *which* colour you want to get/set, in the range 1 to 8, as per the table above for normal colours.


world.boldcolour (4) = vbRed

world.customcolourtext - you can use this property to get or set the RGB colours used for the text (foreground) of the 16 custom colours. You must specify *which* colour you want to get/set, in the range 1 to 16.

world.customcolourbackground - you can use this property to get or set the RGB colours used for the background of the 16 custom colours. You must specify *which* colour you want to get/set, in the range 1 to 16.


world.customcolourtext (14) = vbBlue
world.customcolourbackground (14) = vbBlack


1. If you supply a colour number out of range (eg. 17) then setting the colour will do nothing, and getting the colour will return zero.
2. Changing the colour does *not* mark the world as modified. You must manually save it if you wish to retain colour changes.

Logging properties:

world.lognotes - set to 1 to log notes to the log file, 0 to not log
world.loginput - set to 1 to log your input to the log file, 0 to not log

Other properties will be added on request.

New script method:

world.redraw - forces a redraw of all windows for this world. Use this after changing colours.


You can now choose "PerlScript" as your scripting language.

I downloaded Perl from:


I haven't yet successfully got a script to work in Perl, but that may well be because of my ignorance of the language. Any comments from MUSHclient Perl scripters would be welcome (including sample scripts).

View all MUSHclient release notes

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]