Lippa said:
But if I added a plugin which just opened the log files, that wouldnt automatically make it start logging would it?
The plugin would need to open the log file when the world opened. Something like this:
 |
To save and install the OpenLogFile plugin do this:
- Copy between the lines below (to the Clipboard)
- Open a text editor (such as Notepad) and paste the plugin into it
- Save to disk on your PC, preferably in your plugins directory, as OpenLogFile.xml
- Go to the MUSHclient File menu -> Plugins
- Click "Add"
- Choose the file OpenLogFile.xml (which you just saved in step 3) as a plugin
- Click "Close"
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="OpenLogFile"
author="Nick Gammon"
id="ac6f9e1e6d36ffaf37f5573a"
language="Lua"
purpose="Opens the log file"
date_written="2012-02-22 13:38:37"
requires="4.70"
version="1.0"
>
<description trim="y">
<![CDATA[
Opens the configured log file when the world is opened.
]]>
</description>
</plugin>
<!-- Script -->
<script>
<![CDATA[
function OnPluginInstall ()
local err = OpenLog ("", true)
if err == error_code.eOK then
ColourNote ("white", "blue", "Log file " .. GetInfo (51) .. " opened.")
elseif err == error_code.eLogFileAlreadyOpen then
return
elseif GetInfo (40) == "" then
ColourNote ("white", "red", "No auto log file specified.")
else
ColourNote ("white", "red", "Could not open log file: " .. GetInfo (40) .. "")
end -- if
end -- OnPluginInstall
]]>
</script>
</muclient>
|