From 1cf2741f9658ee215bba4af4247f6def7feea5c7 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sun, 21 Jul 2013 23:42:07 +0200 Subject: [PATCH] Moved chat disconnect broadcast --- src/Player.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Player.php b/src/Player.php index 2b2dc080..338210e6 100644 --- a/src/Player.php +++ b/src/Player.php @@ -268,17 +268,17 @@ class Player{ $this->level->freeAllChunks($this); $this->spawned = false; $this->loggedIn = false; + if($msg === true and $this->username != ""){ + $this->server->api->chat->broadcast($this->username." left the game"); + } $this->buffer = null; unset($this->buffer); $this->recoveryQueue = array(); $this->receiveQueue = array(); $this->resendQueue = array(); $this->server->interface->stopChunked($this->CID); - if($msg === true and $this->username != ""){ - $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); $this->server->api->player->remove($this->CID); + console("[INFO] \x1b[33m".$this->username."\x1b[0m[/".$this->ip.":".$this->port."] logged out due to ".$reason); } }