f.WriteLine(string.Format("["+"{0:D2}"+":"+"{1:D2}"+":"+"{2:D2}"+"] Sent to MUD: ",DateTime.Now.Hour,DateTime.Now.Minute,DateTime.Now.Second)+Msg);
}
publicoverridevoidShutdown()
{
base.Shutdown();
if(f!=null)
f.Close();
}
}
publicclassMudLogConfig:ConfigFile
{
protectedoverridevoidOnCreated()
{
base.OnCreated();
CreateSetting("Log.Enabled",1,"Enable logging of all what happens in MUD to a file.");
CreateSetting("Log.Filename","log.{year}-{month}-{day}.{hour}-{minute}-{second}.txt","File name of log. You can use {year}, {month}, {day}, {hour}, {minute}, {second} in the filename. If a log file with this name already exists in logs folder then it will be appended to. Be careful however if the log file gets too big this will become slow so it's highly recommended that you differentiate them by including the timestamp keywords somehow.");
CreateSetting("Log.Commands",0,"Log commands sent to MUD (not ones that were handled by plugins).");
CreateSetting("Log.StripColors",0,"Remove all color codes when logging.");