A simple datapack that adds a combat timer (default 15 seconds) to your world, triggered when you hit or get hit by another player. Any player who logs out during that time will be killed upon rejoining.
As an operator, you can change the combat time by running the command below:
/scoreboard players set .config combat_timer_seconds <seconds>