private void btnSend_Click(object sender, EventArgs e) { Console.WriteLine("Sending"); string s = String.Empty; s = txtInput.Text; txtInput.Text = String.Empty; char commandCheck = s[0]; if (commandCheck == '!') { CommandPacket command = new CommandPacket(s); client.SendMessage(command); } else { sendMsg(s); } }