From cfb3bbfbf2338b93c52a696e5aee15dbdeef3fc9 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 22 Jan 2014 01:36:17 +0100 Subject: [PATCH] Fixed #1058 --- src/Player.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Player.php b/src/Player.php index 53976b7e9..2eb21fd16 100644 --- a/src/Player.php +++ b/src/Player.php @@ -1300,7 +1300,11 @@ class Player{ if($u !== false){ $u->close("logged in from another location"); } - + if(!isset($this->CID) or $this->CID == null){ + console("[DEBUG] Player ".$this->username." does not have a CID", true, true, 2); + $this->CID = Utils::readLong(Utils::getRandomBytes(8, false)); + } + $this->server->api->player->add($this->CID); if($this->server->api->handle("player.join", $this) === false){ $this->close("join cancelled", false);