mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 21:35:21 +00:00
RakLibInterface: Log a message when a non-0xfe packet is received
This commit is contained in:
parent
2ee86f0edf
commit
c22f793521
@ -44,6 +44,7 @@ use raklib\server\ipc\UserToRakLibThreadMessageSender;
|
|||||||
use raklib\server\ServerEventListener;
|
use raklib\server\ServerEventListener;
|
||||||
use raklib\utils\InternetAddress;
|
use raklib\utils\InternetAddress;
|
||||||
use function addcslashes;
|
use function addcslashes;
|
||||||
|
use function base64_encode;
|
||||||
use function bin2hex;
|
use function bin2hex;
|
||||||
use function implode;
|
use function implode;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
@ -176,6 +177,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
|||||||
public function onPacketReceive(int $sessionId, string $packet) : void{
|
public function onPacketReceive(int $sessionId, string $packet) : void{
|
||||||
if(isset($this->sessions[$sessionId])){
|
if(isset($this->sessions[$sessionId])){
|
||||||
if($packet === "" or $packet[0] !== self::MCPE_RAKNET_PACKET_ID){
|
if($packet === "" or $packet[0] !== self::MCPE_RAKNET_PACKET_ID){
|
||||||
|
$this->sessions[$sessionId]->getLogger()->debug("Non-FE packet received: " . base64_encode($packet));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//get this now for blocking in case the player was closed before the exception was raised
|
//get this now for blocking in case the player was closed before the exception was raised
|
||||||
|
Loading…
x
Reference in New Issue
Block a user