Fixed Player List Logger and added config section for it.

This commit is contained in:
Milutinke 2022-09-25 22:06:26 +02:00
parent 8809ad41d8
commit 697025040f
3 changed files with 35 additions and 12 deletions

View file

@ -10,6 +10,8 @@ using MinecraftClient.Mapping;
using System.Threading.Tasks;
using System.Collections.Concurrent;
using System.Runtime.CompilerServices;
using MinecraftClient.ChatBots;
using System.Diagnostics.CodeAnalysis;
namespace MinecraftClient
{
@ -256,7 +258,7 @@ namespace MinecraftClient
private static string ServerAliasTemp = null;
//Mapping for settings sections in the INI file
private enum Section { Default, Main, AppVars, Proxy, MCSettings, AntiAFK, Hangman, Alerts, ChatLog, AutoRelog, ScriptScheduler, RemoteControl, ChatFormat, AutoRespond, AutoAttack, AutoFishing, AutoEat, AutoCraft, AutoDrop, Mailer, ReplayMod, FollowPlayer, Logging, Signature };
private enum Section { Default, Main, AppVars, Proxy, MCSettings, AntiAFK, Hangman, Alerts, ChatLog, AutoRelog, ScriptScheduler, RemoteControl, ChatFormat, AutoRespond, AutoAttack, AutoFishing, AutoEat, AutoCraft, AutoDrop, Mailer, ReplayMod, FollowPlayer, PlayerListLogger, Logging, Signature };
/// <summary>
/// Get settings section from name
@ -854,6 +856,14 @@ namespace MinecraftClient
case "stop_at_distance": FollowPlayer_StopAtDistance = str2int(argValue); return true;
}
break;
case Section.PlayerListLogger:
switch (ToLowerIfNeed(argName))
{
case "enabled": PlayerLog_Enabled = str2bool(argValue); return true;
case "log_file": PlayerLog_File = argValue; return true;
case "log_delay": PlayerLog_Delay = str2int(argValue); return true;
}
break;
}
return false;
}