mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-16 14:25:05 +00:00
Added automatic/manual RakLib IP address, block addresses when exceptions are thrown
This commit is contained in:
@ -636,6 +636,8 @@ class Server{
|
||||
if($this->logger instanceof MainLogger){
|
||||
$this->logger->logException($e);
|
||||
}
|
||||
|
||||
$this->mainInterface->blockAddress($address, 600);
|
||||
}
|
||||
//TODO: add raw packet events
|
||||
}
|
||||
|
@ -188,10 +188,16 @@ class RakLibInterface implements ServerInstance, SourceInterface{
|
||||
$logger->logException($e);
|
||||
}
|
||||
}
|
||||
|
||||
$this->interface->blockAddress($this->players[$identifier]->getAddress(), 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function blockAddress($address, $timeout = 300){
|
||||
$this->interface->blockAddress($address, $timeout);
|
||||
}
|
||||
|
||||
public function handleRaw($address, $port, $payload){
|
||||
$this->server->handlePacket($address, $port, $payload);
|
||||
}
|
||||
|
Submodule src/raklib updated: 2016c58c53...9a1c1868b3
Reference in New Issue
Block a user