private void metroButton13_Click(object sender, EventArgs e) { string output = ""; // Server info query example /*using (Query q = new Query(metroTextBox2.Text, 7777)) * { * q.Send('i'); * * foreach (string str in q.Store(q.Recieve())) * output += str + '\n'; * }*/ output += "Rcon :"; string Rcon_Pass = metroTextBox1.Text; // RCON query example using (RCONQuery rq = new RCONQuery(metroTextBox2.Text, 7777, Rcon_Pass, true)) { rq.Send("loadfs Anti0RS"); foreach (string str in rq.Store(rq.Recieve())) { output += str + '\n'; } } metroButton13.Enabled = false; metroButton14.Enabled = true; richTextBox1.Text += output; richTextBox1.Text += ""; MessageBox.Show(output); }
private void button13_Click(object sender, EventArgs e) { string output = ""; output += "Rcon :"; string Rcon_Pass = metroTextBox1.Text; using (RCONQuery rq = new RCONQuery(metroTextBox2.Text, 7777, Rcon_Pass, true)) { if (metroCheckBox2.Checked) { rq.Send("db_logging 1"); } else { rq.Send("db_logging 0"); } if (metroCheckBox1.Checked) { rq.Send("logqueries 1"); } else { rq.Send("logqueries 0"); } if (metroCheckBox3.Checked) { rq.Send("db_log_queries 1"); } else { rq.Send("db_log_queries 0"); } if (metroCheckBox4.Checked) { rq.Send("chatlogging 1"); } else { rq.Send("chatlogging 0"); } if (metroCheckBox5.Checked) { rq.Send("timestamp 1"); } else { rq.Send("timestamp 0"); } foreach (string str in rq.Store(rq.Recieve())) { output += str + '\n'; } } richTextBox1.Text += output; richTextBox1.Text += ""; MessageBox.Show(output); }
private void button12_Click(object sender, EventArgs e) { string output = ""; string Max_NPCS = "maxnpc "; string npcc = NpcCount.ToString(); output += "Rcon :"; Max_NPCS += npcc; string Rcon_Pass = metroTextBox1.Text; using (RCONQuery rq = new RCONQuery(metroTextBox2.Text, 7777, Rcon_Pass, true)) { rq.Send(Max_NPCS); foreach (string str in rq.Store(rq.Recieve())) { output += str + '\n'; } } richTextBox1.Text += output; richTextBox1.Text += ""; MessageBox.Show(output); }
private void button6_Click(object sender, EventArgs e) { string output = ""; // Server info query example /*using (Query q = new Query(metroTextBox2.Text, 7777)) * { * q.Send('i'); * * foreach (string str in q.Store(q.Recieve())) * output += str + '\n'; * }*/ output += "Rcon :"; string Rcon_Pass = metroTextBox1.Text; using (RCONQuery rq = new RCONQuery(metroTextBox2.Text, 7777, Rcon_Pass, true)) { rq.Send("password 0"); foreach (string str in rq.Store(rq.Recieve())) { output += str + '\n'; } } richTextBox1.Text += output; richTextBox1.Text += ""; MessageBox.Show(output); }
private void button9_Click(object sender, EventArgs e) { string output = ""; string URL_Site = "weburl "; output += "Rcon :"; URL_Site += metroTextBox7.Text; string Rcon_Pass = metroTextBox1.Text; using (RCONQuery rq = new RCONQuery(metroTextBox2.Text, 7777, Rcon_Pass, true)) { rq.Send(URL_Site); foreach (string str in rq.Store(rq.Recieve())) { output += str + '\n'; } } richTextBox1.Text += output; richTextBox1.Text += ""; MessageBox.Show(output); }
private void button8_Click(object sender, EventArgs e) { string output = ""; string FS_Name = "unloadfs "; output += "Rcon :"; FS_Name += metroTextBox6.Text; string Rcon_Pass = metroTextBox1.Text; using (RCONQuery rq = new RCONQuery(metroTextBox2.Text, 7777, Rcon_Pass, true)) { rq.Send(FS_Name); foreach (string str in rq.Store(rq.Recieve())) { output += str + '\n'; } } richTextBox1.Text += output; richTextBox1.Text += ""; MessageBox.Show(output); }