mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00
This commit is contained in:
parent
ef9d5127a2
commit
636a54c70d
@ -176,7 +176,7 @@ class OTS_GuildRank extends OTS_Row_DAO implements IteratorAggregate, Countable
|
||||
{
|
||||
if( !isset($this->data['guild_id']) )
|
||||
{
|
||||
throw new E_OTS_NotLoaded();
|
||||
return new OTS_Guild();
|
||||
}
|
||||
|
||||
$guild = new OTS_Guild();
|
||||
|
@ -75,7 +75,10 @@ class OTS_ServerInfo
|
||||
fwrite($socket, $packet);
|
||||
|
||||
// reads respond
|
||||
$data = stream_get_contents($socket);
|
||||
//$data = stream_get_contents($socket);
|
||||
$data = '';
|
||||
while (!feof($socket))
|
||||
$data .= fgets($socket, 1024);
|
||||
|
||||
// closing connection to current server
|
||||
fclose($socket);
|
||||
@ -121,7 +124,9 @@ class OTS_ServerInfo
|
||||
{
|
||||
// loads respond XML
|
||||
$info = new OTS_InfoRespond();
|
||||
$info->loadXML( $status->getBuffer() );
|
||||
if(!$info->loadXML( $status->getBuffer()))
|
||||
return false;
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
|
@ -254,20 +254,22 @@ if(check_name($name))
|
||||
}
|
||||
|
||||
$rank_of_player = $player->getRank();
|
||||
if($rank_of_player->isLoaded())
|
||||
{
|
||||
$guild_name = $rank_of_player->getGuild()->getName();
|
||||
echo
|
||||
'<TR BGCOLOR="'.getStyle(++$rows).'">'.
|
||||
'<TD>Guild membership:</TD><TD>'.$rank_of_player->getName().' of the ' . getGuildLink($guild_name) . '</TD>'.
|
||||
'</TR>';
|
||||
if($rank_of_player->isLoaded()) {
|
||||
$guild = $rank_of_player->getGuild();
|
||||
if($guild->isLoaded()) {
|
||||
$guild_name = $guild->getName();
|
||||
echo
|
||||
'<TR BGCOLOR="'.getStyle(++$rows).'">'.
|
||||
'<TD>Guild membership:</TD><TD>'.$rank_of_player->getName().' of the ' . getGuildLink($guild_name) . '</TD>'.
|
||||
'</TR>';
|
||||
}
|
||||
}
|
||||
|
||||
echo
|
||||
'<TR BGCOLOR="'.getStyle(++$rows).'"><TD>Last login:</TD><TD>';
|
||||
$lastlogin = $player->getLastLogin();
|
||||
if(empty($lastlogin))
|
||||
echo'Never logged in.';
|
||||
echo 'Never logged in.';
|
||||
else
|
||||
echo date("M d Y, H:i:s", $lastlogin).' CEST';
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ if($action == 'kickplayer') {
|
||||
}
|
||||
else
|
||||
{
|
||||
if($player->getRank()->isLoaded() && $player->getRank()->getGuild()->getName() != $guild->getName()) {
|
||||
if($player->getRank()->isLoaded() && $player->getRank()->getGuild()->isLoaded() && $player->getRank()->getGuild()->getName() != $guild->getName()) {
|
||||
$guild_errors[] = 'Character <b>'.$name.'</b> isn\'t from your guild.';
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user