Better Player:close() cleanup

This commit is contained in:
Shoghi Cervantes 2013-08-20 11:31:37 +02:00
parent a34595292d
commit 1b72ef8827

View File

@ -274,12 +274,21 @@ class Player{
$this->recoveryQueue = array(); $this->recoveryQueue = array();
$this->receiveQueue = array(); $this->receiveQueue = array();
$this->resendQueue = array(); $this->resendQueue = array();
$this->ackQueue = array();
$this->server->interface->stopChunked($this->CID); $this->server->interface->stopChunked($this->CID);
$this->server->api->player->remove($this->CID); $this->server->api->player->remove($this->CID);
if($msg === true and $this->username != ""){ if($msg === true and $this->username != ""){
$this->server->api->chat->broadcast($this->username." left the game"); $this->server->api->chat->broadcast($this->username." left the game");
} }
console("[INFO] \x1b[33m".$this->username."\x1b[0m[/".$this->ip.":".$this->port."] logged out due to ".$reason); console("[INFO] \x1b[33m".$this->username."\x1b[0m[/".$this->ip.":".$this->port."] logged out due to ".$reason);
$this->windows = array();
$this->armor = array();
$this->inventory = array();
$this->chunksLoaded = array();
$this->chunksOrder = array();
$this->chunkCount = array();
$this->cratingItems = array();
$this->received = array();
} }
} }