Ejemplo n.º 1
0
 public static void Main(string[] args)
 {
     string[] configuration = File.ReadAllLines(args[0]);
     IRCClient = new IRCClient(configuration[0], Convert.ToInt32(configuration[1]), configuration[2], configuration[3], Convert.ToBoolean(configuration[4]), configuration[5]);
     IRCClient.Connect();
     IRCClient.MessageRecieved += IRCClient_OnMessageRecieved;
     IRCClient.Kicked += IRCClient_OnKicked;
     IRCClient.BeginListening();
 }
Ejemplo n.º 2
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            client = new IRCClient(txtServer.Text, Convert.ToInt32(txtPort.Text), txtNickname.Text, txtChannel.Text, cbSsl.Checked, txtUsername.Text);
            if (!client.Connect())
            {
                MessageBox.Show("Failed to connect! Timed out!");
                return;
            }

            client.MessageRecieved += client_mesageRecieved;
            new Task(() => client.BeginListening()).Start();
            currentChannel = txtChannel.Text;
        }