public static void Main(string[] args) { // Try - Catch erlaubt uns ein besseres Fehlermanagement, also nutzen wir das. try { // Lade die Konfiguration settings = SettingsParser <BotSettings> .Load(); connection = SettingsParser <ConnectionSettings> .Load(); // Logging starten Logging.InitLogging(); // Exit-Methode registrieren AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnConsoleExit); // Log Console.Title = "TSĀ³ Management Bot - " + Utility.Version.GetVersion(); Logging.LogSpecial("Hallo, ich bin ein TeamSpeakĀ³-Bot."); // Verbindung zum Server herstellen worker = TS3Worker.CreateWorker(connection); worker.OpenConnection(); // Status isRunning = true; // Kommandos cmdThread = new Thread(CommandHandler.CheckCommands); cmdThread.Start(); // BotLogic botThread = new Thread(TS3Worker.CheckLogic); botThread.Start(); // Den Prozess nicht hier beenden while (true) { continue; } } catch (Exception e) { // Logge die Exception Logging.LogException(e); } }
public static void LoadSettings() { settingsParser.Load(); }