Quote:
Another approach might be to use world.GetInfo (51) to find the current log file name, and then every couple of minutes check to see if the date has changed, and if so, take the existing name, fix the date (this might be tricky) and then close and re-open it.
This sounds like it's probably the best solution. Opening a log file every time unit (which ever one the user chose in the auto-log filename) can get ridiculous.
How about adding a new command to the scripting engine that tells the auto-logger to simply restart? (That's probably closing the log session, and then opening it again.) That way the script doesn't have to deal with the date. The user knows how often and when to change the log file, so he/she would set up the timer's interval. The script would then close the log session and start it up again - without caring about dates, filenames, etc. - and the auto-logger would know what new filename to use, because it just applies the same format it already has. Is this more feasible than checking every time unit for a date change?
If this thing would be more easily done through a plugin, I'd be glad to write one and submit it to the community. I just wanted to know if perhaps this would be better solved internally in MUSHclient first. If not, like I said, I'll just write a plugin. :) |