Ejemplo n.º 1
0
 public void OnLoad(ConfigStorage Config)
 {
     StreamerNick = Config.GetDefault(ConfigPrefix + ".GOODGAME.StreamerNick", "");
     _ChatID      = Config.GetDefault(ConfigPrefix + ".GOODGAME.ChatId", 0);
     _UserToken   = Config.GetDefault(ConfigPrefix + ".GOODGAME.UserToken", "");
     _UserId      = Config.GetDefault(ConfigPrefix + ".GOODGAME.UserId", 0);
 }
Ejemplo n.º 2
0
 public void OnLoad(ConfigStorage Config)
 {
     StreamerNick = Config.GetDefault(ConfigPrefix + ".EMPIRETVCHAT.StreamerNick", "");
     _StreamerID  = (int)Config.GetDefault(ConfigPrefix + ".EMPIRETVCHAT.StreamerID", 0);
     _ChannelUri  = Config.GetDefault(ConfigPrefix + ".EMPIRETVCHAT.StreamerURI", "http://sc2tv.ru/content/oxlamonschannel");
     LoadedMessages.Clear();
     UpdateHeader();
 }
Ejemplo n.º 3
0
        public void OnConfigApply(ConfigStorage Config)
        {
            StreamerNick  = Config.GetDefault(ConfigPrefix + ".TWITCHTVCHAT.StreamerNick", "");
            _directAdress = Config.GetDefault(ConfigPrefix + ".TWITCHTVCHAT.DirectConnect", "");

            if (string.IsNullOrEmpty(StreamerNick) && string.IsNullOrEmpty(_directAdress))
            {
                Header = "http://twitch.tv, Нет подключения";
                return;
            }

            UpdateSmiles();
            Reconnect();
        }
Ejemplo n.º 4
0
        public void OnConfigApply(ConfigStorage Config)
        {
            _ChannelUri = (string)Config.GetDefault(ConfigPrefix + ".EMPIRETVCHAT.StreamerURI", "");

            ManualResetEvent mre = new ManualResetEvent(false);
            WebClient        wc  = new WebClient();

            wc.Encoding = Encoding.UTF8;
            try {
                string Result = wc.DownloadString(new Uri(_ChannelUri, UriKind.RelativeOrAbsolute));
                Regex  rx     = new Regex("title\\>(.*?)\\|");
                Match  m      = rx.Match(Result);
                if (m.Success)
                {
                    Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerID"]   = _StreamerID = int.Parse(_ChannelUri.Split('/')[4]);
                    Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerNick"] = StreamerNick = m.Groups[1].Value.Trim();
                }
                else
                {
                    Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerID"]   = _StreamerID = 0;
                    Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerNick"] = "";
                }
            } catch {
                Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerID"]   = _StreamerID = 0;
                Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerNick"] = "";
                MessageBox.Show("Ошибка сети или стример не найден.");
            }

            LoadedMessages.Clear();
            UpdateHeader();
        }
Ejemplo n.º 5
0
        public void OnConfigApply(ConfigStorage Config)
        {
            string ChannelUri = Config.GetDefault(ConfigPrefix + ".GOODGAME.StreamerURI", "http://goodgame.ru/channel/Miker/87/");

            ManualResetEvent mre = new ManualResetEvent(false);
            WebClient        wc  = new WebClient();

            wc.Encoding = Encoding.UTF8;
            try {
                string Result = wc.DownloadString(new Uri(ChannelUri, UriKind.RelativeOrAbsolute));

                // userid=149347&token=b0052d9789be51c36637df97121b407c&chatroom=1089&chatname=Нами&key=Nami4ka
                //var flashvars = {"userid":0,"token":"d41d8cd98f00b204e9800998ecf8427e","chatroom":"5","chatname":"HotS \u0441 \u041c\u0430\u0439\u043a\u0435\u0440\u043e\u043c","key":"Miker"};


                Regex rx = new Regex("userid\\\"\\:(.*?),\\\"token\\\"\\:\\\"(.*?)\\\",\\\"chatroom\\\"\\:\\\"(.*?)\\\",\\\"chatname\\\"\\:\\\"(.*?)\\\",\\\"key\\\":\\\"(.*?)\\\"");
                Match m  = rx.Match(Result);
                if (m.Success)
                {
                    Config[ConfigPrefix + ".GOODGAME.UserId"]       = _UserId = int.Parse(m.Groups[1].Value);
                    Config[ConfigPrefix + ".GOODGAME.UserToken"]    = _UserToken = m.Groups[2].Value;
                    Config[ConfigPrefix + ".GOODGAME.ChatId"]       = _ChatID = int.Parse(m.Groups[3].Value);
                    Config[ConfigPrefix + ".GOODGAME.ChatName"]     = m.Groups[4].Value;
                    Config[ConfigPrefix + ".GOODGAME.StreamerNick"] = StreamerNick = m.Groups[5].Value;
                }
                else
                {
                    _ChatID    = 1717;
                    _UserId    = 0;
                    _UserToken = "d41d8cd98f00b204e9800998ecf8427e";
                }
            } catch {
                _ChatID = 0;
                MessageBox.Show("Ошибка сети или стример не найден.");
            }

            Reconnect();
        }
