There's GameConnection::onDrop(%this, %reason), which is called when a client is removed from the server, with %reason being the argument of %client.delete(reason), or a pre-programmed reason in the engine like "TimedOut" or "Packet Error."
onDrop calls GameConnection::onClientLeaveGame(%this) right after it decrements the player count but doesn't have the reason string. Note that this is only called when we know for a fact that the client was connected successfully (not necessarily authenticated, though) so it's probably best to use this instead of onDrop.
If you really need the reason string, use onDrop and just make sure to check if(%client.connected) to get the same assurance (and make sure to call the parent, too)