diff --git a/game/Join.php b/game/Join.php index dd965b0..3eb103e 100644 --- a/game/Join.php +++ b/game/Join.php @@ -52,18 +52,19 @@ if ($anothermomentoftruth == 1 && $anotheranothermomentoftruth == 1) { $ok = $getusername->fetch(PDO::FETCH_BOTH); $username = $ok['username']; $china = $getstuff->fetch(PDO::FETCH_BOTH); - $jobstuff = $con->prepare('SELECT jobid,placeid,port FROM jobs WHERE jobid=:jobid'); + $jobstuff = $con->prepare('SELECT jobid,placeid,port,ip FROM jobs WHERE jobid=:jobid'); $jobstuff->bindParam(':jobid', $jobid); $jobstuff->execute(); $actualthing = $jobstuff->fetch(PDO::FETCH_BOTH); $jobid = $actualthing['jobid']; $placeid = $actualthing['placeid']; $port = $actualthing['port']; + $ip = $actualthing['ip']; // still need to add charapp and membership $authticket = authticket($id, $username, "", $jobid, $gameSettings["privatekey"]); $joinscript = [ "ClientPort" => 0, - "MachineAddress" => $AvailableGameservers["1"], + "MachineAddress" => $ip, "ServerPort" => $port, "PingUrl" => "", "PingInterval" => 20,