Update BetterTracking.cs

This commit is contained in:
Madpeterz 2021-02-25 03:32:08 +00:00
parent 2330d962e7
commit 48ed9e5b13

View file

@ -26,18 +26,25 @@ namespace BetterSecondbot.Tracking
controler = setcontroler; controler = setcontroler;
if(controler.Bot.getMyConfig.Setting_Tracker.ToLowerInvariant() == "false") if(controler.Bot.getMyConfig.Setting_Tracker.ToLowerInvariant() == "false")
{ {
LogFormater.Info("Tracker - Disabled because set to false");
return; return;
} }
if(int.TryParse(controler.Bot.getMyConfig.Setting_Tracker,out output_channel) == true) if(int.TryParse(controler.Bot.getMyConfig.Setting_Tracker,out output_channel) == true)
{ {
LogFormater.Info("Tracker - Enabled Chat");
output_to_channel = true; output_to_channel = true;
attachEvents(); attachEvents();
} }
else if (controler.Bot.getMyConfig.Setting_Tracker.StartsWith("http") == true) else if (controler.Bot.getMyConfig.Setting_Tracker.StartsWith("http") == true)
{ {
LogFormater.Info("Tracker - Enabled HTTP");
output_to_url = true; output_to_url = true;
attachEvents(); attachEvents();
} }
else
{
LogFormater.Info("Tracker - Disabled not a vaild channel or http");
}
} }
protected void attachEvents() protected void attachEvents()
{ {