Ejemplo n.º 1
0
        public static void Init()
        {
            ReloadImportant();

            var thread = new Thread(Steam.Instance.Tick);
            thread.Name = "Steam";
            thread.Start();

            Threads.Add(thread);

            if (Settings.IsFullRun)
            {
                return;
            }

            var commandHandler = new CommandHandler();

            Steam.Instance.RegisterCommandHandlers(commandHandler);

            if (Settings.Current.IRC.Enabled)
            {
                RssReader = new RSS();

                thread = new Thread(IRC.Instance.Connect);
                thread.Name = "IRC";
                thread.Start();

                Threads.Add(thread);

                IRC.Instance.RegisterCommandHandlers(commandHandler);
            }
        }
        public static void Init()
        {
            ImportantApps = new Dictionary <uint, List <string> >();
            ImportantSubs = new Dictionary <uint, byte>();

            ReloadImportant();
            TaskManager.RunAsync(async() => await KeyNameCache.Init());

            ChangelistTimer          = new Timer();
            ChangelistTimer.Elapsed += Tick;
            ChangelistTimer.Interval = TimeSpan.FromSeconds(1).TotalMilliseconds;

            var thread = new Thread(Steam.Instance.Tick)
            {
                Name = "Steam"
            };

            thread.Start();

            var anonThread = new Thread(Steam.Anonymous.Tick)
            {
                Name = "SteamAnonymous"
            };

            anonThread.Start();

            Threads = new List <Thread>
            {
                thread,
                anonThread,
            };

            if (Settings.IsFullRun)
            {
                return;
            }

            var commandHandler = new CommandHandler();

            Steam.Instance.RegisterCommandHandlers(commandHandler);

            if (Settings.Current.IRC.Enabled)
            {
                RssReader = new RSS();

                thread = new Thread(IRC.Instance.Connect)
                {
                    Name = "IRC"
                };
                thread.Start();

                Threads.Add(thread);

                IRC.Instance.RegisterCommandHandlers(commandHandler);
            }
        }
Ejemplo n.º 3
0
        public static void Init()
        {
            ImportantApps = new Dictionary <uint, List <string> >();
            ImportantSubs = new Dictionary <uint, byte>();

            ReloadImportant();
            TaskManager.RunAsync(async() => await KeyNameCache.Init());

            var thread = new Thread(Steam.Instance.Tick)
            {
                Name = "Steam"
            };

            thread.Start();

            Threads = new List <Thread>
            {
                thread,
            };

            if (Settings.Current.BuiltInHttpServerPort > 0)
            {
                HttpServer = new HttpServer(Settings.Current.BuiltInHttpServerPort);
            }

            if (Settings.IsFullRun)
            {
                return;
            }

            var commandHandler = new CommandHandler();

            Steam.Instance.RegisterCommandHandlers(commandHandler);

            if (Settings.Current.IRC.Enabled)
            {
                RssReader = new RSS();

                thread = new Thread(IRC.Instance.Connect)
                {
                    Name = "IRC"
                };
                thread.Start();

                Threads.Add(thread);

                IRC.Instance.RegisterCommandHandlers(commandHandler);
            }
        }
Ejemplo n.º 4
0
        public static async Task Init()
        {
            ImportantApps = new HashSet <uint>();
            ImportantSubs = new HashSet <uint>();

            await ReloadImportant();

            await PICSTokens.Reload();

            await KeyNameCache.Init();

            if (Settings.Current.BuiltInHttpServerPort > 0)
            {
                HttpServer = new HttpServer(Settings.Current.BuiltInHttpServerPort);
            }

            if (Settings.IsFullRun)
            {
                return;
            }

            var commandHandler = new CommandHandler();

            Steam.Instance.RegisterCommandHandlers(commandHandler);

            RssReader = new RSS();

            if (Settings.Current.IRC.Enabled)
            {
                IrcThread = new Thread(IRC.Instance.Connect)
                {
                    Name = nameof(IRC)
                };
                IrcThread.Start();

                IRC.Instance.RegisterCommandHandlers(commandHandler);
            }
        }