president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Hi my dear friends,
Could someone help me out with this problem that I'm having with gesior, it keep saying [Banished until 31 December 1969, 21:00].
The code on characters.php
classes/account.php
classes/player.php
Why that? I can't see where is the error.
Thanks.
Could someone help me out with this problem that I'm having with gesior, it keep saying [Banished until 31 December 1969, 21:00].
The code on characters.php
Code:
if($player->isBanned() || $account->isBanned())
$main_content .= '<font color="red"> [Banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>';
classes/account.php
Code:
public function isBanned($forceReload = false)
{
$this->loadBans($forceReload);
return count($this->bans) > 0;
}
public function getBanTime($forceReload = false)
{
$this->loadBans($forceReload);
$lastExpires = 0;
foreach($bans as $ban)
{
if($ban->getExpiresAt() <= 0)
{
$lastExpires = 0;
break;
}
if($ban->getExpiresAt() > time() && $ban->getExpiresAt() > $lastExpires)
$lastExpires = $ban->getExpiresAt();
}
return $lastExpires;
}
classes/player.php
Code:
public function isBanned()
{
return $this->getAccount()->isBanned();
}
Why that? I can't see where is the error.
Thanks.