Released on 05 Sep 2010
1. Upgraded SQLite3 library from 220.127.116.11. to 3.7.2
This fixes some minor issues as documented here:
2. Fixed a couple of LPEG bugs (ie. the internal LPEG library) as recommended by Roberto Ierusalimschy on the Lua mailing list.
3. Fixed some minor issues that stopped compilation under VS2005. Thanks Twisol!
4. Tidied up the various JSON Lua modules.
In particular multi-line comments now end with --]] rather than ]], because that looks better in Crimson Editor syntax highlighting.
Also changed line-ending type from Unix format (linefeeds) to DOS format (carriage return/linefeeds).
5. Fixed bug where on a new installation, the default state file was incorrectly assigned to be in the MUSHclient execution folder.
6. When saving a plugin's state, it now checks that:
* the state file directory exists
* it is a directory (ie. not just an ordinary file)
* it is writable
If not, a dialog box appears warning the user. Then can then browse to locate the state file directory, or create one. If that fails, the usual message about "unable to save plugin state" will appear.
The chosen folder will then be saved for future use. If you choose to cancel the folder choosing dialog, then you will see the message again for each plugin that tries to save its state (in the future).
This is intended to help players "escape" from the situation which arises from time to time where the plugin state file either was never created, was in the wrong place, or was not writable.
7. The various places that the "directory picker" is used in MUSHclient, now use the more "modern" version. This:
* can be resized
* lets you create a directory
* lets you type a path into an edit box
This is handy for situations where, for example, you want to make a log files directory - now the picker has a "Make New Folder" button to let you do just that.
The new picker only works under Windows Shell32.dll version 5.0 onwards. This (or a later version) is distributed with Windows 2000, Windows ME, Windows XP, Windows Vista, Windows 7 onwards.
I am unsure what would happen if you tried to use it under Windows 98 or earlier - probably it would silently default back to the old behaviour.
8. Added "disconnecting" to the list of known connection states. This is so that, if you get dropped from a MUD, the connection status (on the world title bar) is not shown as "<unknown>".
9. Fixed bug where the title bar for the world would not change status to [Closed] for a long time after the world was closed.
10. Cleaned up source by moving the structures and defines for miniwindows from OtherTypes.h to miniwindow.h, as suggested by Twisol.
11. Added Lua_Sapi.xml plugin to the distribution. This lets you do text-to-speech using Lua.
For detailed installation instructions, see:
[Commit adc4c7d, 5b3c261, 109b9e6]
12. Added utils.sendtofront and utils.shellexecute script functions to the Lua script space.
These are similar (however note slightly different names) to the ones previously available in a separate download as described here:
utils.sendtofront brings a nominated Windows window (program) to the front.
utils.sendtofront ("Crimson Editor")
It returns true if the window was found and false if not.
utils.shellexecute lets you execute a Windows Shell command.
utils.shellexecute (filename, params, defdir, operation, show_command)
Only the first argument (filename) is required, the rest are optional.
For more documentation see the help file.
If sucessful, the function returns true.
If not, it returns nil followed by an error message. You could use "assert" to test for failure.
assert (utils.shellexecute ("c:/mushclient/worlds/SMAUG.MCL"))-- document
assert (utils.shellexecute ("http://www.gammon.com.au/")) -- web page
assert (utils.shellexecute ("mailto:email@example.com")) -- open mail client
assert (utils.shellexecute ("c:/", nil, nil, "explore")) -- explore disk
assert (utils.shellexecute ("c:/readme.txt", nil, nil, "print")) -- print a file
[Commit f77e7ca, 0ff94ad]
13. Added luacom version 1.4 support into the code (as at commit 91fc07 on http://github.com/davidm/luacom/). Although this adds a bit of extra bulk to the download (about 0.09 Mb) I think it is worth it, for people who use screen readers and similar, to be able to use COM objects (like SAPI) without having to go through a lot of trouble to download luacom.
Example of use:
require "luacom" -- activate luacom
-- Instantiate a SAPI voice object
talk = assert (luacom.CreateObject ("SAPI.SpVoice"), "cannot open SAPI")
-- Method call
talk:Speak ("SAPI Plug-in installed and is ready.", 1)
Documentation is in the docs/luacom.pdf file (under the MUSHclient installation).
There is also a file "luacom5.lua" which adds extra functionality to luacom, so you can require that after requiring luacom.
The require for luacom actually loads luacom into the script space from the internal library (using package.preload.luacom), there is no luacom.lua or luacom.dll file.
To disable luacom for security reasons, put this in the Lua sandbox:
package.preload.luacom = nil
[Commit 17955ef, a56d677, 7224469, 44bfbf1, 37547fb, e46e241, 5489d89, 5896fc7]
[Commit a5d0f36, 3913335, fdf2772]
14. Added LuaSocket to the distribution.
This lets you do things like request web pages, send email, make TCP/IP connections, and so on.
In fact, I used LuaSocket to make a Lua-based MUD server a while back, so the sky is the limit really (not that I would recommend turning a MUD client into a MUD server, that was just making the point that you can do a lot with LuaSocket).
Example of use:
http = require "socket.http"
a, b, c = http.request("http://some.web.site/")
print (a, b, c) -- page, return code, headers
For an example of sending an email message, see:
Documentation is in the docs/LuaSocket_documentation directory (under the MUSHclient installation). Just open index.html (in that directory) in your web browser, and then browse to whatever parts you are interested in.
If you have scripting enabled, and "/" as the scripting prefix, this would do it:
/ utils.shellexecute (GetInfo (66) .. "docs\\LuaSocket_documentation\\index.html" )
[Commit fb5d70d, 3d54010]
15. Added the function ColoursToStyles to mw.lua.
This helps convert colour runs (eg. from Aardwolf) in the format:
"Line @Mwith @Bmultiple @Rcolours"
into style runs (where each style run is represented by a table entry with text, length, textcolour, backcolour).
16. Moved the creation of the inbuilt "check" function in Lua to before the Lua sandbox is executed. This lets you do two things:
* Change its behaviour if wanted (by replacing it)
* Use the check function in the sandbox
17. Fixed bug where if you created a new world, and went to save it (in particular if you had added plugins after creating the world) the suggested directory to save in would be wrong (eg. the plugins directory).
18. Added the module sandbox.lua to the distribution. This lets you return to the old "Lua sandbox" by simply adding this line to the Lua sandbox in Global Preferences:
Of course, you can amend it as required (in the lua folder). It is probably wise to rename it after amending, so that it doesn't get reverted on the next MUSHclient release. For example, rename it to my_sandbox.lua, and in that place any amendements (eg. plugins you happen to trust). Then in the Lua sandbox in Global Preferences have this:
19. Added the module show_loaded.lua to the distribution. This shows a one-line message as each plugin is loaded, and when the main script file is loaded, as described here:
The intention is to add this line to the Lua sandbox in Global Preferences:
20. Changed the way Lua is initialized. The code was cleaned-up in general, and in particular, the metatable for the world table is now a separate table (rather than itself). This separate metatable (with an __index entry pointing to the world table) is the one which is installed in the global environment (the _G table).
For a discussion, see:
21. Added script function SetScroll - this lets you show or hide the scroll bar for the output window, and reposition the scroll point (in case you implement your own scroll bars in a miniwindow).
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )