示例#1
0
        private void ConnectBTN_Click(object sender, EventArgs e)
        {
            if (!_running)
            {
                if (string.IsNullOrEmpty(_username) || string.IsNullOrEmpty(_password))
                {
                    if (!LogIn())
                    {
                        return;
                    }
                }

                //Set up bot
                _bot = new ChatBot(ChannelBox.Text);
                Commands.SetRequests(this);

                _bot.SetBotAccountInfo(_username, _password);
                if (_bot.StartBot())
                {
                    //Start Updating Process
                    _updateThread = new Thread(UpdateList);
                    _updateThread.Start();
                    ConnectBTN.Text = "Disconnect";

                    _running = true;
                }
                else
                {
                    MessageBox.Show("Could not log in to the IRC server. Please check your login information.", "Connection Issue");
                }
            }
            else
            {
                _updateThread.Abort();
                _bot.StopBot();

                ConnectBTN.Text = "Connect";
                _running        = false;
            }
        }
示例#2
0
        private void ConnectBTN_Click(object sender, EventArgs e)
        {
            if (!_running)
            {
                if (string.IsNullOrEmpty(_username) || string.IsNullOrEmpty(_password))
                    if (!LogIn()) return;

                //Set up bot
                _bot = new ChatBot(ChannelBox.Text);
                Commands.SetRequests(this);

                _bot.SetBotAccountInfo(_username, _password);
                if(_bot.StartBot())
                {
                    //Start Updating Process
                    _updateThread = new Thread(UpdateList);
                    _updateThread.Start();
                    ConnectBTN.Text = "Disconnect";

                    _running = true;
                }
                else
                {
                    MessageBox.Show("Could not log in to the IRC server. Please check your login information.", "Connection Issue");
                }
            }
            else
            {
                _updateThread.Abort();
                _bot.StopBot();

                ConnectBTN.Text = "Connect";
                _running = false;
            }
        }
示例#3
0
 /// <summary>
 /// Twitch-Bot disconnected
 /// </summary>
 void twitchBot_ErrorEvent(ChatBot sender, string msg)
 {
     Log("Twitch Error: (" + msg + ")");
 }
示例#4
0
 /// <summary>
 /// Osu-Bot disconnected
 /// </summary>
 void osuBot_ErrorEvent(ChatBot sender, string message)
 {
     Log("Osu Error: (" + message + ")");
 }