implement gifting to ppemu

This commit is contained in:
Bluzume 2021-08-09 19:03:05 +12:00
parent be9b0ba8e0
commit ddbf1fd67b
8 changed files with 321 additions and 166 deletions

View file

@ -12,6 +12,7 @@ function GenHmacMessage(string $data, string $channel)
return $hmac;
}
function getPlayerList($database)
{
include('config.php');
@ -163,7 +164,7 @@ function getUserExistInExt($database, $id)
$stmt->execute();
$result = $stmt->get_result();
return intval($result->fetch_row()[0]) <= 0;
return intval($result->fetch_row()[0]) >= 1;
}
@ -251,7 +252,7 @@ function isUserOnline($database, $id)
return $count>0;
}
function getNoModPlayersOnlineInServer($database)
function getNoModPlayersOnlineInServer($database)
{
include('config.php');
$dbname = $database;
@ -317,6 +318,19 @@ function getNoPlayersOnlineGlobal()
return $playersOn;
}
function userExistAny($playerId)
{
include('servers.php');
for($i = 0; $i < count($server_list); $i++)
{
if(userid_exists($server_list[$i]['database'], $playerId)){
return true;
}
}
return false;
}
function getNoSubbedPlayersOnlineGlobal()
{
include('servers.php');