Added several security measures in the PlayerConnection hook

Signed-off-by: bergerkiller <bergerkiller@gmail.com>