I think I've mentioned this before, but here I go again:
Do a World.Note in your script, and it logs fine, in the colour of the note. Cool.
Do a World.Send, and it doesn't log at all. World.WriteLog logs in the default colour for the HTML page (usually black). Also, regular commands you enter are not logged in the "echo_colour" you have configured.
Preferably, the following functionality could be coded directly into MUSHclient:
Log text sent via command box in "echo_colour".
Log text sent via World.Send in "echo_colour". *
* World.Send does not currently log at all.
I've tried to work around this, which has presented several problems:
Looks like it should work, but the colour is wrong, for some reason (though not the default black). I thought maybe the echo_colour started from 0, so I put a -1 before the second closing bracket on the relevant line. Different colour, but still wrong. Hmmm....
The Preamble and Postamble don't work as easily as I would like. Variables are not evaluated, so I end up with a literal %H:%M> in my logs, rather than the current hour and Minutes. I could rip the string apart and build a proper pre-amble, but that just seems so bothersome at the moment. I doubt I will.
Setting the font above is actually overkill in my case, since this is the setting I currently have for logging:
I set the font colour directly in the pre-amble, because it's the only way to get text entered into the command box to be in the colour I want (short of triggering every line and sending it through this routine).
...So, currently I have the font lines in the script commented out, and rely on the font settings stored directly in the pre & post amble.
I was thinking of building a Plugin to do all of this automatically, so that I wouldn't have to manually adjust the settings for every world. Also, since some people find the setup too complex, it would be easy to just hand them a file to have it work... but I don't see how that is possible with the current implementation. (The font colour is hard-coded in the pre-amble, instead of pulling it from the settings). Alternatively, I might just try and build a default file with all my personal colour and logging options in one file, if that is possible.
Do a World.Note in your script, and it logs fine, in the colour of the note. Cool.
Do a World.Send, and it doesn't log at all. World.WriteLog logs in the default colour for the HTML page (usually black). Also, regular commands you enter are not logged in the "echo_colour" you have configured.
Preferably, the following functionality could be coded directly into MUSHclient:
Log text sent via command box in "echo_colour".
Log text sent via World.Send in "echo_colour". *
* World.Send does not currently log at all.
I've tried to work around this, which has presented several problems:
Sub LogSend (SendString)
Dim Preamble, Postamble
Dim CommandColour
World.Send SendString
If World.GetOption("log_html") Then
CommandColour = World.CustomColourText(World.GetOption("echo_colour"))
Preamble = World.GetAlphaOption("log_line_preamble_input")
Preamble = Preamble & "<font color='" & CommandColour & "'>"
Postamble = World.GetAlphaOption("log_line_postamble_input")
Postamble = "</font>" & Postamble
World.WriteLog Preamble & World.FixupHTML(SendString) & Postamble
Else
World.WriteLog SendString
End If
End Sub
Looks like it should work, but the colour is wrong, for some reason (though not the default black). I thought maybe the echo_colour started from 0, so I put a -1 before the second closing bracket on the relevant line. Different colour, but still wrong. Hmmm....
The Preamble and Postamble don't work as easily as I would like. Variables are not evaluated, so I end up with a literal %H:%M> in my logs, rather than the current hour and Minutes. I could rip the string apart and build a proper pre-amble, but that just seems so bothersome at the moment. I doubt I will.
Setting the font above is actually overkill in my case, since this is the setting I currently have for logging:
log_line_postamble_input="</font>"
log_line_preamble_input="%H:%M> <font color=#FF8040>"
I set the font colour directly in the pre-amble, because it's the only way to get text entered into the command box to be in the colour I want (short of triggering every line and sending it through this routine).
...So, currently I have the font lines in the script commented out, and rely on the font settings stored directly in the pre & post amble.
I was thinking of building a Plugin to do all of this automatically, so that I wouldn't have to manually adjust the settings for every world. Also, since some people find the setup too complex, it would be easy to just hand them a file to have it work... but I don't see how that is possible with the current implementation. (The font colour is hard-coded in the pre-amble, instead of pulling it from the settings). Alternatively, I might just try and build a default file with all my personal colour and logging options in one file, if that is possible.