Example #1
0
        public static void Start()
        {
            try
            {
                InitialiseClients();
                StartThreads();

                while (true)
                {
                    Thread.Sleep(10000);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.Write(ex.StackTrace);
                Console.ReadKey();
            }
            finally
            {
                // Dispose of any resources
                if (_ircClient != null)
                {
                    _ircClient.Dispose();
                    _ircClient = null;
                }

                if (_telegramClient != null)
                {
                    _telegramClient.Dispose();
                    _telegramClient = null;
                }
            }
        }