Released on 17 Aug 2010
1. Added plugin Config_Option_Changer to the distribution (installer).
[Commit d1f4b6e], [Commit 9afdffb]
2. Improvements to Debug ('summary') such that the hyperlinks to list triggers, aliases etc. only appear if there is a non-zero number of them to list. This saves clicking on links just to find there were no triggers (etc.) in a plugin.
3. Improved function-name completion (for scriptwriters). Now if you type Shift+Tab in the command window (and the appropriate similar key in other dialogs) then, once a function name has been selected from the list, the arguments are also filled in.
Then select "ColourNote" from the menu, and this is inserted:
ColourNote ( TextColour , BackgroundColour , Text )
This makes it easier to see what the arguments to the function are, and in what order. This is particularly useful for functions (like WindowCreate) which take a lot of arguments.
The spaces are deliberate (eg. before the commas). This is so you can press Shift+Ctrl+Right-arrow to delete the word (eg. TextColour) without also deleting the comma after it. So to convert this:
ColourNote ( TextColour , BackgroundColour , Text )
ColourNote ("white", "red", "hello")
You can do this:
* Hit Ctrl+Shift+Right-arrow (selects "TextColour")
* Type: "white"
* Hit Ctrl+Right-arrow (moves cursor to start of word "BackgroundColour")
* Hit Ctrl+Shift+Right-arrow (selects "BackgroundColour")
* Type: "red"
* Hit Ctrl+Right-arrow (moves cursor to start of word "Text")
* Hit Ctrl+Shift+Right-arrow (selects "Text")
* Type: "hello"
This may sound a lot, but you can do it without taking your hands off the keyboard. Alternatively, because of the spaces, you can double-click on any argument word to select it, and it will be selected, but not the accompanying comma.
If the word in the edit box already has a "(" symbol following it, then the arguments are not inserted, as the assumption is that you have already put them there.
The full semantic meaning is not supplied (eg. argument type, optional arguments) but this should be a help for straightforward "memory jogging" in many cases.
The cursor is placed to the right of the first (left-hand) bracket, so you can start deleting the suggested arguments (eg. TextColour) and replacing them with what you actually want.
If you don't want the argument list at all just hit Undo (Ctrl+Z) as pasting in the argument list is done as a separate operation to pasting in the completed function name, and thus is the only thing undone.
At present, only MUSHclient functions are treated this way, not Lua functions.
However all known functions (including Lua ones in its internal table) at least have the parentheses supplied. So for example, string.match would become string.match ().
Some language, in particular VBscript, don't always need the parentheses (somewhat annoyingly) depending if they are being called as a sub or a function.
So if you are using VBscript, and you are using a function in the context of a sub, then you will need to remove the brackets. For example:
ColourNote "white", "blue", "hello"
ColourNote ("white", "blue", "hello")
[Commit 1d4b17d], [Commit 2b84593], [Commit 5d5764c]
4. New Lua function: utils.functionargs
This returns a table of the internal function names, and their arguments (as used in the Shift+Tab completion described above). You could use this for documentation purposes, in some way.
/tprint (utils.functionargs ())
"FixupEscapeSequences"="( Source )"
"ResetTimer"="( TimerName )"
"GetCurrentValue"="( OptionName )"
"DeleteGroup"="( GroupName )"
"NotepadFont"="( Title , FontName , Size , Style , Charset )"
"GetPluginTriggerList"="( PluginID )"
"ArrayListKeys"="( Name )"
"ArrayListValues"="( Name )"
"WindowSetPixel"="( WindowName , x , y , Colour )"
... and so on ...
5. The default Lua sandbox (in Global Preferences) now does nothing.
The default in Global Preferences is now to enable the option "Allow DLLs to be loaded".
This is arguably less secure, however malicious users who trick you into running their plugins could always have used a language other than Lua.
For existing MUSHclient users, see the page below for how to convert to the more relaxed sandbox:
[Commit 722dbb9], [Commit c30fbea]
6. Added a line and hyperlink for "security tips" which is displayed when a world file is opened. This is intended help players identify safe and unsafe plugins.
[Commit ce229bb], [Commit 5fb48b1]
7. Improved ATCP_Mapper.xml plugin to add "mapper where" command. So you can type:
mapper where 35212
and you might see:
Path to 35212 is: s 3e 2n u 10n e
[Commit acc86d7], [Commit 30a9621], [Commit 6ea3fdc]
8. Added the ATCP Mapper to the MUSHclient distribution.
9. The Debug "summary" function now correctly shows variables which only have a newline in them not preceded by a carriage-return.
10. Improved the editing of variables (in the GUI editor) such that if a variable has a newline in it but no carriage-return, it is normalized to be carriage-return/newline. This makes it display correctly in the GUI dialog.
This effect is permanent, so that any variables which initially contained only newlines (that is, hex 0A) will afterward contain carriage-return/newline (that is, hex 0D0A).
The code actually removes carriage-returns initially (ie, deletes hex 0D characters) and then replaces newlines (hex 0A) by carriage-return/newline (hex 0D0A). This is done because the Windows "Edit" control displays newlines on their own as just black boxes, and does not start a new line, thus the variables look incorrect in the edit control.
This is going to alter the contents of variables that merely have carriage-return characters (hex 0D) in them without a newline following.
You are advised not to store solitary 0x0D characters in variables because of this. If you must do so (eg. some sort of binary data) use base-64 encoding on them first.
11. Added ppi.lua to the distribution (as it is used by checkplugin.lua).
However the ppi functionality has been largely superseded by the improved CallPlugin functionality as released in MUSHclient version 4.55.
I used this version of PPI (Plugin-to-Plugin Interface) for some experimental telnet negotiation plugins.
12. Moved code around in mapper.lua to make it more logical. In particular the exposed functions (non-local) are now at the bottom.
13. When you type "mapper help" in the mapper, it now also shows the current mapper version (from mapper.lua).
14. Upgraded the SQLite3 library from 188.8.131.52 to 184.108.40.206.
This version supports WAL (Write-Ahead Logging).
Effectively, the Write-Ahead Logging inverts the way transactions are applied. Previously the original records were saved in the rollback journal file, and then the changes were applied to the database. To rollback, the journal was replayed to recreate the original database.
However with Write-Ahead Logging, the database is unchanged, and the commits are written to a separate file, which is then applied to the database from time to time. To rollback a partial change, the changes in the separate file are simply discarded. This has the advantage that reads can be done from the database during a transaction, because the original database is not in a half-completed transaction state.
For more details read:
According to that page:
There are advantages and disadvantages to using WAL instead of a rollback journal. Advantages include:
1. WAL is significantly faster in most scenarios.
2. WAL provides more concurrency as readers do not block writers and a writer does not block readers. Reading and writing can proceed concurrently.
3. Disk I/O operations tends to be more sequential using WAL.
4. WAL uses many fewer fsync() operations and is thus less vulnerable to problems on systems where the fsync() system call is broken.
But there are also disadvantages:
1. WAL is only available when the VFS supports shared-memory primitives. The built-in unix and windows VFSes support this but third-party extension VFSes for custom operating systems might not.
2. All processes using a database must be on the same host computer; WAL does not work over a network filesystem.
3. Transactions that involve changes against multiple ATTACHed databases are atomic for each individual database, but are not atomic across all databases as a set.
4. It is not possible to change the database page size after entering WAL mode, either on an empty database or by using VACUUM or by restoring from a backup using the backup API. You must be in a rollback journal mode to change the page size.
5. It is not possible to open read-only WAL databases. The opening process must have write privileges for "-shm" wal-index shared memory file associated with the database, if that file exists, or else write access on the directory containing the database file if the "-shm" file does not exist.
6. WAL might be very slightly slower (perhaps 1% or 2% slower) than the traditional rollback-journal approach in applications that do mostly reads and seldom write.
7. There is an additional quasi-persistent "-wal" file and "-shm shared memory file associated with each database, which can make SQLite less appealing for use as an application file-format.
8. There is the extra operation of checkpointing which, though automatic by default, is still something that application developers need to be mindful of.
Note that WAL has to be explicitly enabled for each database (you don't get it by default). Also it is not backwards compatible with earlier versions of SQLite3 due to the different way that commits are written to the database.
However, it is possible to migrate a database back from WAL-enabled to disabled with a simple "pragma" command.
This change affects both the Database* functions in MUSHclient scripting, and the sqlite3 functions in the Lua interface.
Without conscious effort on the part of plugin-writers however, you should not notice any difference.
If you want to use WAL, in brief, you send this command to the database engine:
To convert back to the existing mode, do this:
You can do this from within inside MUSHclient (via the scripting interface) or using the stand-alone sqlite3.exe program, which can be obtained from the SQLite3 web site.
15. Some documentation enhancements in the help file.
16. Improvements to the Debug ("summary") function call.
* It tells you the type of MXP activation you have (eg. always, on command)
* It has a hyperlink to list the telnet negotiations that have taken place (eg. got MCCP2 WILL, replied DO).
[Commit 013fcf3], [Commit 58a8fcc]
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )