diff --git a/StatBot/Handlers/mIRCStatsHandler.cs b/StatBot/Handlers/mIRCStatsHandler.cs index a62516f..53e920d 100644 --- a/StatBot/Handlers/mIRCStatsHandler.cs +++ b/StatBot/Handlers/mIRCStatsHandler.cs @@ -53,7 +53,7 @@ public mIRCStatsHandler(BotSettings botSettings) /// A Task representing the asynchronous operation. public async Task GenerateStatsAsync() { - if (!string.IsNullOrEmpty(_botSettings.mIRCStats.GeneratorFile)) + if (_botSettings.mIRCStats.UseInternalTimer) { System.IO.FileInfo fileinfo = new System.IO.FileInfo(_botSettings.mIRCStats.GeneratorFile); folder = fileinfo.Directory.FullName; diff --git a/StatBot/Settings/BotSettings.cs b/StatBot/Settings/BotSettings.cs index ae08d77..8b19bbd 100644 --- a/StatBot/Settings/BotSettings.cs +++ b/StatBot/Settings/BotSettings.cs @@ -196,6 +196,7 @@ public MIRCStats(IConfiguration configuration) LaunchEveryMinutes = configuration.GetValue("MIRCStats:LaunchEveryMinutes"); GeneratorFile = configuration.GetValue("MIRCStats:GeneratorFile"); WaitUntilCompleted = configuration.GetValue("MIRCStats:WaitUntilCompleted"); + UseInternalTimer = !String.IsNullOrEmpty(GeneratorFile); } /// @@ -228,6 +229,11 @@ public MIRCStats(IConfiguration configuration) /// /// true if [wait until completed]; otherwise, false. public bool WaitUntilCompleted { get; } + /// + /// Gets a value indicating whether to [use the internal timer]. + /// + /// true if [use the internal timer]; otherwise, false. + public bool UseInternalTimer { get; } } ///