It sounds as if he was lucky to get only 4 weeks.
Had he not been a pilot with an internationally recognised airline, it probably would have been 4 years.
Whatever his reasons for having the weapon in the first place, carrying a loaded gun in anything but a suitably designed holster is total lunacy.
Even if company procedures permit the carrying of guns by flight crew whilst on the aeroplane, they almost certainly would give very specific advice about taking the weapon from the aircraft when flying out of their home terroritry.
I have little sympathy for him, send him home to work anywhere but near an aeroplane.