This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/scripts/game/beta5/player/library/lastOnline.inc

24 lines
504 B
PHP

<?php
class beta5_player_lastOnline {
function beta5_player_lastOnline($lib) {
$this->lib = $lib;
$this->db = $this->lib->game->db;
$this->main = $this->lib->game->getLib('main/account');
}
// Returns the timestamp at which the player last logged out,
// or 0 if the player is online at the moment
function run($playerID) {
$player = $this->lib->call('get', $playerID, true);
if (is_null($player)) {
return 0;
}
return $this->main->call('lastOnline', $player['uid']);
}
}
?>