Minecraft-Console-Client/MinecraftClient/Commands/Log.cs
ORelio 162a1414bf Add ChatBot logging to file and 'log' command
- log <text> will print '[BOT] text' to the console
- logged [BOT] lines can be written to a logfile
- chatbotlogfile INI setting is used to set the log file
2014-07-20 12:02:17 +02:00

23 lines
609 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MinecraftClient.Commands
{
public class Log : Command
{
public override string CMDName { get { return "log"; } }
public override string CMDDesc { get { return "log <text>: log some text to the console."; } }
public override string Run(McTcpClient handler, string command)
{
if (hasArg(command))
{
ChatBot.LogToConsole(getArg(command));
return "";
}
else return CMDDesc;
}
}
}