From 0b70b36ee14cdf50f704e3781b6d0ddc21937d06 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Tue, 18 Dec 2012 18:16:27 +0100 Subject: [PATCH] Added disconnect packet --- classes/ChunkParser.class.php | 2 -- classes/Session.class.php | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/ChunkParser.class.php b/classes/ChunkParser.class.php index 6e4a34c1..19002f6f 100644 --- a/classes/ChunkParser.class.php +++ b/classes/ChunkParser.class.php @@ -74,8 +74,6 @@ class ChunkParser{ } private function getOffset($X, $Z, $sectors = 21){ - //$info = $this->getOffsetPosition($X, $Z); - //return 4096 + (($info[1] * $info[0]) << 12) + (($info[2] * $data[0]) << 16); return 0x1000 + (($Z * $sectors) << 12) + (($X * $sectors) << 16); } diff --git a/classes/Session.class.php b/classes/Session.class.php index ff208a68..973d0777 100644 --- a/classes/Session.class.php +++ b/classes/Session.class.php @@ -97,7 +97,11 @@ class Session{ $this->server->deleteEvent($ev); } $this->eventHandler("You have been kicked. Reason: ".$reason, "onChat"); + $this->dataPacket(MC_LOGIN_STATUS, array( + "status" => 1, + )); $this->dataPacket(MC_DISCONNECT); + $this->connected = false; if($msg === true){ $this->server->trigger("onChat", $this->username." left the game");