Ejemplo n.º 6
0
        public void OnConfigApply(ConfigStorage Config)
        {
            _ChannelUri = (string)Config.GetDefault(ConfigPrefix + ".SC2TVCHAT.StreamerURI", "http://sc2tv.ru/content/oxlamonschannel");

            ManualResetEvent mre = new ManualResetEvent(false);
            WebClient        wc  = new WebClient();

            wc.Encoding = Encoding.UTF8;
            try {
                string Result = wc.DownloadString(new Uri(_ChannelUri, UriKind.RelativeOrAbsolute));
                Regex  rx     = new Regex("\\<link.*?\\\"canonical\\\".*?href=\\\"http://sc2tv.ru/node/(.*?)\\\"");
                Match  m      = rx.Match(Result);
                if (m.Success)
                {
                    rx = new Regex(".*?author\\\".*?title.*?\\>(.*?)\\<");

                    Config[ConfigPrefix + ".SC2TVCHAT.StreamerID"] = _StreamerID = int.Parse(m.Groups[1].Value);

                    m = rx.Match(Result);
                    Config[ConfigPrefix + ".SC2TVCHAT.StreamerNick"] = StreamerNick = m.Groups[1].Value;
                }
                else
                {
                    Config[ConfigPrefix + ".SC2TVCHAT.StreamerID"]   = _StreamerID = 0;
                    Config[ConfigPrefix + ".SC2TVCHAT.StreamerNick"] = "";
                }
            } catch {
                Config[ConfigPrefix + ".SC2TVCHAT.StreamerID"]   = _StreamerID = 0;
                Config[ConfigPrefix + ".SC2TVCHAT.StreamerNick"] = "";
                MessageBox.Show("Ошибка сети или стример не найден.");
            }

            LoadedMessages.Clear();
            UpdateHeader();
            UpdateSmiles();
        }
Ejemplo n.º 7
0
        public void OnConfigApply( ConfigStorage Config )
        {
            StreamerNick = Config.GetDefault(ConfigPrefix + ".TWITCHTVCHAT.StreamerNick", "");
            _directAdress = Config.GetDefault(ConfigPrefix + ".TWITCHTVCHAT.DirectConnect", "");

            if (string.IsNullOrEmpty(StreamerNick) && string.IsNullOrEmpty(_directAdress)) {
                Header = "http://twitch.tv, Нет подключения";
                return;
            }

            Reconnect();
        }
Ejemplo n.º 8
0
 public void OnLoad( ConfigStorage Config )
 {
     StreamerNick = Config.GetDefault(ConfigPrefix + ".GOODGAME.StreamerNick", "");
     _ChatID = Config.GetDefault(ConfigPrefix + ".GOODGAME.ChatId", 0);
     _UserToken = Config.GetDefault(ConfigPrefix + ".GOODGAME.UserToken", "");
     _UserId = Config.GetDefault(ConfigPrefix + ".GOODGAME.UserId", 0);
 }
