Merge pull request #1214 from nno88551/patch-2

fixed disconnected message
This commit is contained in:
Shoghi Cervantes 2014-02-12 11:14:29 +01:00
commit aff2b9882a

View File

@ -294,7 +294,6 @@ class Player{
$this->directDataPacket(new DisconnectPacket); $this->directDataPacket(new DisconnectPacket);
$this->connected = false; $this->connected = false;
$this->level->freeAllChunks($this); $this->level->freeAllChunks($this);
$this->spawned = false;
$this->loggedIn = false; $this->loggedIn = false;
$this->buffer = null; $this->buffer = null;
unset($this->buffer); unset($this->buffer);
@ -306,6 +305,7 @@ class Player{
if($msg === true and $this->username != "" and $this->spawned !== false){ if($msg === true and $this->username != "" and $this->spawned !== false){
$this->server->api->chat->broadcast($this->username." left the game"); $this->server->api->chat->broadcast($this->username." left the game");
} }
$this->spawned = false;
console("[INFO] ".FORMAT_AQUA.$this->username.FORMAT_RESET."[/".$this->ip.":".$this->port."] logged out due to ".$reason); console("[INFO] ".FORMAT_AQUA.$this->username.FORMAT_RESET."[/".$this->ip.":".$this->port."] logged out due to ".$reason);
$this->windows = array(); $this->windows = array();
$this->armor = array(); $this->armor = array();