From a7ec472ef41291ae2b5c20cfba4bdfff2fbb2768 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Fri, 14 Dec 2012 00:42:13 +0100 Subject: [PATCH] Fixed whitelist command & auto-disconnect --- classes/API/ConsoleAPI.php | 2 +- classes/Session.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/API/ConsoleAPI.php b/classes/API/ConsoleAPI.php index 7c5fd8ea0..0d056ece0 100644 --- a/classes/API/ConsoleAPI.php +++ b/classes/API/ConsoleAPI.php @@ -156,7 +156,7 @@ class ConsoleAPI{ $this->server->api->setProperty("white-list", false); break; default: - console("[INFO] Usage: /whitelist [username]"); + console("[INFO] Usage: /whitelist [username]"); break; } break; diff --git a/classes/Session.class.php b/classes/Session.class.php index 632cc0746..c9ae58406 100644 --- a/classes/Session.class.php +++ b/classes/Session.class.php @@ -85,12 +85,12 @@ class Session{ $this->server->deleteEvent($ev[0], $ev[1]); } $this->eventHandler("You have been kicked. Reason: ".$reason, "onChat"); + $this->dataPacket(MC_DISCONNECT); $this->connected = false; if($msg === true){ $this->server->trigger("onChat", $this->username." left the game"); } console("[INFO] Session with ".$this->ip.":".$this->port." Client ID ".$this->clientID." closed due to ".$reason); - $this->dataPacket(MC_DISCONNECT); $this->server->api->player->remove($this->CID); }