mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-21 10:54:05 +00:00
Merge branch 'php/7.0'
This commit is contained in:
commit
8b13b520e0
@ -133,6 +133,8 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
|||||||
|
|
||||||
public function handleEncapsulated($identifier, EncapsulatedPacket $packet, $flags){
|
public function handleEncapsulated($identifier, EncapsulatedPacket $packet, $flags){
|
||||||
if(isset($this->players[$identifier])){
|
if(isset($this->players[$identifier])){
|
||||||
|
//get this now for blocking in case the player was closed before the exception was raised
|
||||||
|
$address = $this->players[$identifier]->getAddress();
|
||||||
try{
|
try{
|
||||||
if($packet->buffer !== ""){
|
if($packet->buffer !== ""){
|
||||||
$pk = $this->getPacket($packet->buffer);
|
$pk = $this->getPacket($packet->buffer);
|
||||||
@ -143,7 +145,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
|||||||
$logger->debug("Packet " . (isset($pk) ? get_class($pk) : "unknown") . " 0x" . bin2hex($packet->buffer));
|
$logger->debug("Packet " . (isset($pk) ? get_class($pk) : "unknown") . " 0x" . bin2hex($packet->buffer));
|
||||||
$logger->logException($e);
|
$logger->logException($e);
|
||||||
|
|
||||||
$this->interface->blockAddress($this->players[$identifier]->getAddress(), 5);
|
$this->interface->blockAddress($address, 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user