Ejemplo n.º 9
0
        public void OnConfigApply( ConfigStorage Config )
        {
            string ChannelUri = Config.GetDefault(ConfigPrefix + ".GOODGAME.StreamerURI", "http://goodgame.ru/channel/Miker/87/");

            ManualResetEvent mre = new ManualResetEvent(false);
            WebClient wc = new WebClient();
            wc.Encoding = Encoding.UTF8;
            try {
                string Result = wc.DownloadString(new Uri(ChannelUri, UriKind.RelativeOrAbsolute));

                // userid=149347&token=b0052d9789be51c36637df97121b407c&chatroom=1089&chatname=Нами&key=Nami4ka
                //var flashvars = {"userid":0,"token":"d41d8cd98f00b204e9800998ecf8427e","chatroom":"5","chatname":"HotS \u0441 \u041c\u0430\u0439\u043a\u0435\u0440\u043e\u043c","key":"Miker"};

                Regex rx = new Regex("userid\\\"\\:(.*?),\\\"token\\\"\\:\\\"(.*?)\\\",\\\"chatroom\\\"\\:\\\"(.*?)\\\",\\\"chatname\\\"\\:\\\"(.*?)\\\",\\\"key\\\":\\\"(.*?)\\\"");
                Match m = rx.Match(Result);
                if (m.Success) {
                    Config[ConfigPrefix + ".GOODGAME.UserId"] = _UserId = int.Parse(m.Groups[1].Value);
                    Config[ConfigPrefix + ".GOODGAME.UserToken"] = _UserToken = m.Groups[2].Value;
                    Config[ConfigPrefix + ".GOODGAME.ChatId"] = _ChatID = int.Parse(m.Groups[3].Value);
                    Config[ConfigPrefix + ".GOODGAME.ChatName"] = m.Groups[4].Value;
                    Config[ConfigPrefix + ".GOODGAME.StreamerNick"] = StreamerNick = m.Groups[5].Value;
                } else {
                    _ChatID = 0;
                    _UserId = 0;
                    _UserToken = "";
                }
            } catch {
                _ChatID = 0;
                MessageBox.Show("Ошибка сети или стример не найден.");
            }

            Reconnect();
        }
        public void OnConfigApply( ConfigStorage Config )
        {
            cctv_nonce = "";
            cctv_streamer = "";
            cctv_timestamp = 88;

            _ChannelUri = (string)Config.GetDefault(ConfigPrefix + ".CYBERGAMETVCHAT.StreamerURI", "");

            ManualResetEvent mre = new ManualResetEvent(false);
            WebClient wc = new WebClient();
            wc.Encoding = Encoding.UTF8;
            try {
                //     //"quick_chat_room_name":"soboleff"

                //"quick_chat_username_check_nonce":"c94805e03f",
                //"quick_chat_delete_nonce":"7227a8f20c",
                //"quick_chat_ban_nonce":"a8615484a3",
                //"quick_chat_ban_msg_nonce":"ab5e9ae451",
                //"quick_chat_new_message_nonce":"78ae6168c1",
                //"quick_chat_update_messages_nonce":"e299c4e6c6",
                //"quick_chat_update_users_nonce":"c97c5cae9a",
                //"quick_chat_last_timestamp":1362321788

                //    //"));

                string Result = wc.DownloadString(new Uri(_ChannelUri, UriKind.RelativeOrAbsolute));

                Regex nonceGet = new Regex("quick_chat_update_messages_nonce.*?\\:\\\"(.*?)\\\"");
                Match m = nonceGet.Match(Result);
                if (m.Success) {
                    cctv_nonce = m.Groups[1].Value;
                }

                //Regex nonceGet = new Regex("quick_chat_js_vars.*?{(.*?)}", RegexOptions.Multiline);

                //Match m = nonceGet.Match(Result);
                //if (m.Success) {
                //    string[] vals = m.Groups[1].Value.Split(',');
                //}

                nonceGet = new Regex("quick_chat_room_name.*?\\:\\\"(.*?)\\\"");
                m = nonceGet.Match(Result);
                if (m.Success) {
                    StreamerNick = cctv_streamer = m.Groups[1].Value;
                }

                nonceGet = new Regex("quick_chat_last_timestamp.*?\\:(.*?)\\,");
                m = nonceGet.Match(Result);
                if (m.Success) {
                    cctv_timestamp = long.Parse(m.Groups[1].Value);
                }

            } catch {
                MessageBox.Show("Ошибка сети или стример не найден.");
            }

            LoadedMessages.Clear();
            UpdateHeader();
            UpdateSmiles();
        }
Ejemplo n.º 11
0
 public void OnLoad( ConfigStorage Config )
 {
     StreamerNick = Config.GetDefault(ConfigPrefix + ".SC2TVCHAT.StreamerNick", "");
     _StreamerID = (int)Config.GetDefault(ConfigPrefix + ".SC2TVCHAT.StreamerID", 0);
     _ChannelUri = Config.GetDefault(ConfigPrefix + ".SC2TVCHAT.StreamerURI", "http://sc2tv.ru/content/oxlamonschannel");
     LoadedMessages.Clear();
     UpdateHeader();
     UpdateSmiles();
 }
