Exemplo n.º 1
0
        internal void UpdateTwitchStatus(bool vocal)
        {
            TwitchStatus.GetStatus();

            if (ConfigInstance.ViewerPBEnabled)
            {
                ViewerPb.UpdateViewerPB(TwitchStatus.LastViewers);
            }

            if (ConfigInstance.LeaderboardsEnabled && !Leaderboards.GameOverride)
            {
                Leaderboards.CurrentGame = TwitchStatus.game;
            }

            if (ConfigInstance.LeaderboardsAutodetectCategory && TwitchStatus.isOnline)
            {
                if (TwitchStatus.TitleHasChanged || !Leaderboards.LastUpdateSuccessful || vocal)
                {
                    Leaderboards.SetPreferedCategory(TwitchStatus.OldTitle, SuiBotInstance.IsAfterFirstStatusUpdate, vocal);
                }
            }


            if (vocal)
            {
                SendChatMessage(string.Format("New obtained stream status is {0}{1}.",
                                              TwitchStatus.isOnline == false ? "offline" : "online",
                                              TwitchStatus.game == "" ? "" : " and game is " + TwitchStatus.game
                                              ));
            }
        }