mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Typo in length
This commit is contained in:
parent
7c25b8c614
commit
6b12832b02
@ -66,7 +66,7 @@ class CustomPacketHandler{
|
||||
$id = ord($this->get(1));
|
||||
$raw = $this->get($len - 1);
|
||||
$pk = new CustomPacketHandler($id, $raw);
|
||||
$pk->data["lenght"] = $len;
|
||||
$pk->data["length"] = $len;
|
||||
$pk->data["id"] = $id;
|
||||
$pk->data["counter"] = $c;
|
||||
$pk->data["packetName"] = $pk->name;
|
||||
|
@ -55,7 +55,7 @@ class MinecraftInterface{
|
||||
|
||||
protected function writeDump($pid, $raw, $data, $origin = "client", $ip = "", $port = 0){
|
||||
if(LOG === true and DEBUG >= 2){
|
||||
$p = "[".(microtime(true) - $this->start)."] [".((($origin === "client" and $this->client === true) or ($origin === "server" and $this->client === false)) ? "CLIENT->SERVER":"SERVER->CLIENT")." ".$ip.":".$port."]: ".(isset($data["id"]) ? "MC Packet ".$this->dataName[$pid]:$this->name[$pid])." (0x".Utils::strTohex(chr($pid)).") [lenght ".strlen($raw)."]".PHP_EOL;
|
||||
$p = "[".(microtime(true) - $this->start)."] [".((($origin === "client" and $this->client === true) or ($origin === "server" and $this->client === false)) ? "CLIENT->SERVER":"SERVER->CLIENT")." ".$ip.":".$port."]: ".(isset($data["id"]) ? "MC Packet ".$this->dataName[$pid]:$this->name[$pid])." (0x".Utils::strTohex(chr($pid)).") [length ".strlen($raw)."]".PHP_EOL;
|
||||
$p .= Utils::hexdump($raw);
|
||||
if(is_array($data)){
|
||||
foreach($data as $i => $d){
|
||||
@ -88,7 +88,7 @@ class MinecraftInterface{
|
||||
$struct = $this->getStruct($pid);
|
||||
if($struct === false){
|
||||
console("[ERROR] Bad packet id 0x".Utils::strTohex(chr($pid)), true, true, 0);
|
||||
$p = "[".(microtime(true) - $this->start)."] [".((($origin === "client" and $this->client === true) or ($origin === "server" and $this->client === false)) ? "CLIENT->SERVER":"SERVER->CLIENT")." ".$ip.":".$port."]: Error, bad packet id 0x".Utils::strTohex(chr($pid))." [lenght ".strlen($raw)."]".PHP_EOL;
|
||||
$p = "[".(microtime(true) - $this->start)."] [".((($origin === "client" and $this->client === true) or ($origin === "server" and $this->client === false)) ? "CLIENT->SERVER":"SERVER->CLIENT")." ".$ip.":".$port."]: Error, bad packet id 0x".Utils::strTohex(chr($pid))." [length ".strlen($raw)."]".PHP_EOL;
|
||||
$p .= Utils::hexdump($data[0]);
|
||||
$p .= PHP_EOL;
|
||||
logg($p, "packets", true, 2);
|
||||
|
@ -101,12 +101,12 @@ class PocketMinecraftClient{
|
||||
break;
|
||||
case 0x06:
|
||||
$serverID = $data[1];
|
||||
$lenght = $data[3];
|
||||
$length = $data[3];
|
||||
$this->send(0x07, array(
|
||||
MAGIC,
|
||||
"\x04\x3f\x57\xfe\xfd",
|
||||
19132,
|
||||
$lenght,
|
||||
$length,
|
||||
$this->clientID,
|
||||
));
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user