Ejemplo n.º 12
0
        public void OnConfigApply( ConfigStorage Config )
        {
            _ChannelUri = (string)Config.GetDefault(ConfigPrefix + ".SC2TVCHAT.StreamerURI", "http://sc2tv.ru/content/oxlamonschannel");

            ManualResetEvent mre = new ManualResetEvent(false);
            WebClient wc = new WebClient();
            wc.Encoding = Encoding.UTF8;
            try {
                string Result = wc.DownloadString(new Uri(_ChannelUri, UriKind.RelativeOrAbsolute));
                Regex rx = new Regex("\\<link.*?\\\"canonical\\\".*?href=\\\"http://sc2tv.ru/node/(.*?)\\\"");
                Match m = rx.Match(Result);
                if (m.Success) {
                    rx = new Regex(".*?author\\\".*?title.*?\\>(.*?)\\<");

                    Config[ConfigPrefix + ".SC2TVCHAT.StreamerID"] = _StreamerID = int.Parse(m.Groups[1].Value);

                    m = rx.Match(Result);
                    Config[ConfigPrefix + ".SC2TVCHAT.StreamerNick"] = StreamerNick = m.Groups[1].Value;
                } else {
                    Config[ConfigPrefix + ".SC2TVCHAT.StreamerID"] = _StreamerID = 0;
                    Config[ConfigPrefix + ".SC2TVCHAT.StreamerNick"] = "";
                }
            } catch {
                Config[ConfigPrefix + ".SC2TVCHAT.StreamerID"] = _StreamerID = 0;
                Config[ConfigPrefix + ".SC2TVCHAT.StreamerNick"] = "";
                MessageBox.Show("Ошибка сети или стример не найден.");
            }

            LoadedMessages.Clear();
            UpdateHeader();
            UpdateSmiles();
        }
Ejemplo n.º 13
0
        public void OnConfigApply(ConfigStorage Config)
        {
            cctv_nonce     = "";
            cctv_streamer  = "";
            cctv_timestamp = 88;

            _ChannelUri = (string)Config.GetDefault(ConfigPrefix + ".CYBERGAMETVCHAT.StreamerURI", "");

            ManualResetEvent mre = new ManualResetEvent(false);
            WebClient        wc  = new WebClient();

            wc.Encoding = Encoding.UTF8;
            try {
                //     //"quick_chat_room_name":"soboleff"

                //"quick_chat_username_check_nonce":"c94805e03f",
                //"quick_chat_delete_nonce":"7227a8f20c",
                //"quick_chat_ban_nonce":"a8615484a3",
                //"quick_chat_ban_msg_nonce":"ab5e9ae451",
                //"quick_chat_new_message_nonce":"78ae6168c1",
                //"quick_chat_update_messages_nonce":"e299c4e6c6",
                //"quick_chat_update_users_nonce":"c97c5cae9a",
                //"quick_chat_last_timestamp":1362321788

                //    //"));


                string Result = wc.DownloadString(new Uri(_ChannelUri, UriKind.RelativeOrAbsolute));

                Regex nonceGet = new Regex("quick_chat_update_messages_nonce.*?\\:\\\"(.*?)\\\"");
                Match m        = nonceGet.Match(Result);
                if (m.Success)
                {
                    cctv_nonce = m.Groups[1].Value;
                }

                //Regex nonceGet = new Regex("quick_chat_js_vars.*?{(.*?)}", RegexOptions.Multiline);

                //Match m = nonceGet.Match(Result);
                //if (m.Success) {
                //    string[] vals = m.Groups[1].Value.Split(',');
                //}

                nonceGet = new Regex("quick_chat_room_name.*?\\:\\\"(.*?)\\\"");
                m        = nonceGet.Match(Result);
                if (m.Success)
                {
                    StreamerNick = cctv_streamer = m.Groups[1].Value;
                }

                nonceGet = new Regex("quick_chat_last_timestamp.*?\\:(.*?)\\,");
                m        = nonceGet.Match(Result);
                if (m.Success)
                {
                    cctv_timestamp = long.Parse(m.Groups[1].Value);
                }
            } catch {
                MessageBox.Show("Ошибка сети или стример не найден.");
            }

            LoadedMessages.Clear();
            UpdateHeader();
            UpdateSmiles();
        }
Ejemplo n.º 14
0
        public void OnConfigApply( ConfigStorage Config )
        {
            _ChannelUri = (string)Config.GetDefault(ConfigPrefix + ".EMPIRETVCHAT.StreamerURI", "");

            ManualResetEvent mre = new ManualResetEvent(false);
            WebClient wc = new WebClient();
            wc.Encoding = Encoding.UTF8;
            try {
                string Result = wc.DownloadString(new Uri(_ChannelUri, UriKind.RelativeOrAbsolute));
                Regex rx = new Regex("title\\>(.*?)\\|");
                Match m = rx.Match(Result);
                if (m.Success) {
                    Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerID"] = _StreamerID = int.Parse(_ChannelUri.Split('/')[4]);
                    Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerNick"] = StreamerNick = m.Groups[1].Value.Trim();
                } else {
                    Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerID"] = _StreamerID = 0;
                    Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerNick"] = "";
                }
            } catch {
                Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerID"] = _StreamerID = 0;
                Config[ConfigPrefix + ".EMPIRETVCHAT.StreamerNick"] = "";
                MessageBox.Show("Ошибка сети или стример не найден.");
            }

            LoadedMessages.Clear();
            UpdateHeader();
        }