From f00dbe6530f14efe06dc7eb565c89d15ec08e351 Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Tue, 14 Feb 2023 10:06:24 +0200 Subject: [PATCH] Update PlaceLauncher.php --- game/PlaceLauncher.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/game/PlaceLauncher.php b/game/PlaceLauncher.php index 09f8fe6..b8f5c90 100644 --- a/game/PlaceLauncher.php +++ b/game/PlaceLauncher.php @@ -43,6 +43,11 @@ if ($momentoftruth == 1) { $checkifjobalreadyexists->execute(); $okcheck = $checkifjobalreadyexists->fetchColumn(); if ($okcheck == 1) { + $passedplacelauncher = '1'; + $hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = :passedplacelauncher WHERE token=:token'); + $hahatroll->bindParam(':passedplacelauncher', $passedplacelauncher); + $hahatroll->bindParam(':token', $token); + $hahatroll->execute(); $getjobforalready = $con->prepare('SELECT jobid FROM jobs WHERE placeid=:placeid AND isonline=:isonline'); $getjobforalready->bindParam(':placeid', $placeid); $getjobforalready->bindParam(':isonline', $helppdo); @@ -52,15 +57,17 @@ if ($momentoftruth == 1) { $response = [ "jobId" => $jobid, "status" => $status, - "joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid, - "authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx", + "joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid, + "authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx", "authenticationTicket" => $token, "message" => $allstatus[$status] ]; echo json_encode($response); } else if ($okcheck == 0) { - $hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = 1 WHERE token=:token'); - $hahatroll->bindParam(':token', $token); + $passedplacelauncher = '1'; + $hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = :passedplacelauncher WHERE token=:token'); + $hahatroll->bindParam(':passedplacelauncher', $passedplacelauncher); + $hahatroll->bindParam(':token', $token); $hahatroll->execute(); function generateRandomJobId() { $chars = '0123456789abcdefghijklmnopqrstuvwxyz'; @@ -207,8 +214,8 @@ game:GetService("RunService"):Run() $response = [ "jobId" => $jobid, "status" => $status, - "joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid, - "authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx", + "joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid, + "authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx", "authenticationTicket" => $token, "message" => $allstatus[$status] ];