mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
AutoRespond tests and fixes
- Automatically add [BotName] tags to log lines - Fix case handling and actionPrivate used for public messages - Add a sample file for basic and regex matches
This commit is contained in:
parent
3ce91188c7
commit
a6b3bf0481
6 changed files with 53 additions and 12 deletions
|
|
@ -296,13 +296,13 @@ namespace MinecraftClient
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes some text in the console. Nothing will be sent to the server.
|
||||
/// Write some text in the console. Nothing will be sent to the server.
|
||||
/// </summary>
|
||||
/// <param name="text">Log text to write</param>
|
||||
|
||||
public static void LogToConsole(object text)
|
||||
public void LogToConsole(object text)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted("§8[BOT] " + text);
|
||||
ConsoleIO.WriteLogLine(String.Format("[{0}] {1}", this.GetType().Name, text));
|
||||
string logfile = Settings.ExpandVars(Settings.chatbotLogFile);
|
||||
|
||||
if (!String.IsNullOrEmpty(logfile))
|
||||
|
|
@ -393,7 +393,7 @@ namespace MinecraftClient
|
|||
/// <param name="file">File to load</param>
|
||||
/// <returns>The string array or an empty array if failed to load the file</returns>
|
||||
|
||||
protected static string[] LoadDistinctEntriesFromFile(string file)
|
||||
protected string[] LoadDistinctEntriesFromFile(string file)
|
||||
{
|
||||
if (File.Exists(file))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue