Update PlaceLauncher.php

This commit is contained in:
Mario 2023-02-14 10:06:24 +02:00 committed by GitHub
parent fdf5e7b23b
commit f00dbe6530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 6 deletions

View File

@ -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]
];