private void miMessage_Click(object sender, System.EventArgs e) { string message = "(" + Properties.Settings.Default.Username + "): "; Message_Kick modal = new Message_Kick(); if (modal.ShowDialog(this) == DialogResult.OK) { message += modal.mtxMessage.Text; } modal.Dispose(); b.SendCommand("say " + listPlayers.SelectedItems[0].SubItems[0].Text + " " + message); }
private void miKick_Click(object sender, System.EventArgs e) { string message = ""; Message_Kick modal = new Message_Kick(); if (modal.ShowDialog(this) == DialogResult.OK) { message = modal.mtxMessage.Text; } modal.Dispose(); message = (message == "") ? "Admin kick" : message; if (Properties.Settings.Default.showKickAdmin) { message += " (" + Properties.Settings.Default.Username + ")"; } b.SendCommand("kick " + listPlayers.SelectedItems[0].SubItems[0].Text + " " + message); }