From c833d2131e4b2ac621f6a2a870cf5898df768954 Mon Sep 17 00:00:00 2001 From: Stanislas Dolcini Date: Tue, 2 Oct 2018 22:44:30 +0200 Subject: [PATCH] Reindent comment add missing --- code/web/public_php/login/r2_login.php | 41 +++++++++++--------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/code/web/public_php/login/r2_login.php b/code/web/public_php/login/r2_login.php index 2558a0410..c0f77b527 100755 --- a/code/web/public_php/login/r2_login.php +++ b/code/web/public_php/login/r2_login.php @@ -259,35 +259,28 @@ function checkUserValidity($login, $password, $clientApplication, $cp, &$id, &$r $res = false; } } else { + // // check if the user not already online + // if ($row["State"] != "Offline") { + // $reason = "$login is already online and "; + // // ask the LS to remove the client + // if (disconnectClient($row["ShardId"], $row["UId"], $tempres)) { + // $reason = $reason . "was just disconnected. Now you can retry the identification (error code 54)"; - // // check if the user not already online - // if ($row["State"] != "Offline") - // { - // $reason = "$login is already online and "; - // // ask the LS to remove the client - // if (disconnectClient ($row["ShardId"], $row["UId"], $tempres)) - // { - // $reason = $reason."was just disconnected. Now you can retry the identification (error code 54)"; - // - // $query = "update shard set NbPlayers=NbPlayers-1 where ShardId=".$row["ShardId"]; - // $result = mysqli_query ($link, $query) or die ("Can't execute the query: '$query' errno:".mysqli_errno($link).": ".mysqli_error($link)); - // - // $query = "update user set ShardId=-1, State='Offline' where UId=".$row["UId"]; - // $result = mysqli_query ($link, $query) or die ("Can't execute the query: '$query' errno:".mysqli_errno($link).": ".mysqli_error($link)); - // } - // else - // { - // $reason = $reason."can't be disconnected: $tempres (error code 55)"; - // } - // $res = false; - // } - // else - // { + // $query = "update shard set NbPlayers=NbPlayers-1 where ShardId=" . $row["ShardId"]; + // $result = mysqli_query($link, $query) or die("Can't execute the query: '$query' errno:" . mysqli_errno($link) . ": " . mysqli_error($link)); + + // $query = "update user set ShardId=-1, State='Offline' where UId=" . $row["UId"]; + // $result = mysqli_query($link, $query) or die("Can't execute the query: '$query' errno:" . mysqli_errno($link) . ": " . mysqli_error($link)); + // } else { + // $reason = $reason . "can't be disconnected: $tempres (error code 55)"; + // } + // $res = false; + // } else { $id = $row["UId"]; $priv = $row["Privilege"]; $extended = $row["ExtendedPrivilege"]; $res = true; -// } + // } } } } else {