Skip to content

Commit

Permalink
IP updates
Browse files Browse the repository at this point in the history
  • Loading branch information
valzargaming committed Sep 25, 2022
1 parent 24a7e09 commit 90400a5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
40 changes: 20 additions & 20 deletions functions/message-function.php
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,7 @@ function ($error) use ($message) {
//Sends a message containing data for each server we host as collected from serverinfo.json
//This method does not have to be called locally, so it can be moved to VZG Verifier
if($GLOBALS['debug_echo']) echo "[SERVER STATE] $author_check" . PHP_EOL;
$browser->get('http://192.168.1.175:8080/servers/serverinfo_get.php')->done( //Hosted on the website, NOT the bot's server
$browser->get('http://10.0.0.175:8080/servers/serverinfo_get.php')->done( //Hosted on the website, NOT the bot's server
function ($response) use ($author_channel, $discord, $message) {
if($GLOBALS['debug_echo']) echo '[RESPONSE]' . PHP_EOL;
include "../servers/serverinfo.php"; //$servers[1]["key"] = address / alias / port / servername
Expand Down Expand Up @@ -3728,7 +3728,7 @@ function ($error) use ($new_message) {
case 'status': //;status
if($GLOBALS['debug_echo']) echo "[STATUS] $author_check" . PHP_EOL;
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/serverstate.txt"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/serverstate.txt"); // set url
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return the transfer as a string
return $message->reply(curl_exec($ch));
break;
Expand All @@ -3740,7 +3740,7 @@ function ($error) use ($new_message) {
if($GLOBALS['debug_echo']) echo "[RESUME] $author_check" . PHP_EOL;
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/resume.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/resume.php"); // set url
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return the transfer as a string
curl_setopt($ch, CURLOPT_POST, true);
$message->reply(curl_exec($ch));
Expand All @@ -3762,7 +3762,7 @@ function ($error) use ($new_message) {
$message->react("⏰")->done(function ($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/savemanual1.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/savemanual1.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -3805,7 +3805,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/savemanual2.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/savemanual2.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -3847,7 +3847,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/savemanual3.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/savemanual3.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -3885,7 +3885,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/deletemanual1.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/deletemanual1.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -3921,7 +3921,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/loadmanual1.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/loadmanual1.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -3953,7 +3953,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/loadmanual2.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/loadmanual2.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -3985,7 +3985,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/loadmanual3.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/loadmanual3.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -4017,7 +4017,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/load1h.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/load1h.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -4049,7 +4049,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/load2h.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/load2h.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -4079,7 +4079,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/host.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/host.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -4114,7 +4114,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/kill.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/kill.php"); // set url
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -4149,7 +4149,7 @@ function ($error) use ($new_message) {
//$message->react("⏰")->done(function($author_channel) use ($message) { //Promise
//Trigger the php script remotely
//$ch = curl_init(); //create curl resource
//curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/update.php"); // set url
//curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/update.php"); // set url
//curl_setopt($ch, CURLOPT_POST, true);
//curl_setopt($ch, CURLOPT_USERAGENT, 'Palace Bot');
Expand Down Expand Up @@ -4196,7 +4196,7 @@ function ($error) use ($new_message) {
case 'pause': //;pause
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/pause.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/pause.php"); // set url
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return the transfer as a string
curl_setopt($ch, CURLOPT_POST, true);
$message->reply(curl_exec($ch));
Expand All @@ -4205,7 +4205,7 @@ function ($error) use ($new_message) {
case 'loadnew': //;loadnew
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/loadnew.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/loadnew.php"); // set url
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return the transfer as a string
curl_setopt($ch, CURLOPT_POST, true);
$message->reply(curl_exec($ch));
Expand All @@ -4218,7 +4218,7 @@ function ($error) use ($new_message) {
}
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.23:81/civ13/VM_restart.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.23:81/civ13/VM_restart.php"); // set url
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return the transfer as a string
curl_setopt($ch, CURLOPT_POST, true);
$message->reply(curl_exec($ch));
Expand All @@ -4234,7 +4234,7 @@ function ($error) use ($new_message) {
if($GLOBALS['debug_echo']) echo "[START] $author_check" . PHP_EOL;
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.97/magmacreeper/start.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.97/magmacreeper/start.php"); // set url
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return the transfer as a string
curl_setopt($ch, CURLOPT_POST, true);
$message->reply(curl_exec($ch));
Expand All @@ -4244,7 +4244,7 @@ function ($error) use ($new_message) {
if($GLOBALS['debug_echo']) echo "[START] $author_check" . PHP_EOL;
//Trigger the php script remotely
$ch = curl_init(); //create curl resource
curl_setopt($ch, CURLOPT_URL, "http://192.168.1.97/magmacreeper/pull.php"); // set url
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.97/magmacreeper/pull.php"); // set url
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return the transfer as a string
curl_setopt($ch, CURLOPT_POST, true);
$message->reply(curl_exec($ch));
Expand Down
2 changes: 1 addition & 1 deletion slash.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function ($commands) use ($discord) {

// register guild command `/players`
$discord->listenCommand('players', function ($interaction) use ($discord, $browser) {
$browser->get('http://192.168.1.175:8080/servers/serverinfo_get.php')->done( //Hosted on the website, NOT the bot's server
$browser->get('http://10.0.0.175:8080/servers/serverinfo_get.php')->done( //Hosted on the website, NOT the bot's server
function ($response) use ($interaction, $discord) {
//if($GLOBALS['debug_echo']) echo '[RESPONSE]' . PHP_EOL;
include "../servers/serverinfo.php"; //$servers[1]["key"] = address / alias / port / servername
Expand Down

0 comments on commit 90400a5

Please sign in to comment.